diff options
author | Andrew Jenner <andrew@codesourcery.com> | 2016-08-01 09:42:31 -0700 |
---|---|---|
committer | Andrew Jenner <andrew@codesourcery.com> | 2016-08-01 09:42:31 -0700 |
commit | dfdaec14b0db059497b47b515d753b6383772b6b (patch) | |
tree | 72366f1f5328fe6631d4727d2b82daa9e800c0df /bfd/elf32-ppc.c | |
parent | 751b375e01e7e85aeccdd965578cb2040836593d (diff) | |
download | fsf-binutils-gdb-dfdaec14b0db059497b47b515d753b6383772b6b.zip fsf-binutils-gdb-dfdaec14b0db059497b47b515d753b6383772b6b.tar.gz fsf-binutils-gdb-dfdaec14b0db059497b47b515d753b6383772b6b.tar.bz2 |
Fix some PowerPC VLE BFD issues and add some PowerPC VLE instructions.
bfd/
* elf32-ppc.c (is_branch_reloc): Recognise VLE branch relocations.
(ppc_elf_howto_raw): Fix dst_mask of R_PPC_VLE_REL15.
(ppc_elf_vle_split16): Clear field before inserting.
opcodes/
* ppc-opc.c (vle_opcodes): Alias 'e_cmpwi' to 'e_cmpi' and
'e_cmplwi' to 'e_cmpli' instead.
(OPVUPRT, OPVUPRT_MASK): Define.
(powerpc_opcodes): Add E200Z4 insns.
(vle_opcodes): Add context save/restore insns.
include/
* opcode/ppc.h (PPC_OPCODE_E200Z4): New define.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r-- | bfd/elf32-ppc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 81b3d84..8d5131a 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -1425,7 +1425,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = { "R_PPC_VLE_REL15", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ - 0xfe, /* dst_mask */ + 0xfffe, /* dst_mask */ TRUE), /* pcrel_offset */ /* A relative 24 bit branch. */ @@ -3948,7 +3948,8 @@ is_branch_reloc (enum elf_ppc_reloc_type r_type) || r_type == R_PPC_ADDR24 || r_type == R_PPC_ADDR14 || r_type == R_PPC_ADDR14_BRTAKEN - || r_type == R_PPC_ADDR14_BRNTAKEN); + || r_type == R_PPC_ADDR14_BRNTAKEN + || r_type == R_PPC_VLE_REL24); } static void @@ -4899,6 +4900,7 @@ ppc_elf_vle_split16 (bfd *output_bfd, bfd_byte *loc, insn = bfd_get_32 (output_bfd, loc); top5 = value & 0xf800; top5 = top5 << (split16_format == split16a_type ? 9 : 5); + insn &= (split16_format == split16a_type ? ~0x1f007ff : ~0x1f07ff); insn |= top5; insn |= value & 0x7ff; bfd_put_32 (output_bfd, insn, loc); |