aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ppc.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-09-04 12:37:30 +0000
committerNick Clifton <nickc@redhat.com>2002-09-04 12:37:30 +0000
commit341026c1c143611e52a7bae351f7a886a8cc19a3 (patch)
tree401859e50461a84ccd30240e29acb2b5cc1f9f11 /gas/config/tc-ppc.c
parent07dd56a969469ac5b6669b0fbb390019196d2992 (diff)
downloadfsf-binutils-gdb-341026c1c143611e52a7bae351f7a886a8cc19a3.zip
fsf-binutils-gdb-341026c1c143611e52a7bae351f7a886a8cc19a3.tar.gz
fsf-binutils-gdb-341026c1c143611e52a7bae351f7a886a8cc19a3.tar.bz2
Do not insert non-BookE32 instructions into the hash table if the target cpu
is the BookE32. (case 107575)
Diffstat (limited to 'gas/config/tc-ppc.c')
-rw-r--r--gas/config/tc-ppc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index b19e04d..b7679f9 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -1207,6 +1207,14 @@ md_begin ()
|| ((op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64))
== (ppc_cpu & (PPC_OPCODE_32 | PPC_OPCODE_64)))
|| (ppc_cpu & PPC_OPCODE_64_BRIDGE) != 0)
+ /* Certain instructions (eg: extsw) do not exist in the
+ 32-bit BookE instruction set, but they do exist in the
+ 64-bit BookE instruction set, and other PPC instruction
+ sets. Check to see if the opcode has the BOOKE64 flag set.
+ If it does make sure that the target CPU is not the BookE32. */
+ && ((op->flags & PPC_OPCODE_BOOKE64) == 0
+ || (ppc_cpu & PPC_OPCODE_BOOKE64) == PPC_OPCODE_BOOKE64
+ || (ppc_cpu & PPC_OPCODE_BOOKE) == 0)
&& ((op->flags & (PPC_OPCODE_POWER4 | PPC_OPCODE_NOPOWER4)) == 0
|| ((op->flags & PPC_OPCODE_POWER4)
== (ppc_cpu & PPC_OPCODE_POWER4))))