summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Bergner <bergner@vnet.ibm.com>2017-03-08 20:49:03 -0600
committerAlan Modra <amodra@gmail.com>2017-03-09 19:12:12 +1030
commitb5d3ac25628b1a16409a9816623c34a45377d400 (patch)
tree857263271259ec90c099feeac061e8704a4e4b94
parentea5189f99474364e6f0d066e5da2960e56596e4b (diff)
downloadbinutils-gdb-binutils-2_27-branch.tar.gz
Update -maltivec and -mvsx options to only enable their oldest instructions.binutils-2_27-branch
Currently, the -maltivec and -mvsx GAS options enable *all* of the altivec and vsx instructions respecitively that have ever been added. This is in constract to GCC's -maltivec and -mvsx options, which only enable the oldest (ie, first) set of altivec and vsx instructions. This patch changes GAS to mimic GCC's behaviour with respect to -maltivec and -mvsx and it solves a problem with trying to assemble the lxvx instruction which is different between POWER8 and POWER9. opcodes/ * ppc-dis.c (ppc_opts) <altivec>: Do not use PPC_OPCODE_ALTIVEC2; <vsx>: Do not use PPC_OPCODE_VSX3; gas/ * testsuite/gas/ppc/altivec2.d (as): Use the -mpower8 option. (objdump): Use the -Mpower8 option.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/testsuite/gas/ppc/altivec2.d4
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/ppc-dis.c4
4 files changed, 14 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 9ee859838d8..a786f299902 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-08 Peter Bergner <bergner@vnet.ibm.com>
+
+ * testsuite/gas/ppc/altivec2.d (as): Use the -mpower8 option.
+ (objdump): Use the -Mpower8 option.
+
2017-03-09 Alan Modra <amodra@gmail.com>
Apply from master
diff --git a/gas/testsuite/gas/ppc/altivec2.d b/gas/testsuite/gas/ppc/altivec2.d
index fc10fb5a2e4..26f9afa9a8c 100644
--- a/gas/testsuite/gas/ppc/altivec2.d
+++ b/gas/testsuite/gas/ppc/altivec2.d
@@ -1,5 +1,5 @@
-#as: -maltivec
-#objdump: -dr -Maltivec
+#as: -mpower8
+#objdump: -dr -Mpower8
#name: Altivec ISA 2.07 instructions
.*
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 9cd7249e238..e5917d4ef3b 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,10 @@
2017-03-08 Peter Bergner <bergner@vnet.ibm.com>
+ * ppc-dis.c (ppc_opts) <altivec>: Do not use PPC_OPCODE_ALTIVEC2;
+ <vsx>: Do not use PPC_OPCODE_VSX3;
+
+2017-03-08 Peter Bergner <bergner@vnet.ibm.com>
+
Apply from master.
2017-03-08 Peter Bergner <bergner@vnet.ibm.com>
* ppc-opc.c (powerpc_opcodes) <lnia>: New extended mnemonic.
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index 77a2a60643b..e7a59b3a243 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -93,7 +93,7 @@ struct ppc_mopt ppc_opts[] = {
| PPC_OPCODE_A2),
0 },
{ "altivec", PPC_OPCODE_PPC,
- PPC_OPCODE_ALTIVEC | PPC_OPCODE_ALTIVEC2 },
+ PPC_OPCODE_ALTIVEC },
{ "any", 0,
PPC_OPCODE_ANY },
{ "booke", PPC_OPCODE_PPC | PPC_OPCODE_BOOKE,
@@ -216,7 +216,7 @@ struct ppc_mopt ppc_opts[] = {
| PPC_OPCODE_E500),
PPC_OPCODE_VLE },
{ "vsx", PPC_OPCODE_PPC,
- PPC_OPCODE_VSX | PPC_OPCODE_VSX3 },
+ PPC_OPCODE_VSX },
{ "htm", PPC_OPCODE_PPC,
PPC_OPCODE_HTM },
};