diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2011-03-11 08:12:23 +0000 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2011-04-03 17:19:38 +0200 |
commit | 0e3261098ff41c40ce3381b8ad7cff330458da3d (patch) | |
tree | 6f255ed260c0fb1cfba9c6fce0fc5d3058a24842 /target-arm/translate.c | |
parent | c7498daea76948128c1298d78fe9e7e618b5ff7c (diff) | |
download | qemu-0e3261098ff41c40ce3381b8ad7cff330458da3d.zip qemu-0e3261098ff41c40ce3381b8ad7cff330458da3d.tar.gz qemu-0e3261098ff41c40ce3381b8ad7cff330458da3d.tar.bz2 |
target-arm: Fix VCLE.F32 #0, VCLT.F32 #0 NaN handling
Implementing the floating-point versions of VCLE #0 and VCLT #0 by
doing a GT comparison and inverting the result gives the wrong
result if the input is a NaN. Implement as a GT comparison with the
operands swapped instead.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-arm/translate.c')
-rw-r--r-- | target-arm/translate.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/target-arm/translate.c b/target-arm/translate.c index 39512bc..33417e6 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -5677,25 +5677,31 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn) gen_neon_rsb(size, tmp, tmp2); tcg_temp_free(tmp2); break; - case 24: case 27: /* Float VCGT #0, Float VCLE #0 */ + case 24: /* Float VCGT #0 */ tmp2 = tcg_const_i32(0); gen_helper_neon_cgt_f32(tmp, tmp, tmp2); tcg_temp_free(tmp2); - if (op == 27) - tcg_gen_not_i32(tmp, tmp); break; - case 25: case 28: /* Float VCGE #0, Float VCLT #0 */ + case 25: /* Float VCGE #0 */ tmp2 = tcg_const_i32(0); gen_helper_neon_cge_f32(tmp, tmp, tmp2); tcg_temp_free(tmp2); - if (op == 28) - tcg_gen_not_i32(tmp, tmp); break; case 26: /* Float VCEQ #0 */ tmp2 = tcg_const_i32(0); gen_helper_neon_ceq_f32(tmp, tmp, tmp2); tcg_temp_free(tmp2); break; + case 27: /* Float VCLE #0 */ + tmp2 = tcg_const_i32(0); + gen_helper_neon_cge_f32(tmp, tmp2, tmp); + tcg_temp_free(tmp2); + break; + case 28: /* Float VCLT #0 */ + tmp2 = tcg_const_i32(0); + gen_helper_neon_cgt_f32(tmp, tmp2, tmp); + tcg_temp_free(tmp2); + break; case 30: /* Float VABS */ gen_vfp_abs(0); break; |