aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-04-04 16:42:16 +0000
committerIan Lance Taylor <ian@airs.com>1994-04-04 16:42:16 +0000
commit1e147242d73161d840f7cee0acd2819fee6a99e5 (patch)
tree3bc7fa3c847acb229a3b5f8990cb761764413d14
parent1f46bba3276eadac2108d002ad38a55e82224fbb (diff)
downloadgdb-1e147242d73161d840f7cee0acd2819fee6a99e5.zip
gdb-1e147242d73161d840f7cee0acd2819fee6a99e5.tar.gz
gdb-1e147242d73161d840f7cee0acd2819fee6a99e5.tar.bz2
* config/tc-ppc.c (ppc_size): New static variable.
(ppc_arch): Check for PPC_OPCODE_PPC before PPC_OPCODE_POWER. (md_begin): If an instruction has a size specific flag set, only add it if we are assembling that size.
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-ppc.c18
2 files changed, 19 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 9255c57..369d394 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+Mon Apr 4 12:39:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-ppc.c (ppc_size): New static variable.
+ (ppc_arch): Check for PPC_OPCODE_PPC before PPC_OPCODE_POWER.
+ (md_begin): If an instruction has a size specific flag set, only
+ add it if we are assembling that size.
+
Thu Mar 31 16:51:16 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* config/tc-sparc.c (tc_gen_reloc): Add a gruesome hack to get
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 57f63de..a947145 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -116,10 +116,14 @@ const pseudo_typeS md_pseudo_table[] =
/* Local variables. */
-/* The type of processor we are assembling for. This is one of the
- PPC_OPCODE flags defined in opcode/ppc.h. */
+/* The type of processor we are assembling for. This is one or more
+ of the PPC_OPCODE flags defined in opcode/ppc.h. */
static int ppc_cpu = 0;
+/* The size of the processor we are assembling for. This is either
+ PPC_OPCODE_32 or PPC_OPCODE_64. */
+static int ppc_size = PPC_OPCODE_32;
+
/* The endianness we are using. */
static int ppc_big_endian = PPC_BIG_ENDIAN;
@@ -284,10 +288,10 @@ ppc_arch ()
{
ppc_set_cpu ();
- if ((ppc_cpu & PPC_OPCODE_POWER) != 0)
- return bfd_arch_rs6000;
- else if ((ppc_cpu & PPC_OPCODE_PPC) != 0)
+ if ((ppc_cpu & PPC_OPCODE_PPC) != 0)
return bfd_arch_powerpc;
+ else if ((ppc_cpu & PPC_OPCODE_POWER) != 0)
+ return bfd_arch_rs6000;
else
abort ();
}
@@ -314,7 +318,9 @@ md_begin ()
{
know ((op->opcode & op->mask) == op->opcode);
- if ((op->flags & ppc_cpu) != 0)
+ if ((op->flags & ppc_cpu) != 0
+ && ((op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64)) == 0
+ || (op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64)) == ppc_size))
{
const char *retval;