diff options
author | Alan Modra <amodra@gmail.com> | 2009-11-18 12:42:52 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-11-18 12:42:52 +0000 |
commit | 2d0f3896005097776f6bd807c7df97bbb6c99dd9 (patch) | |
tree | 4e9d68141118e584e1ae02cb080a8ed3d2773091 /gas/config | |
parent | 8cddccd3f191a62607325235ffd55cb37c1120bf (diff) | |
download | gdb-2d0f3896005097776f6bd807c7df97bbb6c99dd9.zip gdb-2d0f3896005097776f6bd807c7df97bbb6c99dd9.tar.gz gdb-2d0f3896005097776f6bd807c7df97bbb6c99dd9.tar.bz2 |
bfd/
* bfd-in.h (_bfd_elf_ppc_at_tls_transform): Declare.
* bfd-in2.h: Regenerate.
* elf64-ppc.c (ppc64_elf_relocate_section): Move code for R_PPC64_TLS
insn optimisation to..
* elf32-ppc.c (_bfd_elf_ppc_at_tls_transform): ..here. New function.
(ppc_elf_relocate_section): Use it.
gas/
* config/tc-ppc.c (md_assemble): Report error on invalid @tls operands
and opcode.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-ppc.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 493bfe5..1d615e9 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -2732,8 +2732,15 @@ md_assemble (char *str) break; case BFD_RELOC_PPC_TLS: - insn = ppc_insert_operand (insn, operand, ppc_obj64 ? 13 : 2, - ppc_cpu, (char *) NULL, 0); + if (!_bfd_elf_ppc_at_tls_transform (opcode->opcode, 0)) + as_bad (_("@tls may not be used with \"%s\" operands"), + opcode->name); + else if (operand->shift != 11) + as_bad (_("@tls may only be used in last operand")); + else + insn = ppc_insert_operand (insn, operand, + ppc_obj64 ? 13 : 2, + ppc_cpu, (char *) NULL, 0); break; /* We'll only use the 32 (or 64) bit form of these relocations |