diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-29 23:01:41 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-29 23:01:41 +0000 |
commit | 3f4f7d2b51cdce2d0d0ec89f07602bc7e2e34d19 (patch) | |
tree | 81b1a2834472096044de1ed16e6888e9652222f5 /target-sh4/op_helper.c | |
parent | 492855177f2a08a2d8fccdfd3759f172f573af82 (diff) | |
download | qemu-3f4f7d2b51cdce2d0d0ec89f07602bc7e2e34d19.tar.gz qemu-3f4f7d2b51cdce2d0d0ec89f07602bc7e2e34d19.tar.bz2 qemu-3f4f7d2b51cdce2d0d0ec89f07602bc7e2e34d19.zip |
SH4: convert a few helpers to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5112 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sh4/op_helper.c')
-rw-r--r-- | target-sh4/op_helper.c | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/target-sh4/op_helper.c b/target-sh4/op_helper.c index 8c8318f1e3..8504115400 100644 --- a/target-sh4/op_helper.c +++ b/target-sh4/op_helper.c @@ -20,11 +20,6 @@ #include <assert.h> #include "exec.h" -void do_raise_exception(void) -{ - cpu_loop_exit(); -} - #ifndef CONFIG_USER_ONLY #define MMUSUFFIX _mmu @@ -64,7 +59,7 @@ void tlb_fill(target_ulong addr, int is_write, int mmu_idx, void *retaddr) cpu_restore_state(tb, env, pc, NULL); } } - do_raise_exception(); + cpu_loop_exit(); } env = saved_env; } @@ -81,6 +76,38 @@ void helper_ldtlb(void) #endif } +void helper_raise_illegal_instruction(void) +{ + env->exception_index = 0x180; + cpu_loop_exit(); +} + +void helper_raise_slot_illegal_instruction(void) +{ + env->exception_index = 0x1a0; + cpu_loop_exit(); +} + +void helper_debug(void) +{ + env->exception_index = EXCP_DEBUG; + cpu_loop_exit(); +} + +void helper_sleep(void) +{ + env->halted = 1; + env->exception_index = EXCP_HLT; + cpu_loop_exit(); +} + +void helper_trapa(uint32_t tra) +{ + env->tra = tra << 2; + env->exception_index = 0x160; + cpu_loop_exit(); +} + void helper_addc_T0_T1(void) { uint32_t tmp0, tmp1; |