Merging BSDPort into HotSpot mainline

Landon Fuller landonf at plausible.coop
Wed Sep 14 14:24:13 PDT 2011


On Sep 14, 2011, at 4:54 PM, Tom Rodriguez wrote:

> 
> On Sep 14, 2011, at 1:39 PM, Landon Fuller wrote:
> 
>> 
>> On Sep 14, 2011, at 4:21 PM, Tom Rodriguez wrote:
>> 
>>>> 
>>>> 
>>>>> http://cr.openjdk.java.net/~never/7089790_bsd_vs_linux
>>>> 
>>>> src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp:
>>>> 
>>>> !         // HACK: si_code does not work on linux 2.2.12-20!!!
>>>> !         // HACK: si_code does not work on bsd 2.2.12-20!!!
>>> 
>>> I don't think I want to fix things like that.  They just make the code diverge.
>>> 
>>>> 
>>>> I doubt there is a bsd 2.2.12 kernel :-)  Seriously, I suppose si_code does work on BSD?
>> 
>> The s/linux/bsd/ issue aside, si_code is not set on SIGFPE for <= 10.6.
>> 
>> I believe this was fixed in 10.7, but the Apple guys can confirm (tracked by rdar://4428508 ?).
>> 
>>>> src/os_cpu/bsd_x86/vm/bsd_x86_32.s:
>>>> src/os_cpu/bsd_x86/vm/bsd_x86_64.s:
>>>> 
>>>> + #ifdef __APPLE__
>>>> +         .align  4
>>>> + #else
>>>>       .align  16
>>>> + #endif
>>>> 
>>>> Maybe we should use a ALIGN macro instead.
>>> 
>>> Maybe.  I'm not sure I even understand the purpose of the change.  It seems pretty spurious.
>> 
>> IIRC, Apple's assembler .align directive takes a power of two -- i.e., .align 4^2
> 
> Ok.  Why isn't it just using p2align which appears to have exactly the same meaning?

I don't see any reason not to use p2align. I believe the original intent (3+ years ago, my memory is hazy) was only to call out the Apple changes more explicitly.

>  And why is the second one needed since the next function starts with p2align 4?  

Ah -- I hadn't seen the context. Then yes, it's spurious. The duplicate may be a merge artifact, and other instances could simply be replaced.

> Why would BSD want 16^2 alignment anyway?

Apple is unique in its handling of .align.

Cheers,
-landonf



More information about the hotspot-dev mailing list