|
|
c5e576 |
From: Aurelien Jarno <aurelien@aurel32.net>
|
|
|
c5e576 |
Date: Sun, 13 Sep 2015 23:03:45 +0200
|
|
|
cf8819 |
Subject: [PATCH] target-ppc: fix xscmpodp and xscmpudp decoding
|
|
|
c5e576 |
|
|
|
c5e576 |
The xscmpodp and xscmpudp instructions only have the AX, BX bits in
|
|
|
c5e576 |
there encoding, the lowest bit (usually TX) is marked as an invalid
|
|
|
c5e576 |
bit. We therefore can't decode them with GEN_XX2FORM, which decodes
|
|
|
c5e576 |
the two lowest bit.
|
|
|
c5e576 |
|
|
|
c5e576 |
Introduce a new form GEN_XX2FORM, which decodes AX and BX and mark
|
|
|
c5e576 |
the lowest bit as invalid.
|
|
|
c5e576 |
|
|
|
c5e576 |
Cc: Tom Musta <tommusta@gmail.com>
|
|
|
c5e576 |
Cc: Alexander Graf <agraf@suse.de>
|
|
|
c5e576 |
Cc: qemu-stable@nongnu.org
|
|
|
c5e576 |
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
|
|
c5e576 |
---
|
|
|
c5e576 |
target-ppc/translate.c | 11 +++++++++--
|
|
|
c5e576 |
1 file changed, 9 insertions(+), 2 deletions(-)
|
|
|
c5e576 |
|
|
|
c5e576 |
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
|
|
|
c5e576 |
index 84c5cea..c0eed13 100644
|
|
|
c5e576 |
--- a/target-ppc/translate.c
|
|
|
c5e576 |
+++ b/target-ppc/translate.c
|
|
|
c5e576 |
@@ -10670,6 +10670,13 @@ GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 1, opc3, 0, PPC_NONE, fl2), \
|
|
|
c5e576 |
GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 2, opc3, 0, PPC_NONE, fl2), \
|
|
|
c5e576 |
GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 3, opc3, 0, PPC_NONE, fl2)
|
|
|
c5e576 |
|
|
|
c5e576 |
+#undef GEN_XX2IFORM
|
|
|
c5e576 |
+#define GEN_XX2IFORM(name, opc2, opc3, fl2) \
|
|
|
c5e576 |
+GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 0, opc3, 1, PPC_NONE, fl2), \
|
|
|
c5e576 |
+GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 1, opc3, 1, PPC_NONE, fl2), \
|
|
|
c5e576 |
+GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 2, opc3, 1, PPC_NONE, fl2), \
|
|
|
c5e576 |
+GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 3, opc3, 1, PPC_NONE, fl2)
|
|
|
c5e576 |
+
|
|
|
c5e576 |
#undef GEN_XX3_RC_FORM
|
|
|
c5e576 |
#define GEN_XX3_RC_FORM(name, opc2, opc3, fl2) \
|
|
|
c5e576 |
GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 0x00, opc3 | 0x00, 0, PPC_NONE, fl2), \
|
|
|
c5e576 |
@@ -10731,8 +10738,8 @@ GEN_XX3FORM(xsnmaddadp, 0x04, 0x14, PPC2_VSX),
|
|
|
c5e576 |
GEN_XX3FORM(xsnmaddmdp, 0x04, 0x15, PPC2_VSX),
|
|
|
c5e576 |
GEN_XX3FORM(xsnmsubadp, 0x04, 0x16, PPC2_VSX),
|
|
|
c5e576 |
GEN_XX3FORM(xsnmsubmdp, 0x04, 0x17, PPC2_VSX),
|
|
|
c5e576 |
-GEN_XX2FORM(xscmpodp, 0x0C, 0x05, PPC2_VSX),
|
|
|
c5e576 |
-GEN_XX2FORM(xscmpudp, 0x0C, 0x04, PPC2_VSX),
|
|
|
c5e576 |
+GEN_XX2IFORM(xscmpodp, 0x0C, 0x05, PPC2_VSX),
|
|
|
c5e576 |
+GEN_XX2IFORM(xscmpudp, 0x0C, 0x04, PPC2_VSX),
|
|
|
c5e576 |
GEN_XX3FORM(xsmaxdp, 0x00, 0x14, PPC2_VSX),
|
|
|
c5e576 |
GEN_XX3FORM(xsmindp, 0x00, 0x15, PPC2_VSX),
|
|
|
c5e576 |
GEN_XX2FORM(xscvdpsp, 0x12, 0x10, PPC2_VSX),
|