The attached test fails.
Reproducible with: java -ea -client Test4
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.
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.