public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Xtensa] fix GAS to avoid incorrect MOVI relaxations
@ 2006-04-15  0:53 Bob Wilson
  0 siblings, 0 replies; only message in thread
From: Bob Wilson @ 2006-04-15  0:53 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 607 bytes --]

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.

[-- Attachment #2: no-transform.diff --]
[-- Type: text/x-patch, Size: 778 bytes --]

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))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-15  0:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-15  0:53 [Xtensa] fix GAS to avoid incorrect MOVI relaxations Bob Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).