From f6f547fb6241cdc80d26fee772f7afd31ab909ea Mon Sep 17 00:00:00 2001 From: Alexander Richardson Date: Tue, 13 Aug 2024 01:05:52 -0700 Subject: [PATCH] arch-arm: Fix incorrect behaviour of VFNMS and VFNMA (#1420) This was found while comparing a diverging execution against QEMU traces and checking for the first mismatched program counter. Fortunately this was caused by a branch shortly after this incorrect computation but still took a long time to track down. There are two issues here: the decoder had inverted the cases for *S and *A, and the sign bit was wrong for VFN*. --- src/arch/arm/isa/formats/fp.isa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/arm/isa/formats/fp.isa b/src/arch/arm/isa/formats/fp.isa index eac2ba0e4a..c8508e16e1 100644 --- a/src/arch/arm/isa/formats/fp.isa +++ b/src/arch/arm/isa/formats/fp.isa @@ -2725,7 +2725,7 @@ let {{ } break; case 0x9: - if ((opc3 & 0x1) == 0) { + if (bits(machInst, 6) == 1) { if (single) { return decodeVfpRegRegRegOp( machInst, vd, vn, vm, false);