* [committed] Use branch with link register for jump from thunk
@ 2014-08-11 19:24 John David Anglin
2014-08-11 19:58 ` John David Anglin
0 siblings, 1 reply; 2+ messages in thread
From: John David Anglin @ 2014-08-11 19:24 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 559 bytes --]
With a large function, the 'b' branch may not be able to reach its
target without a long branch stub. Gas doesn't provide
a long branch stub for a branch without a link register (i.e., it
considers branches with link registers calls). This patch
changes pa_asm_output_mi_thunk() to use a bl branch so the linker will
provide a long branch stub if needed.
Tested on hppa-unknown-linux-gnu, hppa2.0w-hp-hpux11.11 and hppa64-hp-
hpux11.11 with no observed regressions.
Committed to trunk, 4.9 and 4.8.
Dave
--
John David Anglin dave.anglin@bell.net
[-- Attachment #2: pa.c.d.txt --]
[-- Type: text/plain, Size: 667 bytes --]
2014-08-11 John Dave Anglin <danglin@gcc.gnu.org>
PR target/62038
* config/pa/pa.c (pa_asm_output_mi_thunk): Use a branch with %r31 link
register.
Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c (revision 213683)
+++ config/pa/pa.c (working copy)
@@ -8285,7 +8287,9 @@
if (!val_14)
output_asm_insn ("addil L'%2,%%r26", xoperands);
- output_asm_insn ("b %0", xoperands);
+ /* An absolute branch without a link register is not considered
+ a call by GAS. We need a call to get a stub if necessary. */
+ output_asm_insn ("bl %0,%%r31", xoperands);
if (val_14)
{
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [committed] Use branch with link register for jump from thunk
2014-08-11 19:24 [committed] Use branch with link register for jump from thunk John David Anglin
@ 2014-08-11 19:58 ` John David Anglin
0 siblings, 0 replies; 2+ messages in thread
From: John David Anglin @ 2014-08-11 19:58 UTC (permalink / raw)
To: John David Anglin; +Cc: GCC Patches
On 11-Aug-14, at 3:24 PM, John David Anglin wrote:
> Tested on hppa-unknown-linux-gnu, hppa2.0w-hp-hpux11.11 and hppa64-
> hp-hpux11.11 with no observed regressions.
> Committed to trunk, 4.9 and 4.8.
There is a problem...
Patch reverted.
Dave
--
John David Anglin dave.anglin@bell.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-11 19:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-11 19:24 [committed] Use branch with link register for jump from thunk John David Anglin
2014-08-11 19:58 ` John David Anglin
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).