6884973: java -XX:Atomics=2 crashes
Remove buggy experimental option Reviewed-by: acorn, coleenp
This commit is contained in:
parent
5a5c90dd1c
commit
284879b3fc
@ -1170,26 +1170,11 @@ void Assembler::cmpw(Address dst, int imm16) {
|
|||||||
// and stores reg into adr if so; otherwise, the value at adr is loaded into rax,.
|
// and stores reg into adr if so; otherwise, the value at adr is loaded into rax,.
|
||||||
// The ZF is set if the compared values were equal, and cleared otherwise.
|
// The ZF is set if the compared values were equal, and cleared otherwise.
|
||||||
void Assembler::cmpxchgl(Register reg, Address adr) { // cmpxchg
|
void Assembler::cmpxchgl(Register reg, Address adr) { // cmpxchg
|
||||||
if (Atomics & 2) {
|
InstructionMark im(this);
|
||||||
// caveat: no instructionmark, so this isn't relocatable.
|
prefix(adr, reg);
|
||||||
// Emit a synthetic, non-atomic, CAS equivalent.
|
emit_byte(0x0F);
|
||||||
// Beware. The synthetic form sets all ICCs, not just ZF.
|
emit_byte(0xB1);
|
||||||
// cmpxchg r,[m] is equivalent to rax, = CAS (m, rax, r)
|
emit_operand(reg, adr);
|
||||||
cmpl(rax, adr);
|
|
||||||
movl(rax, adr);
|
|
||||||
if (reg != rax) {
|
|
||||||
Label L ;
|
|
||||||
jcc(Assembler::notEqual, L);
|
|
||||||
movl(adr, reg);
|
|
||||||
bind(L);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
InstructionMark im(this);
|
|
||||||
prefix(adr, reg);
|
|
||||||
emit_byte(0x0F);
|
|
||||||
emit_byte(0xB1);
|
|
||||||
emit_operand(reg, adr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Assembler::comisd(XMMRegister dst, Address src) {
|
void Assembler::comisd(XMMRegister dst, Address src) {
|
||||||
@ -1513,12 +1498,7 @@ void Assembler::leal(Register dst, Address src) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Assembler::lock() {
|
void Assembler::lock() {
|
||||||
if (Atomics & 1) {
|
emit_byte(0xF0);
|
||||||
// Emit either nothing, a NOP, or a NOP: prefix
|
|
||||||
emit_byte(0x90) ;
|
|
||||||
} else {
|
|
||||||
emit_byte(0xF0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Assembler::lzcntl(Register dst, Register src) {
|
void Assembler::lzcntl(Register dst, Register src) {
|
||||||
|
@ -1066,9 +1066,6 @@ class CommandLineFlags {
|
|||||||
\
|
\
|
||||||
product(bool, MonitorInUseLists, false, "Track Monitors for Deflation") \
|
product(bool, MonitorInUseLists, false, "Track Monitors for Deflation") \
|
||||||
\
|
\
|
||||||
product(intx, Atomics, 0, \
|
|
||||||
"(Unsafe,Unstable) Diagnostic - Controls emission of atomics") \
|
|
||||||
\
|
|
||||||
product(intx, SyncFlags, 0, "(Unsafe,Unstable) Experimental Sync flags" ) \
|
product(intx, SyncFlags, 0, "(Unsafe,Unstable) Experimental Sync flags" ) \
|
||||||
\
|
\
|
||||||
product(intx, SyncVerbose, 0, "(Unstable)" ) \
|
product(intx, SyncVerbose, 0, "(Unstable)" ) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user