# HG changeset patch # User Bernhard Urban # Date 1383915154 -3600 # Node ID 7b457ecd18c304df14542ffafb735d50176cd6b5 # Parent b1e7e4ffead1e1c2b08fc338695a1ec3951c0a84 AMD64Assembler: remove useless option "Atomic" and make other options final as reference: bacdc1d5c21c removal of Atomic option in the hotspot assembler diff -r b1e7e4ffead1 -r 7b457ecd18c3 graal/com.oracle.graal.asm.amd64/src/com/oracle/graal/asm/amd64/AMD64AsmOptions.java --- a/graal/com.oracle.graal.asm.amd64/src/com/oracle/graal/asm/amd64/AMD64AsmOptions.java Fri Nov 08 13:52:00 2013 +0100 +++ b/graal/com.oracle.graal.asm.amd64/src/com/oracle/graal/asm/amd64/AMD64AsmOptions.java Fri Nov 08 13:52:34 2013 +0100 @@ -23,11 +23,9 @@ package com.oracle.graal.asm.amd64; public class AMD64AsmOptions { - - public static int Atomics = 0; - public static boolean UseNormalNop = false; - public static boolean UseAddressNop = true; - public static boolean UseIncDec = true; - public static boolean UseXmmLoadAndClearUpper = true; - public static boolean UseXmmRegToRegMoveAll = true; + public static final boolean UseNormalNop = false; + public static final boolean UseAddressNop = true; + public static final boolean UseIncDec = true; + public static final boolean UseXmmLoadAndClearUpper = true; + public static final boolean UseXmmRegToRegMoveAll = true; } diff -r b1e7e4ffead1 -r 7b457ecd18c3 graal/com.oracle.graal.asm.amd64/src/com/oracle/graal/asm/amd64/AMD64Assembler.java --- a/graal/com.oracle.graal.asm.amd64/src/com/oracle/graal/asm/amd64/AMD64Assembler.java Fri Nov 08 13:52:00 2013 +0100 +++ b/graal/com.oracle.graal.asm.amd64/src/com/oracle/graal/asm/amd64/AMD64Assembler.java Fri Nov 08 13:52:34 2013 +0100 @@ -524,26 +524,10 @@ // and stores reg into adr if so; otherwise, the value at adr is loaded into X86.rax,. // The ZF is set if the compared values were equal, and cleared otherwise. public final void cmpxchgl(Register reg, AMD64Address adr) { // cmpxchg - if ((Atomics & 2) != 0) { - // caveat: no instructionmark, so this isn't relocatable. - // Emit a synthetic, non-atomic, CAS equivalent. - // Beware. The synthetic form sets all ICCs, not just ZF. - // cmpxchg r,[m] is equivalent to X86.rax, = CAS (m, X86.rax, r) - cmpl(rax, adr); - movl(rax, adr); - if (reg.equals(rax)) { - Label l = new Label(); - jccb(ConditionFlag.NotEqual, l); - movl(adr, reg); - bind(l); - } - } else { - - prefix(adr, reg); - emitByte(0x0F); - emitByte(0xB1); - emitOperandHelper(reg, adr); - } + prefix(adr, reg); + emitByte(0x0F); + emitByte(0xB1); + emitOperandHelper(reg, adr); } public final void cvtsd2ss(Register dst, AMD64Address src) { @@ -860,12 +844,7 @@ } public final void lock() { - if ((Atomics & 1) != 0) { - // Emit either nothing, a NOP, or a NOP: prefix - emitByte(0x90); - } else { - emitByte(0xF0); - } + emitByte(0xF0); } public final void movapd(Register dst, Register src) {