aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ppc.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-06-25 10:12:58 +0930
committerAlan Modra <amodra@gmail.com>2019-06-25 13:04:40 +0930
commit22f72c4868a1fd55d8d9b1cbabe6e01ed5a6f072 (patch)
tree223bd6f1f60e5fc1ecada40c17aa4c1084d39d54 /gas/config/tc-ppc.h
parent2e7c439dec066ac8a597d0b85193b8d3ec8e09eb (diff)
downloadgdb-22f72c4868a1fd55d8d9b1cbabe6e01ed5a6f072.zip
gdb-22f72c4868a1fd55d8d9b1cbabe6e01ed5a6f072.tar.gz
gdb-22f72c4868a1fd55d8d9b1cbabe6e01ed5a6f072.tar.bz2
PowerPC nops
This patch corrects ppc rs_align_code handling to choose the alignment nops based on the machine in force at the alignment directive rather than the machine at the end of file. * config/tc-ppc.h (ppc_nop_select): Declare. (NOP_OPCODE): Define. * config/tc-ppc.c (ppc_elf_end, ppc_xcoff_end): Zero ppc_cpu. (ppc_nop_encoding_for_rs_align_code): New enum. (ppc_nop_select): New function. (ppc_handle_align): Don't use ppc_cpu here. Get nop type from frag. * testsuite/gas/ppc/groupnop.d, * testsuite/gas/ppc/groupnop.s: New test. * testsuite/gas/ppc/ppc.exp: Run it.
Diffstat (limited to 'gas/config/tc-ppc.h')
-rw-r--r--gas/config/tc-ppc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gas/config/tc-ppc.h b/gas/config/tc-ppc.h
index 9de5c08..2b18ecd 100644
--- a/gas/config/tc-ppc.h
+++ b/gas/config/tc-ppc.h
@@ -82,6 +82,9 @@ extern const char *ppc_target_format (void);
if ((FRAGP)->fr_type == rs_align_code) \
ppc_handle_align (FRAGP);
+extern unsigned int ppc_nop_select (void);
+#define NOP_OPCODE ppc_nop_select ()
+
extern void ppc_handle_align (struct frag *);
extern void ppc_frag_check (struct frag *);