aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-11-18 12:42:52 +0000
committerAlan Modra <amodra@gmail.com>2009-11-18 12:42:52 +0000
commit2d0f3896005097776f6bd807c7df97bbb6c99dd9 (patch)
tree4e9d68141118e584e1ae02cb080a8ed3d2773091 /gas
parent8cddccd3f191a62607325235ffd55cb37c1120bf (diff)
downloadgdb-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')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-ppc.c11
2 files changed, 14 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index deb12a4..15092c4 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-18 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-ppc.c (md_assemble): Report error on invalid @tls operands
+ and opcode.
+
2009-11-17 Sebastian Pop <sebastian.pop@amd.com>
Quentin Neill <quentin.neill@amd.com>
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