This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] final.c max_skip without p2align


	I would like to apply the max_skip limit to jump alignments on
targets without p2align support by using the instruction address directly,
as implemented by the following patch.

David


        * final.c (shorten_branches): Apply max_skip to alignment on
        targets without p2align support.

Index: final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.275
diff -c -p -r1.275 final.c
*** final.c	25 Jan 2003 23:32:20 -0000	1.275
--- final.c	20 Feb 2003 18:13:57 -0000
*************** shorten_branches (first)
*** 987,993 ****
--- 987,1001 ----
  	    {
  	      int align = 1 << log;
  	      int new_address = (insn_current_address + align - 1) & -align;
+ #ifndef ASM_OUTPUT_MAX_SKIP_ALIGN
+ 	      if ((new_address - insn_current_address)
+ 		  <= LABEL_TO_MAX_SKIP (insn))
+ 		insn_lengths[uid] = new_address - insn_current_address;
+ 	      else
+ 		LABEL_TO_ALIGNMENT (insn) = 0;
+ #else
  	      insn_lengths[uid] = new_address - insn_current_address;
+ #endif
  	    }
  	}
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]