public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* a few more Xtensa GAS fixes
@ 2005-05-13 18:15 Bob Wilson
  0 siblings, 0 replies; only message in thread
From: Bob Wilson @ 2005-05-13 18:15 UTC (permalink / raw)
  To: binutils

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

This patch clarifies a confusing error message and fixes an obscure problem in 
the Xtensa port that was exposed by an unrelated bug in Tensilica's code.  I 
don't know how to write a testcase that will show the problem.  Committed on the 
mainline.

2005-05-13  Sterling Augustine  <sterling@tensilica.com>
	    Bob Wilson  <bob.wilson@acm.org>

	* config/tc-xtensa.c (xtensa_insnbuf_set_operand): Clarify error
	message.
	(xtensa_mark_zcl_first_insns): Fix incorrect nesting of conditional
	for handling RELAX_CHECK_ALIGN_NEXT_OPCODE.


[-- Attachment #2: gas-fixes.patch --]
[-- Type: text/x-patch, Size: 1623 bytes --]

Index: config/tc-xtensa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.40
diff -u -p -r1.40 tc-xtensa.c
--- config/tc-xtensa.c	6 May 2005 21:27:47 -0000	1.40
+++ config/tc-xtensa.c	12 May 2005 03:48:59 -0000
@@ -2707,12 +2707,16 @@ xtensa_insnbuf_set_operand (xtensa_insnb
       if (xtensa_operand_is_PCrelative (xtensa_default_isa, opcode, operand)
 	  == 1)
 	as_bad_where ((char *) file, line,
-		      _("operand %u is out of range for '%s'"), value,
-		      xtensa_opcode_name (xtensa_default_isa, opcode));
+		      _("operand %d of '%s' has out of range value '%u'"), 
+		      operand + 1,
+		      xtensa_opcode_name (xtensa_default_isa, opcode),
+		      value);
       else
 	as_bad_where ((char *) file, line,
-		      _("operand %u is invalid for '%s'"), value,
-		      xtensa_opcode_name (xtensa_default_isa, opcode));
+		      _("operand %d of '%s' has invalid value '%u'"),
+		      operand + 1,
+		      xtensa_opcode_name (xtensa_default_isa, opcode),
+		      value);
       return;
     }
 
@@ -7135,11 +7139,9 @@ xtensa_mark_zcl_first_insns (void)
 	      /* Of course, sometimes (mostly for toy test cases) a
 		 zero-cost loop instruction is the last in a section.  */
 	      if (targ_frag)
-		{
-		  targ_frag->tc_frag_data.is_first_loop_insn = TRUE;
-		  if (fragP->fr_subtype == RELAX_CHECK_ALIGN_NEXT_OPCODE)
-		    frag_wane (fragP);
-		}
+		targ_frag->tc_frag_data.is_first_loop_insn = TRUE;
+	      if (fragP->fr_subtype == RELAX_CHECK_ALIGN_NEXT_OPCODE)
+		frag_wane (fragP);
 	    }
 	}
     }

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

only message in thread, other threads:[~2005-05-13 17:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-13 18:15 a few more Xtensa GAS fixes 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).