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 Wednesday, February 27, 2002, at 09:40 PM, Aldy Hernandez wrote:
> On Thursday, February 28, 2002, at 02:49  PM, Dale Johannesen wrote:
>> 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 function.
>> 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 before
>> 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 
>> responsible
>> for saving/restoring whichever Vregs are indicated by VRsave, i.e. it is 
>> expected
>> to be up to date (or overly conservative) all the time.  When 
>> non-Altivec code
>> is running, VRsave will be 0, which means there's no save/restore 
>> overhead.
>
> in other words, it works exactly the same as for all the other ppc
> variants? :-)

Well, yes, but he did ask.


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