_get_previous_fp broken on bsd with llvm-gcc

Christian Thalinger christian.thalinger at oracle.com
Thu Feb 2 09:31:59 PST 2012


On Feb 2, 2012, at 6:03 PM, Daniel D. Daugherty wrote:

> You will likely see the fix more quickly if you push it yourself
> into hotspot-comp.
> 
> Going thru hotspot-rt would mean waiting for hotspot-rt -> hotspot-main
> and then getting it on the next sync from hotspot-main -> hotspot-comp.
> Since it is already Thursday, I don't think the fix would make this
> week's hotspot-rt -> hotspot-main push so it wouldn't be in hotspot-main
> until sometime next week...
> 
> Please put me on the interest list for the bug.

7142167: MAC: _get_previous_fp broken on bsd with llvm-gcc

-- Chris

> 
> Dan
> 
> 
> On 2/2/12 9:10 AM, Christian Thalinger wrote:
>> While working on a bug on my Mac I noticed that _get_previous_fp is broken with LLVM-GCC.  The GCC version I am currently using is:
>> 
>> gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
>> 
>> The fix is to use the __clang__ implementation (as is the case for os::current_stack_pointer):
>> 
>> diff --git a/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp b/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
>> --- a/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
>> +++ b/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
>> @@ -362,7 +362,7 @@ frame os::get_sender_for_C_frame(frame*
>>  }
>> 
>>  intptr_t* _get_previous_fp() {
>> -#if defined(SPARC_WORKS) || defined(__clang__)
>> +#if defined(SPARC_WORKS) || defined(__clang__) || defined(__llvm__)
>>    register intptr_t **ebp;
>>    __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp));
>>  #else
>> 
>> Can someone of you guys fix this or should I file a bug and push it into hotspot-comp?
>> 
>> -- Chris



More information about the hotspot-runtime-dev mailing list