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: Geoff Keating <geoffk at geoffk dot org>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 27 Feb 2002 17:38:20 -0800
- Subject: Re: [TESTCASE] Minimized testcase for AltiVec segfault
- References: <9BE91334-2BD9-11D6-87D4-000393750C1E@redhat.com>
Aldy Hernandez <aldyh@redhat.com> writes:
> >> i think -maltivec without the abi changes is there for somebody who
> >> *really* knows what s/he's doing, has everything aligned properly, and
> >> wants to have a function callable from non altivec compiled functions.
> >
> > That would be me! I know what I'm doing, have no intention to pass
> > vector arguments or use varargs.
>
> how about local variables? there are some magic alignment rules
> that are keyed off of abi=altivec. ... especially the stack boundary.
>
> how about vrsave? surely you need vrsave to be set properly, otherwise
> the OS will not save your vector registers on a context-switch.
>
> how about the prologue and epilogue? the altivec registers won't be
> saved/restored unless abi=altivec.
All these indicate bugs that should be fixed. I expect most of the
bugs are that TARGET_ALTIVEC_ABI was used when it should have been
either TARGET_ALTIVEC or nothing.
> some call used registers being altivec?
If !TARGET_ALTIVEC_ABI, all altivec registers are call-clobbered.
> i guess you could use all global variables, and have the OS
> save/restore all vector registers on a context switch (slooow).
>
> these are just a few of the things that came up while poking around
> the code (search for TARGET_ALTIVEC_ABI).
>
> perhaps this needs to be readressed and having -maltivec imply an
> abi change^Wenhancement. i for one, wouldn't mind getting
> rid of -mabi=altivec, but i believe geoff wanted it that way.
No, -maltivec should not change the ABI. It should allow using
altivec as much as possible with the current ABI.
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>