diff options
author | Alan Modra <amodra@gmail.com> | 2020-05-11 09:24:14 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-05-11 21:08:36 +0930 |
commit | 7c1f42273567c30e17e1363897ce5c6d0764c643 (patch) | |
tree | d292ba50233ef50f1aa4bbba5e4cdd8f4ce38484 /bfd | |
parent | 73199c2b7a3cb81bd65778386c5b97b4f3b86534 (diff) | |
download | fsf-binutils-gdb-7c1f42273567c30e17e1363897ce5c6d0764c643.zip fsf-binutils-gdb-7c1f42273567c30e17e1363897ce5c6d0764c643.tar.gz fsf-binutils-gdb-7c1f42273567c30e17e1363897ce5c6d0764c643.tar.bz2 |
PowerPC Rename powerxx to power10
Now that ISA3.1 is out we can finish with the powerxx silliness.
bfd/
* elf64-ppc.c: Rename powerxx to power10 throughout.
gas/
* config/tc-ppc.c (md_assemble): Update for PPC_OPCODE_POWER10
renaming.
* testsuite/gas/ppc/prefix-align.d: Use -mpower10/-Mpower10 in
place of -mfuture/-Mfuture.
* testsuite/gas/ppc/prefix-pcrel.d: Likewise.
* testsuite/gas/ppc/prefix-reloc.d: Likewise.
gold/
* powerpc.cc: Rename powerxx to power10 throughout.
include/
* elf/ppc64.h: Update comment.
* opcode/ppc.h (PPC_OPCODE_POWER10): Rename from PPC_OPCODE_POWERXX.
ld/
* testsuite/ld-powerpc/callstub-1.d: Use -mpower10/-Mpower10 in
place of -mfuture/-Mfuture.
* testsuite/ld-powerpc/notoc2.d: Likewise.
* testsuite/ld-powerpc/powerpc.exp: Likewise.
* testsuite/ld-powerpc/tlsgd.d: Likewise.
* testsuite/ld-powerpc/tlsie.d: Likewise.
* testsuite/ld-powerpc/tlsld.d: Likewise.
opcodes/
* ppc-dis.c (ppc_opts): Add "power10" entry.
(print_insn_powerpc): Update for PPC_OPCODE_POWER10 renaming.
* ppc-opc.c (POWER10): Rename from POWERXX. Update all uses.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 52 |
2 files changed, 30 insertions, 26 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 38ff455..b99f437 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,9 @@ 2020-05-11 Alan Modra <amodra@gmail.com> + * elf64-ppc.c: Rename powerxx to power10 throughout. + +2020-05-11 Alan Modra <amodra@gmail.com> + PR 25961 * coffgen.c (coff_get_normalized_symtab): Check that buffer contains required number of auxents before processing any auxent. diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 53e5d91..ae4a4ba 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -2914,7 +2914,7 @@ must_be_dyn_reloc (struct bfd_link_info *info, . mtctr %r12 . bctr - There are also ELFv1 powerxx variants of these stubs. + There are also ELFv1 power10 variants of these stubs. ppc_stub_long_branch_notoc: . pla %r12,dest@pcrel . b dest @@ -2937,7 +2937,7 @@ must_be_dyn_reloc (struct bfd_link_info *info, In cases where the high instructions would add zero, they are omitted and following instructions modified in some cases. - For example, a powerxx ppc_stub_plt_call_notoc might simplify down + For example, a power10 ppc_stub_plt_call_notoc might simplify down to . pld %r12,xxx@pcrel . mtctr %r12 @@ -3238,8 +3238,8 @@ struct ppc_link_hash_table /* Whether calls are made via the PLT from NOTOC functions. */ unsigned int notoc_plt:1; - /* Whether to use powerxx instructions in linkage stubs. */ - unsigned int powerxx_stubs:1; + /* Whether to use power10 instructions in linkage stubs. */ + unsigned int power10_stubs:1; /* Incremented every time we size stubs. */ unsigned int stub_iteration; @@ -4604,7 +4604,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_PPC64_PLT_PCREL34: case R_PPC64_PLT_PCREL34_NOTOC: case R_PPC64_PCREL28: - htab->powerxx_stubs = 1; + htab->power10_stubs = 1; break; default: break; @@ -10597,7 +10597,7 @@ emit_relocs_for_offset (struct bfd_link_info *info, Elf_Internal_Rela *r, } static bfd_byte * -build_powerxx_offset (bfd *abfd, bfd_byte *p, bfd_vma off, int odd, +build_power10_offset (bfd *abfd, bfd_byte *p, bfd_vma off, int odd, bfd_boolean load) { uint64_t insn; @@ -10679,7 +10679,7 @@ build_powerxx_offset (bfd *abfd, bfd_byte *p, bfd_vma off, int odd, } static unsigned int -size_powerxx_offset (bfd_vma off, int odd) +size_power10_offset (bfd_vma off, int odd) { if (off - odd + (1ULL << 33) < 1ULL << 34) return odd + 8; @@ -10690,7 +10690,7 @@ size_powerxx_offset (bfd_vma off, int odd) } static unsigned int -num_relocs_for_powerxx_offset (bfd_vma off, int odd) +num_relocs_for_power10_offset (bfd_vma off, int odd) { if (off - odd + (1ULL << 33) < 1ULL << 34) return 1; @@ -10701,7 +10701,7 @@ num_relocs_for_powerxx_offset (bfd_vma off, int odd) } static Elf_Internal_Rela * -emit_relocs_for_powerxx_offset (struct bfd_link_info *info, +emit_relocs_for_power10_offset (struct bfd_link_info *info, Elf_Internal_Rela *r, bfd_vma roff, bfd_vma targ, bfd_vma off, int odd) { @@ -10813,14 +10813,14 @@ plt_stub_size (struct ppc_link_hash_table *htab, if (stub_entry->stub_type >= ppc_stub_plt_call_notoc) { - if (htab->powerxx_stubs) + if (htab->power10_stubs) { bfd_vma start = (stub_entry->stub_offset + stub_entry->group->stub_sec->output_offset + stub_entry->group->stub_sec->output_section->vma); if (stub_entry->stub_type > ppc_stub_plt_call_notoc) start += 4; - size = 8 + size_powerxx_offset (off, start & 4); + size = 8 + size_power10_offset (off, start & 4); } else size = 8 + size_offset (off - 8); @@ -11654,10 +11654,10 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) relp = p; num_rel = 0; - if (htab->powerxx_stubs) + if (htab->power10_stubs) { bfd_boolean load = stub_entry->stub_type >= ppc_stub_plt_call_notoc; - p = build_powerxx_offset (htab->params->stub_bfd, p, off, odd, load); + p = build_power10_offset (htab->params->stub_bfd, p, off, odd, load); } else { @@ -11693,8 +11693,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (info->emitrelocations) { bfd_vma roff = relp - stub_entry->group->stub_sec->contents; - if (htab->powerxx_stubs) - num_rel += num_relocs_for_powerxx_offset (off, odd); + if (htab->power10_stubs) + num_rel += num_relocs_for_power10_offset (off, odd); else { num_rel += num_relocs_for_offset (off); @@ -11703,8 +11703,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) r = get_relocs (stub_entry->group->stub_sec, num_rel); if (r == NULL) return FALSE; - if (htab->powerxx_stubs) - r = emit_relocs_for_powerxx_offset (info, r, roff, targ, off, odd); + if (htab->power10_stubs) + r = emit_relocs_for_power10_offset (info, r, roff, targ, off, odd); else r = emit_relocs_for_offset (info, r, roff, targ, off); if (stub_entry->stub_type == ppc_stub_long_branch_notoc @@ -11721,7 +11721,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) } } - if (!htab->powerxx_stubs + if (!htab->power10_stubs && htab->glink_eh_frame != NULL && htab->glink_eh_frame->size != 0) { @@ -12069,16 +12069,16 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (info->emitrelocations) { unsigned int num_rel; - if (htab->powerxx_stubs) - num_rel = num_relocs_for_powerxx_offset (off, odd); + if (htab->power10_stubs) + num_rel = num_relocs_for_power10_offset (off, odd); else num_rel = num_relocs_for_offset (off - 8); stub_entry->group->stub_sec->reloc_count += num_rel; stub_entry->group->stub_sec->flags |= SEC_RELOC; } - if (htab->powerxx_stubs) - extra = size_powerxx_offset (off, odd); + if (htab->power10_stubs) + extra = size_power10_offset (off, odd); else extra = size_offset (off - 8); /* Include branch insn plus those in the offset sequence. */ @@ -12088,7 +12088,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) calculated. */ off -= extra; - if (!htab->powerxx_stubs) + if (!htab->power10_stubs) { /* After the bcl, lr has been modified so we need to emit .eh_frame info saying the return address is in r12. */ @@ -12151,8 +12151,8 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (info->emitrelocations) { unsigned int num_rel; - if (htab->powerxx_stubs) - num_rel = num_relocs_for_powerxx_offset (off, odd); + if (htab->power10_stubs) + num_rel = num_relocs_for_power10_offset (off, odd); else num_rel = num_relocs_for_offset (off - 8); stub_entry->group->stub_sec->reloc_count += num_rel; @@ -12161,7 +12161,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) size = plt_stub_size (htab, stub_entry, off); - if (!htab->powerxx_stubs) + if (!htab->power10_stubs) { /* After the bcl, lr has been modified so we need to emit .eh_frame info saying the return address is in r12. */ |