United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7142167 MAC: _get_previous_fp broken on bsd with llvm-gcc
JDK-7142167 : MAC: _get_previous_fp broken on bsd with llvm-gcc

Details
Type:
Bug
Submit Date:
2012-02-02
Status:
Closed
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
2012-02-11
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:
hs23 (b15)

Related Reports
Backport:
Backport:

Sub Tasks

Description
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)

                                    

Comments
EVALUATION

The fix is to use the __clang__ implementation (as is the case for os::current_stack_pointer).
                                     
2012-02-02
SUGGESTED FIX

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
                                     
2012-02-02
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/5e9fba4e8718
                                     
2012-02-07
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/5e9fba4e8718
                                     
2012-02-18
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/5e9fba4e8718
                                     
2012-03-22



Hardware and Software, Engineered to Work Together