diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2012-09-16 13:12:20 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2012-09-21 19:53:15 +0200 |
commit | 22b88fd77e2fbb8aefb6e50a6a24d670b0ecb022 (patch) | |
tree | 711e473181754cf9481a6f6ec05c95c55e9f7d88 /target-sh4/op_helper.c | |
parent | ff2086fed268d2b2fedb273f6794949ed2ef9e10 (diff) |
target-sh4: implement addc and subc using TCG
Now that setcond is available, the addc and subc can easily be
implemented using TCG.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-sh4/op_helper.c')
-rw-r--r-- | target-sh4/op_helper.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/target-sh4/op_helper.c b/target-sh4/op_helper.c index bf835fac0f..3ad10bab94 100644 --- a/target-sh4/op_helper.c +++ b/target-sh4/op_helper.c @@ -177,22 +177,6 @@ void helper_ocbi(CPUSH4State *env, uint32_t address) } } -uint32_t helper_addc(CPUSH4State *env, uint32_t arg0, uint32_t arg1) -{ - uint32_t tmp0, tmp1; - - tmp1 = arg0 + arg1; - tmp0 = arg1; - arg1 = tmp1 + (env->sr & 1); - if (tmp0 > tmp1) - env->sr |= SR_T; - else - env->sr &= ~SR_T; - if (tmp1 > arg1) - env->sr |= SR_T; - return arg1; -} - uint32_t helper_addv(CPUSH4State *env, uint32_t arg0, uint32_t arg1) { uint32_t dest, src, ans; @@ -375,22 +359,6 @@ void helper_macw(CPUSH4State *env, uint32_t arg0, uint32_t arg1) } } -uint32_t helper_subc(CPUSH4State *env, uint32_t arg0, uint32_t arg1) -{ - uint32_t tmp0, tmp1; - - tmp1 = arg1 - arg0; - tmp0 = arg1; - arg1 = tmp1 - (env->sr & SR_T); - if (tmp0 < tmp1) - env->sr |= SR_T; - else - env->sr &= ~SR_T; - if (tmp1 < arg1) - env->sr |= SR_T; - return arg1; -} - uint32_t helper_subv(CPUSH4State *env, uint32_t arg0, uint32_t arg1) { int32_t dest, src, ans; |