From 3977ba3078503fca0f182aa8a39fad2388f43cb1 Mon Sep 17 00:00:00 2001 From: Taylor Simpson Date: Wed, 9 Feb 2022 18:15:54 -0800 Subject: Hexagon (target/hexagon) fix bug in conv_df2uw_chop Fix typo that checked for 32 bit nan instead of 64 bit Test case added in tests/tcg/hexagon/usr.c Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-11-tsimpson@quicinc.com> Reviewed-by: Richard Henderson --- target/hexagon/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/hexagon') diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c index 366caf9..63e5ad5 100644 --- a/target/hexagon/op_helper.c +++ b/target/hexagon/op_helper.c @@ -829,7 +829,7 @@ uint32_t HELPER(conv_df2uw_chop)(CPUHexagonState *env, float64 RssV) uint32_t RdV; arch_fpop_start(env); /* Hexagon checks the sign before rounding */ - if (float64_is_neg(RssV) && !float32_is_any_nan(RssV)) { + if (float64_is_neg(RssV) && !float64_is_any_nan(RssV)) { float_raise(float_flag_invalid, &env->fp_status); RdV = 0; } else { -- cgit v1.1