This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [TESTCASE] Minimized testcase for AltiVec segfault
- From: Dale Johannesen <dalej at apple dot com>
- To: Kumar Gala <kumar dot gala at motorola dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, Aldy Hernandez <aldyh at redhat dot com>, Daniel Egger <degger at fhm dot edu>, GCC Developer Mailinglist <gcc at gcc dot gnu dot org>, David Edelsohn <dje at watson dot ibm dot com>, Geoff Keating <geoffk at geoffk dot org>
- Date: Wed, 27 Feb 2002 19:49:13 -0800
- Subject: Re: [TESTCASE] Minimized testcase for AltiVec segfault
On Wednesday, February 27, 2002, at 07:38 PM, Kumar Gala wrote:
> That would be good (on LinuxPPC the default should be for vrsave to be
> disabled). I am not sure how register allocation is handled on
> darwin/MacOS-X ABI. Maybe one of the Apple guys can pipe up, Stan? My
> guess would be that it does not differ much from how it is handled on
> MacOS. (I could be wrong).
The usual lreg/greg algorithms are used; it's not necessarily in any order.
By prologue/epilogue generation time we know which Vregs were used in the
function.
If needed, the old value of VRsave is saved on the stack and VRsave is
ORed with
a mask indicating which regs are used in the function. This must be done
before
any Vreg is actually used. At epilogue the old VRsave is restored, and
this must
be after all Vreg uses. Interrupt handlers, context switch, etc. are
responsible
for saving/restoring whichever Vregs are indicated by VRsave, i.e. it is
expected
to be up to date (or overly conservative) all the time. When non-Altivec
code
is running, VRsave will be 0, which means there's no save/restore overhead.