PowerPC nops
authorAlan Modra <amodra@gmail.com>
Tue, 25 Jun 2019 00:42:58 +0000 (10:12 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 25 Jun 2019 03:34:40 +0000 (13:04 +0930)
commit22f72c4868a1fd55d8d9b1cbabe6e01ed5a6f072
tree223bd6f1f60e5fc1ecada40c17aa4c1084d39d54
parent2e7c439dec066ac8a597d0b85193b8d3ec8e09eb
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.
gas/ChangeLog
gas/config/tc-ppc.c
gas/config/tc-ppc.h
gas/testsuite/gas/ppc/groupnop.d [new file with mode: 0644]
gas/testsuite/gas/ppc/groupnop.s [new file with mode: 0644]
gas/testsuite/gas/ppc/ppc.exp