diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-31 03:48:30 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-31 03:48:30 +0000 |
commit | ad69471ce5e1284e1cacd053bb0fe8d6175a2f9e (patch) | |
tree | e08c27563249192bff9d3f7edb8d74f11281ee89 /target-arm/helper.c | |
parent | 8f8e3aa45185dbb99a25edee384a18ca3d931132 (diff) |
ARM TCG conversion 14/16.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4151 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-arm/helper.c')
-rw-r--r-- | target-arm/helper.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c index 48cd6c8925..a2dd7b15dc 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -256,30 +256,6 @@ void cpu_arm_close(CPUARMState *env) free(env); } -/* Polynomial multiplication is like integer multiplcation except the - partial products are XORed, not added. */ -uint32_t helper_neon_mul_p8(uint32_t op1, uint32_t op2) -{ - uint32_t mask; - uint32_t result; - result = 0; - while (op1) { - mask = 0; - if (op1 & 1) - mask |= 0xff; - if (op1 & (1 << 8)) - mask |= (0xff << 8); - if (op1 & (1 << 16)) - mask |= (0xff << 16); - if (op1 & (1 << 24)) - mask |= (0xff << 24); - result ^= op2 & mask; - op1 = (op1 >> 1) & 0x7f7f7f7f; - op2 = (op2 << 1) & 0xfefefefe; - } - return result; -} - uint32_t cpsr_read(CPUARMState *env) { int ZF; @@ -376,6 +352,11 @@ uint32_t HELPER(rbit)(uint32_t x) return x; } +uint32_t HELPER(abs)(uint32_t x) +{ + return ((int32_t)x < 0) ? -x : x; +} + #if defined(CONFIG_USER_ONLY) void do_interrupt (CPUState *env) |