diff options
Diffstat (limited to 'target-arm/neon_helper.c')
-rw-r--r-- | target-arm/neon_helper.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c index 13752baf63..e23f2241c0 100644 --- a/target-arm/neon_helper.c +++ b/target-arm/neon_helper.c @@ -1776,6 +1776,28 @@ uint32_t HELPER(neon_qneg_s32)(CPUARMState *env, uint32_t x) return x; } +uint64_t HELPER(neon_qabs_s64)(CPUARMState *env, uint64_t x) +{ + if (x == SIGNBIT64) { + SET_QC(); + x = ~SIGNBIT64; + } else if ((int64_t)x < 0) { + x = -x; + } + return x; +} + +uint64_t HELPER(neon_qneg_s64)(CPUARMState *env, uint64_t x) +{ + if (x == SIGNBIT64) { + SET_QC(); + x = ~SIGNBIT64; + } else { + x = -x; + } + return x; +} + /* NEON Float helpers. */ uint32_t HELPER(neon_abd_f32)(uint32_t a, uint32_t b, void *fpstp) { |