This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [TESTCASE] Minimized testcase for AltiVec segfault



On Thursday, February 28, 2002, at 10:39  AM, Kumar Gala wrote:

>> how about vrsave?  surely you need vrsave to be set properly, otherwise
>> the OS will not save your vector registers on a context-switch.
>
> Does -mabi=altivec cause VRSAVE to be updated?.  On Linux, VRSAVE is not

yes

> used by the OS to determine which registers to save (all vr regs are 
> saved
> on a context switch).

hmm, when i first started coding, i talked to a few linux kernel hackers
and no one was able to tell me wether linux used vrsave or not.
should've talked to the ppc maintainer ;-)

> 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.

> 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.

ahhhctually, i motion we get rid of -mabi=altivec and have -maltivec
imply an abi enhancement.  unless geoff/david or someone else can
think of a reason not to.

--
Aldy Hernandez                                E-mail: aldyh@redhat.com
Professional Gypsy Lost in Australia
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]