This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Xtensa] fix GAS to avoid incorrect MOVI relaxations
- From: Bob Wilson <bwilson at tensilica dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 14 Apr 2006 17:08:44 -0700
- Subject: [Xtensa] fix GAS to avoid incorrect MOVI relaxations
Assembler relaxations for Xtensa can be disabled with a no-transform directive
or by prefixing an opcode name with an underscore. This patch fixes a
special-case relaxation for MOVI opcodes where these flags were not being
checked. If a MOVI instruction needs to be relaxed but is not allowed to be
transformed, the assembler will now correctly report an error. Tested with an
xtensa-elf target and committed on mainline.
2006-04-14 Sterling Augustine <sterling@tensilica.com>
* config/tc-xtensa.c (emit_single_op): Do not relax MOVI
instructions when such transformations have been disabled.
Index: config/tc-xtensa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.62
diff -u -p -r1.62 tc-xtensa.c
--- config/tc-xtensa.c 10 Apr 2006 19:00:31 -0000 1.62
+++ config/tc-xtensa.c 14 Apr 2006 23:55:12 -0000
@@ -6573,7 +6573,8 @@ emit_single_op (TInsn *orig_insn)
|| orig_insn->opcode == xtensa_movi_n_opcode)
&& !cur_vinsn.inside_bundle
&& (orig_insn->tok[1].X_op == O_symbol
- || orig_insn->tok[1].X_op == O_pltrel))
+ || orig_insn->tok[1].X_op == O_pltrel)
+ && !orig_insn->is_specific_opcode && use_transform ())
xg_assembly_relax (&istack, orig_insn, now_seg, frag_now, 0, 1, 0);
else
if (xg_expand_assembly_insn (&istack, orig_insn))