diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2015-05-10 01:02:31 +0300 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2015-05-13 19:25:52 +0300 |
commit | dc58915f3af581f32d575acd37e0cfe047c7990b (patch) | |
tree | ca8a59e14822ea7f37be8a14a0bfa4992dd24f64 /gas/config/tc-xtensa.c | |
parent | 242cd84c933640b7cc82b9783d5ebb1d963e1c0d (diff) | |
download | gdb-dc58915f3af581f32d575acd37e0cfe047c7990b.zip gdb-dc58915f3af581f32d575acd37e0cfe047c7990b.tar.gz gdb-dc58915f3af581f32d575acd37e0cfe047c7990b.tar.bz2 |
xtensa: fix gas trampolines regression
Extra condition 'abs (addr - trampaddr) < J_RANGE / 2' for trampoline
selection results in regressions: when relaxable jump is little longer
than J_RANGE so that single trampoline makes two new jumps, one longer
than J_RANGE / 2 and one shorter, correct trampoline cannot be found.
Drop that condition.
2015-05-13 Max Filippov <jcmvbkbc@gmail.com>
gas/
* config/tc-xtensa.c (xtensa_relax_frag): Allow trampoline to be
closer than J_RANGE / 2 to jump frag.
gas/testsuite/
* gas/xtensa/trampoline.s: Add regression testcase.
Diffstat (limited to 'gas/config/tc-xtensa.c')
-rw-r--r-- | gas/config/tc-xtensa.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index b1827fa..31c0b6b 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -9071,8 +9071,7 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) trampaddr = fragP->fr_address + fragP->fr_fix; - if ((addr + J_RANGE < trampaddr) || - abs (addr - trampaddr) < J_RANGE / 2) + if (addr + J_RANGE < trampaddr) continue; if (addr > trampaddr + J_RANGE) break; |