GNU Binutils with patches for OS216
Revisión | dc58915f3af581f32d575acd37e0cfe047c7990b (tree) |
---|---|
Tiempo | 2015-05-14 01:25:52 |
Autor | Max Filippov <jcmvbkbc@gmai...> |
Commiter | Max Filippov |
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.
@@ -1,3 +1,8 @@ | ||
1 | +2015-05-13 Max Filippov <jcmvbkbc@gmail.com> | |
2 | + | |
3 | + * config/tc-xtensa.c (xtensa_relax_frag): Allow trampoline to be | |
4 | + closer than J_RANGE / 2 to jump frag. | |
5 | + | |
1 | 6 | 2015-05-11 H.J. Lu <hongjiu.lu@intel.com> |
2 | 7 | |
3 | 8 | * configure.tgt (arch): Set to iamcu for i386-*-elfiamcu target. |
@@ -9071,8 +9071,7 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) | ||
9071 | 9071 | |
9072 | 9072 | trampaddr = fragP->fr_address + fragP->fr_fix; |
9073 | 9073 | |
9074 | - if ((addr + J_RANGE < trampaddr) || | |
9075 | - abs (addr - trampaddr) < J_RANGE / 2) | |
9074 | + if (addr + J_RANGE < trampaddr) | |
9076 | 9075 | continue; |
9077 | 9076 | if (addr > trampaddr + J_RANGE) |
9078 | 9077 | break; |
@@ -1,3 +1,7 @@ | ||
1 | +2015-05-13 Max Filippov <jcmvbkbc@gmail.com> | |
2 | + | |
3 | + * gas/xtensa/trampoline.s: Add regression testcase. | |
4 | + | |
1 | 5 | 2015-05-11 H.J. Lu <hongjiu.lu@intel.com> |
2 | 6 | |
3 | 7 | * gas/i386/i386.exp: Run iamcu-1, iamcu-2, iamcu-3, iamcu-inval-1, |
@@ -26,3 +26,13 @@ | ||
26 | 26 | .endr |
27 | 27 | 4: |
28 | 28 | j 4b |
29 | + | |
30 | +5: | |
31 | + j 6f | |
32 | + | |
33 | + .rep 43691 | |
34 | + _nop | |
35 | + .endr | |
36 | + | |
37 | +6: | |
38 | + j 5b |