diff options
author | Aurelien Jarno | 2012-10-05 16:04:44 +0200 |
---|---|---|
committer | Peter Maydell | 2012-10-05 16:04:44 +0200 |
commit | 72485ec4f63d86c428f9223fc966bd7d2cc8100c (patch) | |
tree | 7496948a3221bc95b15733b99c883b64b9138f2d /target-arm/op_helper.c | |
parent | target-arm: use globals for CC flags (diff) | |
download | qemu-72485ec4f63d86c428f9223fc966bd7d2cc8100c.tar.gz qemu-72485ec4f63d86c428f9223fc966bd7d2cc8100c.tar.xz qemu-72485ec4f63d86c428f9223fc966bd7d2cc8100c.zip |
target-arm: convert add_cc and sub_cc helpers to TCG
Now that the setcond TCG op is available, it's possible to replace
add_cc and sub_cc helpers by TCG code. The code generated by TCG is
actually very close to the one generated by GCC for the helper, and
this avoid all the consequences of using an helper: globals saved back
to memory, no possible optimization, call overhead, etc.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/op_helper.c')
-rw-r--r-- | target-arm/op_helper.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index f13fc3ae57..6095f2435c 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -323,16 +323,6 @@ uint64_t HELPER(get_cp_reg64)(CPUARMState *env, void *rip) The only way to do that in TCG is a conditional branch, which clobbers all our temporaries. For now implement these as helper functions. */ -uint32_t HELPER (add_cc)(CPUARMState *env, uint32_t a, uint32_t b) -{ - uint32_t result; - result = a + b; - env->NF = env->ZF = result; - env->CF = result < a; - env->VF = (a ^ b ^ -1) & (a ^ result); - return result; -} - uint32_t HELPER(adc_cc)(CPUARMState *env, uint32_t a, uint32_t b) { uint32_t result; @@ -348,16 +338,6 @@ uint32_t HELPER(adc_cc)(CPUARMState *env, uint32_t a, uint32_t b) return result; } -uint32_t HELPER(sub_cc)(CPUARMState *env, uint32_t a, uint32_t b) -{ - uint32_t result; - result = a - b; - env->NF = env->ZF = result; - env->CF = a >= b; - env->VF = (a ^ b) & (a ^ result); - return result; -} - uint32_t HELPER(sbc_cc)(CPUARMState *env, uint32_t a, uint32_t b) { uint32_t result; |