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: Kumar Gala <kumar dot gala at motorola dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: 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 21:38:51 -0600
- Subject: Re: [TESTCASE] Minimized testcase for AltiVec segfault
>> VRSAVE is useful for ABIs which allocate registers in order (ie MacOS)
>> such that one can mark the last used register and save/restore to that
>> point. Otherwise it seems rather painful to manage/update vrsave in
>> one's
>> code (for SVR4 style register allocation).
>
> ahh, that wasn't clear from the specs
I'm not sure why its not made more clear. My guess is that the guys who
came up with it knew about the register allocation in-order on MacOS and
the Apple guys know about it and took it for granted.
>> If GCC is managing VRSAVE when -mabi=altivec then I think there should
>> be
>> another flag to disable the use of VRSAVE. It tends to be a waste of
>> time
>> to manage as well as hard to use for determining which regs to save by
>> the
>> context code.
>
> in which case... you are correct. we should add a flag to not set
> vrsave.
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).
- kumar