• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisióndc58915f3af581f32d575acd37e0cfe047c7990b (tree)
Tiempo2015-05-14 01:25:52
AutorMax Filippov <jcmvbkbc@gmai...>
CommiterMax Filippov

Log Message

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.

Cambiar Resumen

Diferencia incremental

--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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+
16 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
27
38 * configure.tgt (arch): Set to iamcu for i386-*-elfiamcu target.
--- 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)
90719071
90729072 trampaddr = fragP->fr_address + fragP->fr_fix;
90739073
9074- if ((addr + J_RANGE < trampaddr) ||
9075- abs (addr - trampaddr) < J_RANGE / 2)
9074+ if (addr + J_RANGE < trampaddr)
90769075 continue;
90779076 if (addr > trampaddr + J_RANGE)
90789077 break;
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,7 @@
1+2015-05-13 Max Filippov <jcmvbkbc@gmail.com>
2+
3+ * gas/xtensa/trampoline.s: Add regression testcase.
4+
15 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
26
37 * gas/i386/i386.exp: Run iamcu-1, iamcu-2, iamcu-3, iamcu-inval-1,
--- a/gas/testsuite/gas/xtensa/trampoline.s
+++ b/gas/testsuite/gas/xtensa/trampoline.s
@@ -26,3 +26,13 @@
2626 .endr
2727 4:
2828 j 4b
29+
30+5:
31+ j 6f
32+
33+ .rep 43691
34+ _nop
35+ .endr
36+
37+6:
38+ j 5b