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

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 
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 
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 
for saving/restoring whichever Vregs are indicated by VRsave, i.e. it is 
to be up to date (or overly conservative) all the time.  When non-Altivec 
is running, VRsave will be 0, which means there's no save/restore overhead.

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