diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-31 03:47:48 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-31 03:47:48 +0000 |
commit | 8984bd2e833ae0824caa3d63176639c70a6fe654 (patch) | |
tree | b47cbda2f65b1cee8611c057eda51e9a3ec7b31d /target-arm/op.c | |
parent | 5e3f878ad65a3a3e50200dd40feac23c9f77b9b7 (diff) |
ARM TCG conversion 12/16.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4149 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-arm/op.c')
-rw-r--r-- | target-arm/op.c | 218 |
1 files changed, 0 insertions, 218 deletions
diff --git a/target-arm/op.c b/target-arm/op.c index 7c6d6a16aa..57086e349c 100644 --- a/target-arm/op.c +++ b/target-arm/op.c @@ -20,66 +20,6 @@ */ #include "exec.h" -void OPPROTO op_addl_T0_T1_cc(void) -{ - unsigned int src1; - src1 = T0; - T0 += T1; - env->NZF = T0; - env->CF = T0 < src1; - env->VF = (src1 ^ T1 ^ -1) & (src1 ^ T0); -} - -void OPPROTO op_adcl_T0_T1_cc(void) -{ - unsigned int src1; - src1 = T0; - if (!env->CF) { - T0 += T1; - env->CF = T0 < src1; - } else { - T0 += T1 + 1; - env->CF = T0 <= src1; - } - env->VF = (src1 ^ T1 ^ -1) & (src1 ^ T0); - env->NZF = T0; - FORCE_RET(); -} - -#define OPSUB(sub, sbc, res, T0, T1) \ - \ -void OPPROTO op_ ## sub ## l_T0_T1_cc(void) \ -{ \ - unsigned int src1; \ - src1 = T0; \ - T0 -= T1; \ - env->NZF = T0; \ - env->CF = src1 >= T1; \ - env->VF = (src1 ^ T1) & (src1 ^ T0); \ - res = T0; \ -} \ - \ -void OPPROTO op_ ## sbc ## l_T0_T1_cc(void) \ -{ \ - unsigned int src1; \ - src1 = T0; \ - if (!env->CF) { \ - T0 = T0 - T1 - 1; \ - env->CF = src1 > T1; \ - } else { \ - T0 = T0 - T1; \ - env->CF = src1 >= T1; \ - } \ - env->VF = (src1 ^ T1) & (src1 ^ T0); \ - env->NZF = T0; \ - res = T0; \ - FORCE_RET(); \ -} - -OPSUB(sub, sbc, T0, T0, T1) - -OPSUB(rsb, rsc, T0, T1, T0) - /* memory access */ #define MEMSUFFIX _raw @@ -92,164 +32,6 @@ OPSUB(rsb, rsc, T0, T1, T0) #include "op_mem.h" #endif -void OPPROTO op_clrex(void) -{ - cpu_lock(); - helper_clrex(env); - cpu_unlock(); -} - -/* T1 based, use T0 as shift count */ - -void OPPROTO op_shll_T1_T0(void) -{ - int shift; - shift = T0 & 0xff; - if (shift >= 32) - T1 = 0; - else - T1 = T1 << shift; - FORCE_RET(); -} - -void OPPROTO op_shrl_T1_T0(void) -{ - int shift; - shift = T0 & 0xff; - if (shift >= 32) - T1 = 0; - else - T1 = (uint32_t)T1 >> shift; - FORCE_RET(); -} - -void OPPROTO op_sarl_T1_T0(void) -{ - int shift; - shift = T0 & 0xff; - if (shift >= 32) - shift = 31; - T1 = (int32_t)T1 >> shift; -} - -void OPPROTO op_rorl_T1_T0(void) -{ - int shift; - shift = T0 & 0x1f; - if (shift) { - T1 = ((uint32_t)T1 >> shift) | (T1 << (32 - shift)); - } - FORCE_RET(); -} - -/* T1 based, use T0 as shift count and compute CF */ - -void OPPROTO op_shll_T1_T0_cc(void) -{ - int shift; - shift = T0 & 0xff; - if (shift >= 32) { - if (shift == 32) - env->CF = T1 & 1; - else - env->CF = 0; - T1 = 0; - } else if (shift != 0) { - env->CF = (T1 >> (32 - shift)) & 1; - T1 = T1 << shift; - } - FORCE_RET(); -} - -void OPPROTO op_shrl_T1_T0_cc(void) -{ - int shift; - shift = T0 & 0xff; - if (shift >= 32) { - if (shift == 32) - env->CF = (T1 >> 31) & 1; - else - env->CF = 0; - T1 = 0; - } else if (shift != 0) { - env->CF = (T1 >> (shift - 1)) & 1; - T1 = (uint32_t)T1 >> shift; - } - FORCE_RET(); -} - -void OPPROTO op_sarl_T1_T0_cc(void) -{ - int shift; - shift = T0 & 0xff; - if (shift >= 32) { - env->CF = (T1 >> 31) & 1; - T1 = (int32_t)T1 >> 31; - } else if (shift != 0) { - env->CF = (T1 >> (shift - 1)) & 1; - T1 = (int32_t)T1 >> shift; - } - FORCE_RET(); -} - -void OPPROTO op_rorl_T1_T0_cc(void) -{ - int shift1, shift; - shift1 = T0 & 0xff; - shift = shift1 & 0x1f; - if (shift == 0) { - if (shift1 != 0) - env->CF = (T1 >> 31) & 1; - } else { - env->CF = (T1 >> (shift - 1)) & 1; - T1 = ((uint32_t)T1 >> shift) | (T1 << (32 - shift)); - } - FORCE_RET(); -} - -void OPPROTO op_movl_cp_T0(void) -{ - helper_set_cp(env, PARAM1, T0); - FORCE_RET(); -} - -void OPPROTO op_movl_T0_cp(void) -{ - T0 = helper_get_cp(env, PARAM1); - FORCE_RET(); -} - -void OPPROTO op_movl_cp15_T0(void) -{ - helper_set_cp15(env, PARAM1, T0); - FORCE_RET(); -} - -void OPPROTO op_movl_T0_cp15(void) -{ - T0 = helper_get_cp15(env, PARAM1); - FORCE_RET(); -} - -void OPPROTO op_v7m_mrs_T0(void) -{ - T0 = helper_v7m_mrs(env, PARAM1); -} - -void OPPROTO op_v7m_msr_T0(void) -{ - helper_v7m_msr(env, PARAM1, T0); -} - -void OPPROTO op_movl_T0_sp(void) -{ - if (PARAM1 == env->v7m.current_sp) - T0 = env->regs[13]; - else - T0 = env->v7m.other_sp; - FORCE_RET(); -} - #include "op_neon.h" /* iwMMXt support */ |