Skip to contentSkip to conversation

target/arm: Check for dp support for dp VFM, not sp

PATCH In review Peter Maydell 2 participants 3 messages Jun 17, 2019 – Jun 18, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/arm: Check for dp support for dp VFM, not sp

In commit 1120827fa182f0e7622 we accidentally put the "UNDEF unless FPU has double-precision support" check in the single-precision VFM function. Put it in the dp function where it belongs.

---
I just merged the pullreq with 1120827fa182f0e7622 an hour ago and then I spotted this bug in it...

 target/arm/translate-vfp.inc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
target/arm/translate-vfp.inc.c +4 -4
index 348173d6026..deaddb04421 100644
@@ -1771,10 +1771,6 @@ static bool trans_VFM_sp(DisasContext *s, arg_VFM_sp *a)
         return false;
     }
 
-    if (!dc_isar_feature(aa32_fpdp, s)) {
-        return false;
-    }
-
     if (!vfp_access_check(s)) {
         return true;
     }
@@ -1838,6 +1834,10 @@ static bool trans_VFM_dp(DisasContext *s, arg_VFM_dp *a)
         return false;
     }
 
+    if (!dc_isar_feature(aa32_fpdp, s)) {
+        return false;
+    }
+
     if (!vfp_access_check(s)) {
         return true;
     }
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Peter Maydell

In commit 1120827fa182f0e7622 we accidentally put the "UNDEF unless FPU has double-precision support" check in the single-precision VFM function. Put it in the dp function where it belongs.

Quoted 7 lines

---
I just merged the pullreq with 1120827fa182f0e7622 an hour ago and then I spotted this bug in it...

 target/arm/translate-vfp.inc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Oops.

r~

author Applied
#2 lore raw
Quoted 12 lines · Richard Henderson
Quoted 10 lines · Peter Maydell

In commit 1120827fa182f0e7622 we accidentally put the "UNDEF unless FPU has double-precision support" check in the single-precision VFM function. Put it in the dp function where it belongs.

---
I just merged the pullreq with 1120827fa182f0e7622 an hour ago and then I spotted this bug in it...

Quoted 6 lines
Quoted 2 lines
 target/arm/translate-vfp.inc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Oops.

Applied to master, given it was a silly regression.

-- PMM