United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6463272 GCC 4 java_md.c compile-time error: "PIC register ???%ebx??? clobbered in ???asm???"
JDK-6463272 : GCC 4 java_md.c compile-time error: "PIC register ???%ebx??? clobbered in ???asm???"

Details
Type:
Bug
Submit Date:
2006-08-23
Status:
Closed
Updated Date:
2011-05-17
Project Name:
JDK
Resolved Date:
2011-05-17
Component:
tools
OS:
linux
Sub-Component:
launcher
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

Description
GCC 4 compile-time error: "PIC register ???%ebx??? clobbered in ???asm???" in file
   j2se/src/solaris/bin/java_md.c, line 1119.
To fix it, comment out ""%ebx"," in line 1140. Not sure this is the right fix, needs investigation.
See http://blogs.sun.com/roller/page/navi?entry=try_this_at_home_building for details.

                                    

Comments
SUGGESTED FIX

Kelly's suggested fix is to remove ebx from the clobbers section.
This is fine since ebx is manually protected by storing it before
calling cpuid and restoring it afterwards.

Notice that there may be a bug in the code just above the affected
code in the 64 bit case.  However, I'm not sure if ebx/rbx is reserved
in this case or if gcc will automatically save the contents of the
registion (which it doesn't in the 32 bit case).
                                     
2006-08-24
EVALUATION

Seems like an important fix to get into place 9allowing GCC4 and Debian builds to succeed), this change is being reviewed.
                                     
2006-08-24
SUGGESTED FIX

######### File: ./java_md.c
######### (cd . && sccs diffs  -w -s -b java_md.c)

------- java_md.c -------
1140c1140
<                     "%eax", "%ebx", "%ecx", "%edx"
---
>                     "%eax", "%ecx", "%edx"
                                     
2006-08-24



Hardware and Software, Engineered to Work Together