aboutsummaryrefslogtreecommitdiff
path: root/target-arm/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-arm/helper.c')
-rw-r--r--target-arm/helper.c29
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)