* [PATCH] xtensa: fix gas trampolines regression
@ 2015-05-09 23:53 Max Filippov
2015-05-13 15:27 ` Nicholas Clifton
0 siblings, 1 reply; 3+ messages in thread
From: Max Filippov @ 2015-05-09 23:53 UTC (permalink / raw)
To: binutils
Cc: Sterling Augustine, David Weatherford, Marc Gauthier,
linux-xtensa, Max Filippov
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-10 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.
---
gas/config/tc-xtensa.c | 3 +--
gas/testsuite/gas/xtensa/trampoline.s | 10 ++++++++++
2 files changed, 11 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;
diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s
index 4465786..3cfbe97 100644
--- a/gas/testsuite/gas/xtensa/trampoline.s
+++ b/gas/testsuite/gas/xtensa/trampoline.s
@@ -26,3 +26,13 @@
.endr
4:
j 4b
+
+5:
+ j 6f
+
+ .rep 43691
+ _nop
+ .endr
+
+6:
+ j 5b
--
1.8.1.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xtensa: fix gas trampolines regression
2015-05-09 23:53 [PATCH] xtensa: fix gas trampolines regression Max Filippov
@ 2015-05-13 15:27 ` Nicholas Clifton
2015-05-13 16:28 ` Max Filippov
0 siblings, 1 reply; 3+ messages in thread
From: Nicholas Clifton @ 2015-05-13 15:27 UTC (permalink / raw)
To: Max Filippov, binutils
Cc: Sterling Augustine, David Weatherford, Marc Gauthier, linux-xtensa
Hi Max,
> 2015-05-10 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.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xtensa: fix gas trampolines regression
2015-05-13 15:27 ` Nicholas Clifton
@ 2015-05-13 16:28 ` Max Filippov
0 siblings, 0 replies; 3+ messages in thread
From: Max Filippov @ 2015-05-13 16:28 UTC (permalink / raw)
To: Nicholas Clifton
Cc: binutils, Sterling Augustine, David Weatherford, Marc Gauthier,
linux-xtensa
On Wed, May 13, 2015 at 6:27 PM, Nicholas Clifton <nickc@redhat.com> wrote:
> Hi Max,
>
>> 2015-05-10 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.
>
>
> Approved - please apply.
Thanks! Checked in.
-- Max
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-13 16:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-09 23:53 [PATCH] xtensa: fix gas trampolines regression Max Filippov
2015-05-13 15:27 ` Nicholas Clifton
2015-05-13 16:28 ` Max Filippov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).