--- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp Tue Nov 18 12:33:47 2014 +0000
+++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp Tue Oct 21 15:07:25 2014 +0200
@@ -1297,6 +1297,17 @@
emit_operand(reg, adr);
}
+// The 8-bit cmpxchg compares the value at adr with the contents of 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.
+void Assembler::cmpxchgb(Register reg, Address adr) { // cmpxchg
+ InstructionMark im(this);
+ prefix(adr, reg, true);
+ emit_int8(0x0F);
+ emit_int8((unsigned char)0xB0);
+ emit_operand(reg, adr);
+}
+
void Assembler::comisd(XMMRegister dst, Address src) {
// NOTE: dbx seems to decode this as comiss even though the
// 0x66 is there. Strangly ucomisd comes out correct