[Gc] GC updates for 64-bit Darwin 8/OSX 10.4

Andrew Begel abegel at cs.berkeley.edu
Thu May 12 18:03:41 PDT 2005


Ok, feel free to change it back to POWERPC. I heard that the assembly  
code in powerpc_mach_dep.s is going away in gc 7.0 anyway?

Andrew


On May 12, 2005, at 5:55 PM, Boehm, Hans wrote:

> Andrew -
>
> I agree that it doesn't actually make a lot of difference in this
> case.  However, beyond consistency with IA64, SPARC, MIPS, S390,
> and perhaps others, I just noticed that AIX also does it the
> other way.  That currently uses architecture RS6000, for historical
> reasons, but I think we agree that it should become POWERPC.
> I think that discrepancy would be really unfortunate.  (And
> for most of those platforms, the current solution is a clear
> win, I think.)
>
> As I said, I can change this, if you want.
>
> Hans
>
>
>> -----Original Message-----
>> From: Andrew Begel [mailto:abegel at cs.berkeley.edu]
>> Sent: Thursday, May 12, 2005 5:44 PM
>> To: Boehm, Hans
>> Cc: gc at linux.hpl.hp.com
>> Subject: Re: [Gc] GC updates for 64-bit Darwin 8/OSX 10.4
>>
>>
>> ppc_thread_state_t is defined in /usr/include/mach/ppc/
>> thread_status.h, and there's one defined for 32-bit
>> (ppc_thread_state_t) and one defined for 64-bit threads
>> (ppc_thread_state64_t). Apparently someone thought it was important
>> to be able to access both kinds of thread states at the same time.
>> The kernel certainly needs it. Likewise with PPC_EXCEPTION_STATE --
>> both 32-bit and 64-bit structures are available at the same time in
>> the header files, with different names.
>>
>> There are quite a few differences between 64-bit POWERPC and 32-bit
>> POWERPC in darwin_stop_world.c, the assembly code in
>> powerpc_darwin_mach_dep.s needs to be different and that's included
>> by macro in the Makefile. I hadn't built that file yet, but it was
>> going to have a different name referring to its 64-bit ness.
>>
>> In most of the places that POWERPC_64 is used, there really are
>> differences in code used that would be obsfucated by relying on a
>> CPP_WORDSZ macro.
>>
>> Andrew
>>
>> On May 12, 2005, at 5:26 PM, Boehm, Hans wrote:
>>
>>
>>> Thanks.
>>>
>>> I think I would prefer to only use POWERPC as the macro identifying
>>> the architecture, and then to split that were necessary on
>>>
>> CPP_WORDSZ.
>>
>>> That's generally the approach that I've tried to follow on other
>>> architectures with a similar ABI distinction (e.g. SPARC
>>>
>> and IA64).
>>
>>> It avoids conditionals in places where it actually doesn't matter.
>>> (I'm surprised about the distinction between ppc_thread_state_t and
>>> ppc_thread_state64_t. Why isn't ppc_thread_state_t just defined
>>> differently for the 64-bit ABI?)
>>>
>>> (X86_64 is handled differently, both because I386 seemed
>>> inappropriate, and because the ABIs differ a lot, beyond
>>>
>> just 64-bit
>>
>>> vs. 32-bit issues.)
>>>
>>> If you want, I can try to make this transformation, since it seems
>>> rather mechanical, or you can send me another patch.
>>>
>>> Hans
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: Andrew Begel [mailto:abegel at cs.berkeley.edu]
>>>> Sent: Thursday, May 05, 2005 5:52 PM
>>>> To: Boehm, Hans
>>>> Cc: gc at linux.hpl.hp.com
>>>> Subject: Re: [Gc] GC updates for 64-bit Darwin 8/OSX 10.4
>>>>
>>>>
>>>> On May 4, 2005, at 5:28 PM, Boehm, Hans wrote:
>>>>
>>>>
>>>>
>>>>> Thanks.
>>>>>
>>>>> I added this to my source trees.  It presumably also needs
>>>>>
>>>>>
>>>> gcconfig.h
>>>>
>>>>
>>>>> patches to work.  At least ALIGNMENT would need to be 8 and
>>>>>
>>>>>
>>>> CPP_WORDSZ
>>>>
>>>>
>>>>> 64?
>>>>>
>>>>>
>>>>
>>>> Looks like there's quite a bit more work to do. Here's
>>>>
>> another diff
>>
>>>> to handle more things. I think powerpc_darwin_mach_dep.s
>>>>
>> needs to be
>>
>>>> customized to work in a 64-bit environment too, but I haven't done
>>>> that.
>>>>
>>>> I've updated the POWERPC machine type to be more discriminatory:
>>>> POWERPC and POWERPC_64. This is better than my previous usage of
>>>> __ppc__ and __ppc64__ which are gcc-specific.
>>>>
>>>> All these changes are untested, unfortunately. :) I've got
>>>>
>> access to
>>
>>>> a G5 but not one running MacOSX 10.4.
>>>>
>>>> Andy
>>>>
>>>>
>>>>
>>>>>
>>>>> Hans
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: gc-bounces at napali.hpl.hp.com
>>>>>> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Andrew Begel
>>>>>> Sent: Sunday, May 01, 2005 12:28 AM
>>>>>> To: 'gc at linux.hpl.hp.com'
>>>>>> Subject: [Gc] GC updates for 64-bit Darwin 8/OSX 10.4
>>>>>>
>>>>>>
>>>>>> This patch should fix darwin_stop_world.c for 64-bit
>>>>>>
>>>>>>
>>>> Darwin/OSX. It
>>>>
>>>>
>>>>>> is also compatible with 32-bit with no code changes. I
>>>>>>
>>>>>>
>>>> haven't tested
>>>>
>>>>
>>>>>> it yet, not having a G5 handy, but according to Apple's
>>>>>>
>> developer
>>
>>>>>> docs, it should work.
>>>>>>
>>>>>> Andrew
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Gc mailing list
>>>>> Gc at linux.hpl.hp.com
>>>>> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>



More information about the Gc mailing list