diff options
Diffstat (limited to 'gas/config/tc-ppc.c')
-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 |