diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-09 14:13:40 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-09 14:13:40 +0000 |
commit | 97428a4d84a22795e0d9f1517677ec01cb1bede1 (patch) | |
tree | 45360692ecd61752cefe988e92cd958333ed1af2 /target-mips/op.c | |
parent | dac93210243ec987eeaa8e78867f8b04de2c559e (diff) |
Fix exception handling cornercase for rdhwr.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2641 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op.c')
-rw-r--r-- | target-mips/op.c | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/target-mips/op.c b/target-mips/op.c index 1e2dbc8c21..aec6a022f2 100644 --- a/target-mips/op.c +++ b/target-mips/op.c @@ -2126,7 +2126,7 @@ void op_deret (void) void op_rdhwr_cpunum(void) { if (!(env->hflags & MIPS_HFLAG_UM) || - (env->CP0_HWREna & (1 << 0)) || + (env->CP0_HWREna & (1 << 0)) || (env->CP0_Status & (1 << CP0St_CU0))) T0 = env->CP0_EBase & 0x3ff; else @@ -2137,7 +2137,7 @@ void op_rdhwr_cpunum(void) void op_rdhwr_synci_step(void) { if (!(env->hflags & MIPS_HFLAG_UM) || - (env->CP0_HWREna & (1 << 1)) || + (env->CP0_HWREna & (1 << 1)) || (env->CP0_Status & (1 << CP0St_CU0))) T0 = env->SYNCI_Step; else @@ -2148,7 +2148,7 @@ void op_rdhwr_synci_step(void) void op_rdhwr_cc(void) { if (!(env->hflags & MIPS_HFLAG_UM) || - (env->CP0_HWREna & (1 << 2)) || + (env->CP0_HWREna & (1 << 2)) || (env->CP0_Status & (1 << CP0St_CU0))) T0 = env->CP0_Count; else @@ -2159,7 +2159,7 @@ void op_rdhwr_cc(void) void op_rdhwr_ccres(void) { if (!(env->hflags & MIPS_HFLAG_UM) || - (env->CP0_HWREna & (1 << 3)) || + (env->CP0_HWREna & (1 << 3)) || (env->CP0_Status & (1 << CP0St_CU0))) T0 = env->CCRes; else @@ -2167,28 +2167,6 @@ void op_rdhwr_ccres(void) RETURN(); } -void op_rdhwr_unimpl30(void) -{ - if (!(env->hflags & MIPS_HFLAG_UM) || - (env->CP0_HWREna & (1 << 30)) || - (env->CP0_Status & (1 << CP0St_CU0))) - T0 = 0; - else - CALL_FROM_TB1(do_raise_exception, EXCP_RI); - RETURN(); -} - -void op_rdhwr_unimpl31(void) -{ - if (!(env->hflags & MIPS_HFLAG_UM) || - (env->CP0_HWREna & (1 << 31)) || - (env->CP0_Status & (1 << CP0St_CU0))) - T0 = 0; - else - CALL_FROM_TB1(do_raise_exception, EXCP_RI); - RETURN(); -} - void op_save_state (void) { env->hflags = PARAM1; |