From: Jeffrey A Law <law@redhat.com>
To: Alan Modra <alan@linuxcare.com.au>
Cc: Richard Henderson <rth@redhat.com>,
John David Anglin <dave@hiauly1.hia.nrc.ca>,
gcc-patches@gcc.gnu.org, parisc-linux@puffin.external.hp.com
Subject: Re: Oust HPPA PIC_OFFSET_TABLE_REGNUM_SAVED
Date: Wed, 17 Jan 2001 09:09:11 -0700 [thread overview]
Message-ID: <23954.979747751@upchuck.cygnus.com> (raw)
In-Reply-To: Your message of Wed, 17 Jan 2001 18:24:49 +1100. <Pine.LNX.4.21.0101171802240.9957-100000@front.linuxcare.com.au>
In message <Pine.LNX.4.21.0101171802240.9957-100000@front.linuxcare.com.au>yo
u write:
> What I was trying to do here is test whether the pseudo has been allocated
> a register, or the case where register pressure causes it to spill to a
> stack slot.
But the code in question is executed during insn expansion time -- long long
before we know anything about whether or not a particular pseudo register
will be allocated to a hard register or stack slot.
> There seemed to be three cases:
> - register isn't used so appears as a pseudo
> - register is allocated a hard reg
> - register is allocated a stack slot
But I can't see how the final two cases could happen at that stage in
compilation. If you actually saw these under the debugger, I'd like you to
investigate them further since I don't believe they can/should happen.
[ Note that I'm not convinced the old check to avoid the restore was
correct either. ]
> > I think we should just emit the insn unconditionally unless you're aware
> > of some reason we can't shouldn't.
>
> That causes an error when no dlt save register is needed - prologue
> instruction would be deleted.
If we emit a call, then we must reload the PIC register. There's no iffs
ands or butts about it. If that's causing aborts/warnings, then we've likely
got a bug _elsewhere_. It's entirely possible that getting the use on the
return insn will fix that problem.
> > We're probably also going to need to emit a use of the %r19 and maybe %r2
> 7
> > on the return insns to ensure the pic register is restored after the
> > final call in any given function.
>
> I've a "use" in the epilogue in my tree. Hadn't posted that patch as I
> wasn't sure it's correct in the face of tail calls.
We can't perform tail calls when we're generating PIC code right now
(right now PIC == code suitable for shared library on the PA). Consider
linkage issues.
What makes this interesting is that we don't need/want the use on the trivial
return, but we do want it on the return_internal pattern. Furthermore, the
register we want to use varies depending on PA32 vs PA64 ABIs.
I've got a patch which handles that stuff in my local tree that I'm testing
right now.
jeff
next prev parent reply other threads:[~2001-01-17 16:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.21.0101151238510.21322-100000@front.linuxcare.com.au>
2001-01-15 11:09 ` [parisc-linux] Oust HPPA PIC_OFFSET_TABLE_REGNUM_SAVED Alan Modra
2001-01-15 16:24 ` John David Anglin
2001-01-15 16:38 ` Jeffrey A Law
2001-01-15 23:17 ` Alan Modra
2001-01-15 17:46 ` Jeffrey A Law
2001-01-15 23:07 ` Alan Modra
2001-01-16 1:20 ` Alan Modra
2001-01-16 5:53 ` Richard Henderson
2001-01-16 9:28 ` Alan Modra
2001-01-17 3:23 ` John David Anglin
2001-01-17 3:54 ` John David Anglin
2001-01-17 5:26 ` Jeffrey A Law
2001-01-17 5:30 ` Jeffrey A Law
2001-01-17 5:59 ` John David Anglin
2001-01-17 7:24 ` Alan Modra
2001-01-17 16:09 ` Jeffrey A Law [this message]
2001-01-17 16:22 ` John David Anglin
2001-01-17 21:42 ` Jeffrey A Law
2001-01-17 22:20 ` John David Anglin
2001-01-18 6:04 ` John David Anglin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=23954.979747751@upchuck.cygnus.com \
--to=law@redhat.com \
--cc=alan@linuxcare.com.au \
--cc=dave@hiauly1.hia.nrc.ca \
--cc=gcc-patches@gcc.gnu.org \
--cc=parisc-linux@puffin.external.hp.com \
--cc=rth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.