This is the mail archive of the 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

Aldy Hernandez <> 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 <> <>

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