Revision 2aae2b8e target-sparc/op_helper.c
b/target-sparc/op_helper.c | ||
---|---|---|
1404 | 1404 |
(env->psrps? PSR_PS : 0) | |
1405 | 1405 |
(env->psret? PSR_ET : 0) | env->cwp; |
1406 | 1406 |
#else |
1407 |
return env->version | (env->psr & PSR_ICC) | |
|
1408 |
(env->psref? PSR_EF : 0) | |
|
1409 |
(env->psrpil << 8) | |
|
1410 |
(env->psrs? PSR_S : 0) | |
|
1411 |
(env->psrps? PSR_PS : 0) | env->cwp; |
|
1407 |
return env->psr & PSR_ICC; |
|
1412 | 1408 |
#endif |
1413 | 1409 |
} |
1414 | 1410 |
|
... | ... | |
1427 | 1423 |
static void put_psr(target_ulong val) |
1428 | 1424 |
{ |
1429 | 1425 |
env->psr = val & PSR_ICC; |
1426 |
#if !defined (TARGET_SPARC64) |
|
1430 | 1427 |
env->psref = (val & PSR_EF)? 1 : 0; |
1431 | 1428 |
env->psrpil = (val & PSR_PIL) >> 8; |
1429 |
#endif |
|
1432 | 1430 |
#if ((!defined (TARGET_SPARC64)) && !defined(CONFIG_USER_ONLY)) |
1433 | 1431 |
cpu_check_irqs(env); |
1434 | 1432 |
#endif |
1433 |
#if !defined (TARGET_SPARC64) |
|
1435 | 1434 |
env->psrs = (val & PSR_S)? 1 : 0; |
1436 | 1435 |
env->psrps = (val & PSR_PS)? 1 : 0; |
1437 |
#if !defined (TARGET_SPARC64) |
|
1438 | 1436 |
env->psret = (val & PSR_ET)? 1 : 0; |
1439 |
#endif |
|
1440 | 1437 |
set_cwp(val & PSR_CWP); |
1438 |
#endif |
|
1441 | 1439 |
env->cc_op = CC_OP_FLAGS; |
1442 | 1440 |
} |
1443 | 1441 |
|
... | ... | |
2326 | 2324 |
asi &= 0xff; |
2327 | 2325 |
|
2328 | 2326 |
if ((asi < 0x80 && (env->pstate & PS_PRIV) == 0) |
2329 |
|| ((env->def->features & CPU_FEATURE_HYPV)
|
|
2327 |
|| (cpu_has_hypervisor(env)
|
|
2330 | 2328 |
&& asi >= 0x30 && asi < 0x80 |
2331 | 2329 |
&& !(env->hpstate & HS_PRIV))) |
2332 | 2330 |
raise_exception(TT_PRIV_ACT); |
... | ... | |
2361 | 2359 |
case 0xe2: // UA2007 Primary block init |
2362 | 2360 |
case 0xe3: // UA2007 Secondary block init |
2363 | 2361 |
if ((asi & 0x80) && (env->pstate & PS_PRIV)) { |
2364 |
if ((env->def->features & CPU_FEATURE_HYPV) |
|
2365 |
&& env->hpstate & HS_PRIV) { |
|
2362 |
if (cpu_hypervisor_mode(env)) { |
|
2366 | 2363 |
switch(size) { |
2367 | 2364 |
case 1: |
2368 | 2365 |
ret = ldub_hypv(addr); |
... | ... | |
2678 | 2675 |
asi &= 0xff; |
2679 | 2676 |
|
2680 | 2677 |
if ((asi < 0x80 && (env->pstate & PS_PRIV) == 0) |
2681 |
|| ((env->def->features & CPU_FEATURE_HYPV)
|
|
2678 |
|| (cpu_has_hypervisor(env)
|
|
2682 | 2679 |
&& asi >= 0x30 && asi < 0x80 |
2683 | 2680 |
&& !(env->hpstate & HS_PRIV))) |
2684 | 2681 |
raise_exception(TT_PRIV_ACT); |
... | ... | |
2722 | 2719 |
case 0xe2: // UA2007 Primary block init |
2723 | 2720 |
case 0xe3: // UA2007 Secondary block init |
2724 | 2721 |
if ((asi & 0x80) && (env->pstate & PS_PRIV)) { |
2725 |
if ((env->def->features & CPU_FEATURE_HYPV) |
|
2726 |
&& env->hpstate & HS_PRIV) { |
|
2722 |
if (cpu_hypervisor_mode(env)) { |
|
2727 | 2723 |
switch(size) { |
2728 | 2724 |
case 1: |
2729 | 2725 |
stb_hypv(addr, val); |
... | ... | |
3048 | 3044 |
void helper_ldda_asi(target_ulong addr, int asi, int rd) |
3049 | 3045 |
{ |
3050 | 3046 |
if ((asi < 0x80 && (env->pstate & PS_PRIV) == 0) |
3051 |
|| ((env->def->features & CPU_FEATURE_HYPV)
|
|
3047 |
|| (cpu_has_hypervisor(env)
|
|
3052 | 3048 |
&& asi >= 0x30 && asi < 0x80 |
3053 | 3049 |
&& !(env->hpstate & HS_PRIV))) |
3054 | 3050 |
raise_exception(TT_PRIV_ACT); |
Also available in: Unified diff