bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/15602] .word L2-L1 fails to diagnose offsets larger than 16 bit


From: mikpe at it dot uu.se
Subject: [Bug gas/15602] .word L2-L1 fails to diagnose offsets larger than 16 bits, resulting in broken jump tables on m68k
Date: Wed, 12 Jun 2013 17:10:30 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=15602

--- Comment #5 from Mikael Pettersson <mikpe at it dot uu.se> ---
Nick,

Your patch works for me, with the following adjustment:

--- binutils-2.23.52/gas/config/tc-m68k.c.~1~   2013-06-12 18:06:35.983916253
+0200
+++ binutils-2.23.52/gas/config/tc-m68k.c       2013-06-12 18:17:24.643575581
+0200
@@ -8141,7 +8141,7 @@ tc_m68k_frame_initial_instructions (void
 void
 tc_m68k_check_adjusted_broken_word (addressT new_offset, struct broken_word
*brokwP)
 {
-  if (new_offset > 0xffff)
+  if (new_offset > 0x7fff)
     as_bad_where (brokwP->frag->fr_file, brokwP->frag->fr_line,
                  _("Adjusted signed .word (%#lx) overflows: `switch'-statement
too large."),
                  (long) new_offset);

since, as Andreas wrote, the offsets are signed and must fit in [0,32K-1].

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]