[Qemu-devel] [PATCH] target/arm: Check for dp support for dp VFM, not sp

Peter Maydell posted 1 patch 6 years, 4 months ago
Test s390x passed
Test checkpatch passed
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190617160130.3207-1-peter.maydell@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>
target/arm/translate-vfp.inc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
[Qemu-devel] [PATCH] target/arm: Check for dp support for dp VFM, not sp
Posted by Peter Maydell 6 years, 4 months ago
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.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
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(-)

diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c
index 348173d6026..deaddb04421 100644
--- a/target/arm/translate-vfp.inc.c
+++ b/target/arm/translate-vfp.inc.c
@@ -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;
     }
-- 
2.20.1


Re: [Qemu-devel] [PATCH] target/arm: Check for dp support for dp VFM, not sp
Posted by Richard Henderson 6 years, 4 months ago
On 6/17/19 9:01 AM, Peter Maydell wrote:
> 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.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> 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.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

Re: [Qemu-devel] [PATCH] target/arm: Check for dp support for dp VFM, not sp
Posted by Peter Maydell 6 years, 4 months ago
On Mon, 17 Jun 2019 at 20:03, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 6/17/19 9:01 AM, Peter Maydell wrote:
> > 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.
> >
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> > ---
> > 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.
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

Applied to master, given it was a silly regression.

-- PMM