public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Xtensa Patch]: Delete UNREACHABLE_MAX_WIDTH
@ 2010-02-05 18:55 Sterling Augustine
  0 siblings, 0 replies; only message in thread
From: Sterling Augustine @ 2010-02-05 18:55 UTC (permalink / raw)
  To: binutils

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

The attached patch removes UNREACHABLE_MAX_WIDTH and replaces it with 
xtensa_fetch_width, which consumes less memory and no longer uses a 
hard-coded and overly conservative value.

Sterling

2010-02-05  Sterling Augustine  <sterling@tensilica.com>

	* config/tc-xtensa.c (UNREACHABLE_MAX_WIDTH): Delete and
	replace with...
	(xtensa_fetch_width) ...this.

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1964 bytes --]

Index: tc-xtensa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.118
diff -u -p -r1.118 tc-xtensa.c
--- tc-xtensa.c	11 Dec 2009 13:42:11 -0000	1.118
+++ tc-xtensa.c	5 Feb 2010 18:51:44 -0000
@@ -75,9 +75,6 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
 bfd_boolean density_supported = XCHAL_HAVE_DENSITY;
 bfd_boolean absolute_literals_supported = XSHAL_USE_ABSOLUTE_LITERALS;
 
-/* Maximum width we would pad an unreachable frag to get alignment.  */
-#define UNREACHABLE_MAX_WIDTH  8
-
 static vliw_insn cur_vinsn;
 
 unsigned xtensa_num_pipe_stages;
@@ -7120,7 +7117,7 @@ xg_assemble_vliw_tokens (vliw_insn *vins
 	{
 	  gas_assert (finish_frag);
 	  frag_var (rs_machine_dependent,
-		    UNREACHABLE_MAX_WIDTH, UNREACHABLE_MAX_WIDTH,
+		    xtensa_fetch_width, xtensa_fetch_width,
 		    RELAX_UNREACHABLE,
 		    frag_now->fr_symbol, frag_now->fr_offset, NULL);
 	  xtensa_set_frag_assembly_state (frag_now);
@@ -7129,7 +7126,7 @@ xg_assemble_vliw_tokens (vliw_insn *vins
 	{
 	  gas_assert (finish_frag);
 	  frag_var (rs_machine_dependent,
-		    UNREACHABLE_MAX_WIDTH, UNREACHABLE_MAX_WIDTH,
+		    xtensa_fetch_width, xtensa_fetch_width,
 		    RELAX_MAYBE_UNREACHABLE,
 		    frag_now->fr_symbol, frag_now->fr_offset, NULL);
 	  xtensa_set_frag_assembly_state (frag_now);
@@ -8941,7 +8938,7 @@ future_alignment_required (fragS *fragP,
 	{
 	  if (this_frag->fr_subtype == RELAX_UNREACHABLE)
 	    {
-	      gas_assert (opt_diff <= UNREACHABLE_MAX_WIDTH);
+	      gas_assert (opt_diff <= (signed) xtensa_fetch_width);
 	      return opt_diff;
 	    }
 	  return 0;
@@ -9023,7 +9020,8 @@ bytes_to_stretch (fragS *this_frag,
 {
   int bytes_short = desired_diff - num_widens;
 
-  gas_assert (desired_diff >= 0 && desired_diff < 8);
+  gas_assert (desired_diff >= 0 
+	      && desired_diff < (signed) xtensa_fetch_width);
   if (desired_diff == 0)
     return 0;
 

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

only message in thread, other threads:[~2010-02-05 18:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-05 18:55 [Xtensa Patch]: Delete UNREACHABLE_MAX_WIDTH Sterling Augustine

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