]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target/ppc: Fix xxspltib
authorAnton Blanchard <anton@ozlabs.org>
Wed, 8 May 2019 20:17:33 +0000 (06:17 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 29 May 2019 01:39:44 +0000 (11:39 +1000)
xxspltib raises a VMX or a VSX exception depending on the register
set it is operating on. We had a check, but it was backwards.

Fixes: f113283525a4 ("target-ppc: add xxspltib instruction")
Signed-off-by: Anton Blanchard <anton@ozlabs.org>
Message-Id: <20190509061713.69490488@kryten>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/translate/vsx-impl.inc.c

index d29f60e2f91ada0b535410ce634584bb7170a882..4b8f6cefe3c07e1f85de24023914a46e67bf4a07 100644 (file)
@@ -1355,13 +1355,13 @@ static void gen_xxspltib(DisasContext *ctx)
     int rt = xT(ctx->opcode);
 
     if (rt < 32) {
-        if (unlikely(!ctx->altivec_enabled)) {
-            gen_exception(ctx, POWERPC_EXCP_VPU);
+        if (unlikely(!ctx->vsx_enabled)) {
+            gen_exception(ctx, POWERPC_EXCP_VSXU);
             return;
         }
     } else {
-        if (unlikely(!ctx->vsx_enabled)) {
-            gen_exception(ctx, POWERPC_EXCP_VSXU);
+        if (unlikely(!ctx->altivec_enabled)) {
+            gen_exception(ctx, POWERPC_EXCP_VPU);
             return;
         }
     }