United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7009231 C1: Incorrect CAS code for longs on SPARC 32bit
7009231 : C1: Incorrect CAS code for longs on SPARC 32bit

Details
Type:
Bug
Submit Date:
2010-12-28
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
solaris
Sub-Component:
compiler
CPU:
sparc
Priority:
P2
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
hs20

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
The attached test fails.
Reproducible with: java -ea -client Test4

                                    

Comments
SUGGESTED FIX

Add xcc to icc conversion when generating cas on longs in 32bit. Note that we can't use brx in cmove instead because brx generates br in 32bit.
Also, propagate the type of comparison to cmove to generate proper code in 64bit.
                                     
2010-12-28
EVALUATION

On 32bit sparc we use the casx instruction and then cmp to compare new and old value. Note that in this case cmp does a 64bit compare. It is followed by cmove the generates a br instruction, which uses only icc.

Also, this behavior of cmove is incorrect in 64bit, because we always miss upper 32bits.
                                     
2010-12-28
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/037c727f35fb
                                     
2010-12-28



Hardware and Software, Engineered to Work Together