diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-12-05 19:59:36 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-12-05 19:59:36 +0000 |
commit | 4ad40f366f20f6991b640d7af63c9fc3a59246fa (patch) | |
tree | c895253e1b6f236ff8d874b7ac7fddf98e486795 /target-mips/op.c | |
parent | 6810e154907c4ed3883f3f9fc03507fe45a679ea (diff) |
MIPS fixes (Daniel Jacobowitz)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1690 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op.c')
-rw-r--r-- | target-mips/op.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/target-mips/op.c b/target-mips/op.c index 029ce5d005..71abd95bea 100644 --- a/target-mips/op.c +++ b/target-mips/op.c @@ -207,7 +207,7 @@ void op_addo (void) tmp = T0; T0 += T1; if ((T0 >> 31) ^ (T1 >> 31) ^ (tmp >> 31)) { - CALL_FROM_TB1(do_raise_exception, EXCP_OVERFLOW); + CALL_FROM_TB1(do_raise_exception_direct, EXCP_OVERFLOW); } RETURN(); } @@ -225,7 +225,7 @@ void op_subo (void) tmp = T0; T0 = (int32_t)T0 - (int32_t)T1; if (!((T0 >> 31) ^ (T1 >> 31) ^ (tmp >> 31))) { - CALL_FROM_TB1(do_raise_exception, EXCP_OVERFLOW); + CALL_FROM_TB1(do_raise_exception_direct, EXCP_OVERFLOW); } RETURN(); } @@ -364,7 +364,7 @@ static inline void set_HILO (uint64_t HILO) void op_mult (void) { - set_HILO((int64_t)T0 * (int64_t)T1); + set_HILO((int64_t)(int32_t)T0 * (int64_t)(int32_t)T1); RETURN(); } @@ -378,7 +378,7 @@ void op_madd (void) { int64_t tmp; - tmp = ((int64_t)T0 * (int64_t)T1); + tmp = ((int64_t)(int32_t)T0 * (int64_t)(int32_t)T1); set_HILO((int64_t)get_HILO() + tmp); RETURN(); } @@ -396,7 +396,7 @@ void op_msub (void) { int64_t tmp; - tmp = ((int64_t)T0 * (int64_t)T1); + tmp = ((int64_t)(int32_t)T0 * (int64_t)(int32_t)T1); set_HILO((int64_t)get_HILO() - tmp); RETURN(); } @@ -595,11 +595,16 @@ void op_pmon (void) void op_trap (void) { if (T0) { - CALL_FROM_TB1(do_raise_exception, EXCP_TRAP); + CALL_FROM_TB1(do_raise_exception_direct, EXCP_TRAP); } RETURN(); } +void op_debug (void) +{ + CALL_FROM_TB1(do_raise_exception_direct, EXCP_DEBUG); +} + void op_set_lladdr (void) { env->CP0_LLAddr = T2; @@ -654,3 +659,8 @@ void op_exit_tb (void) EXIT_TB(); } +void op_wait (void) +{ + env->halted = 1; + CALL_FROM_TB1(do_raise_exception, EXCP_HLT); +} |