This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

small followup to recent Xtensa patch


Fix a minor glitch in one of my recent changes: if the section alignment
is smaller than the size of a branch target instruction, the assembler
was failing.  Committed on the mainline and 2.16 branches.

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

        * config/tc-xtensa.c (get_aligned_diff): Handle target_size
larger
        than the section alignment.
Index: tc-xtensa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.32
diff -u -p -r1.32 tc-xtensa.c
--- tc-xtensa.c	14 Apr 2005 22:38:49 -0000	1.32
+++ tc-xtensa.c	15 Apr 2005 00:14:10 -0000
@@ -8190,6 +8190,9 @@ get_aligned_diff (fragS *fragP, addressT
 	target_size = 3;
       align_power = branch_align_power (now_seg);
       branch_align = 1 << align_power;
+      /* Don't count on the section alignment being as large as the target.  */
+      if (target_size > branch_align)
+	target_size = branch_align;
       opt_diff = get_text_align_fill_size (address, align_power,
 					   target_size, FALSE, FALSE);
 

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