This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC/powerpc AltiVec expectations.
- From: Alex Rosenberg <alexr at spies dot com>
- To: Kumar Gala <kumar dot gala at motorola dot com>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, Matt Thomas <matt at 3am-software dot com>, Geoff Keating <geoffk at geoffk dot org>, egcs <gcc at gcc dot gnu dot org>
- Date: Tue, 02 Jul 2002 11:41:56 -0700
- Subject: Re: GCC/powerpc AltiVec expectations.
Mac OS X requires VRSAVE support.
Mac OS classic also does.
Neither has any specific rules about register allocation.
Since I wrote the classic Mac OS AltiVec register save and restore routines
used in the Nanokernel context switcher, the Thread Manager, the Process
Manager, and setjmp/longjmp, I can answer this authoritatively: it tests
VRSAVE by moving it into the CR and then has a series of branches that test
each bit (and they all are predicted with 100% accuracy).
Alex
on 7/2/02 11:48 AM, Kumar Gala at kumar.gala@motorola.com wrote:
> I am not sure if this is true on Mac OS X, but the Mac OS classic ABI
> allocates registers in numeric order if I remember correctly. Therefor
> its much easier to use VRSAVE to know from (0 to N) are used and (N+1 to
> 31) are not. In a SVR4 ABI the allocation is not as straight forwarded
> and thus the OS has to look at each bit position of VRSAVE to determine
> what to save and restore.
>
> - kumar
>
> On Tuesday, July 2, 2002, at 12:46 PM, Alex Rosenberg wrote:
>
>> on 7/2/02 10:32 AM, Aldy Hernandez at aldyh@redhat.com wrote:
>>
>>> On Tue, Jul 02, 2002 at 09:52:46AM -0700, Alex Rosenberg wrote:
>>>> on 7/2/02 7:43 AM, Aldy Hernandez at aldyh@redhat.com wrote:
>>>>
>>>>> vrsave generation is on by default in gcc, though since the minority
>>>>> OS need it, it should be switched to off.
>>>>
>>>> "Minority?"
>>>
>>> linux doesn't need it.
>>>
>>> i believe macos x doesn't need it.
>>
>> Mac OS X requires it.
+------------------------------------------------------------+
| Alexander M. Rosenberg <mailto:alexr@_spies.com> |
| Nobody cares what I say. Remove the underscore to mail me. |