aboutsummaryrefslogtreecommitdiff
path: root/target-mips/translate.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-09 14:13:40 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-09 14:13:40 +0000
commit97428a4d84a22795e0d9f1517677ec01cb1bede1 (patch)
tree45360692ecd61752cefe988e92cd958333ed1af2 /target-mips/translate.c
parentdac93210243ec987eeaa8e78867f8b04de2c559e (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/translate.c')
-rw-r--r--target-mips/translate.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c
index fd11e1b8df..57527a5e96 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -4825,32 +4825,26 @@ static void decode_opc (CPUState *env, DisasContext *ctx)
case OPC_RDHWR:
switch (rd) {
case 0:
+ save_cpu_state(ctx, 1);
gen_op_rdhwr_cpunum();
break;
case 1:
+ save_cpu_state(ctx, 1);
gen_op_rdhwr_synci_step();
break;
case 2:
+ save_cpu_state(ctx, 1);
gen_op_rdhwr_cc();
break;
case 3:
+ save_cpu_state(ctx, 1);
gen_op_rdhwr_ccres();
break;
case 29:
#if defined (CONFIG_USER_ONLY)
gen_op_tls_value ();
-#else
- generate_exception(ctx, EXCP_RI);
-#endif
- break;
- case 30:
- /* Implementation dependent */;
- gen_op_rdhwr_unimpl30();
- break;
- case 31:
- /* Implementation dependent */;
- gen_op_rdhwr_unimpl31();
break;
+#endif
default: /* Invalid */
MIPS_INVAL("rdhwr");
generate_exception(ctx, EXCP_RI);