From 1e147242d73161d840f7cee0acd2819fee6a99e5 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 4 Apr 1994 16:42:16 +0000 Subject: [PATCH] * 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. --- gas/ChangeLog | 7 +++++++ gas/config/tc-ppc.c | 18 ++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 9255c57cc48..369d394f8cc 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 57f63def1b6..a9471456c19 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; -- 2.30.2