aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@codesourcery.com>2014-08-22 16:52:20 +0100
committerMaciej W. Rozycki <macro@codesourcery.com>2014-08-22 16:52:20 +0100
commitfbd940576f6c0891cebb4173f64968b7c50ed642 (patch)
tree1825bc914bffb212d3c1afff4f5cd5ac63df715c /gas
parent84919466a87f5ce10cc1af8ef51d7ab9ea66ff5e (diff)
downloadgdb-fbd940576f6c0891cebb4173f64968b7c50ed642.zip
gdb-fbd940576f6c0891cebb4173f64968b7c50ed642.tar.gz
gdb-fbd940576f6c0891cebb4173f64968b7c50ed642.tar.bz2
Power/GAS: Don't set VLE annotation for non-VLE processors/instructions
Only set the VLE flag if the instruction has been pulled via the VLE instruction set. This way the flag is guaranteed to be set for VLE-only instructions or for VLE-only processors, however it'll remain clear for dual-mode instructions on dual-mode and, more importantly, standard-mode processors. gas/ * config/tc-ppc.c (md_assemble): Only set the PPC_APUINFO_VLE flag if both the processor and opcode flags match. ld/testsuite/ * ld-powerpc/apuinfo-vle.rd: New test. * ld-powerpc/apuinfo-vle.s: New test source. * ld-powerpc/apuinfo.rd: Adjust according to GAS PPC_APUINFO_VLE handling change. * ld-powerpc/powerpc.exp: Run the new test.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-ppc.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6c4e6b8..b97523f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2014-08-22 Maciej W. Rozycki <macro@codesourcery.com>
+ * config/tc-ppc.c (md_assemble): Only set the PPC_APUINFO_VLE
+ flag if both the processor and opcode flags match.
+
+2014-08-22 Maciej W. Rozycki <macro@codesourcery.com>
+
* config/tc-arm.c (add_to_lit_pool): Preinitialize `imm1'.
2014-08-20 Maciej W. Rozycki <macro@codesourcery.com>
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index ff4ea64..189a22b 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -3369,7 +3369,12 @@ md_assemble (char *str)
ppc_apuinfo_section_add (PPC_APUINFO_CACHELCK, 1);
if (opcode->flags & PPC_OPCODE_RFMCI)
ppc_apuinfo_section_add (PPC_APUINFO_RFMCI, 1);
- if (opcode->flags & PPC_OPCODE_VLE)
+ /* Only set the VLE flag if the instruction has been pulled via
+ the VLE instruction set. This way the flag is guaranteed to
+ be set for VLE-only instructions or for VLE-only processors,
+ however it'll remain clear for dual-mode instructions on
+ dual-mode and, more importantly, standard-mode processors. */
+ if ((ppc_cpu & opcode->flags) == PPC_OPCODE_VLE)
ppc_apuinfo_section_add (PPC_APUINFO_VLE, 1);
}
#endif