Index: src/x87/assembler-x87.cc |
diff --git a/src/x87/assembler-x87.cc b/src/x87/assembler-x87.cc |
index 5cc783c86ae40b332d34fad8bdd3b63ebc635297..3716d8ecf14f62e633be0340355b20f6eeae8d49 100644 |
--- a/src/x87/assembler-x87.cc |
+++ b/src/x87/assembler-x87.cc |
@@ -601,6 +601,33 @@ void Assembler::xchg_w(Register reg, const Operand& op) { |
emit_operand(reg, op); |
} |
+void Assembler::lock() { |
+ EnsureSpace ensure_space(this); |
+ EMIT(0xF0); |
+} |
+ |
+void Assembler::cmpxchg(const Operand& dst, Register src) { |
+ EnsureSpace ensure_space(this); |
+ EMIT(0x0F); |
+ EMIT(0xB1); |
+ emit_operand(src, dst); |
+} |
+ |
+void Assembler::cmpxchg_b(const Operand& dst, Register src) { |
+ EnsureSpace ensure_space(this); |
+ EMIT(0x0F); |
+ EMIT(0xB0); |
+ emit_operand(src, dst); |
+} |
+ |
+void Assembler::cmpxchg_w(const Operand& dst, Register src) { |
+ EnsureSpace ensure_space(this); |
+ EMIT(0x66); |
+ EMIT(0x0F); |
+ EMIT(0xB1); |
+ emit_operand(src, dst); |
+} |
+ |
void Assembler::adc(Register dst, int32_t imm32) { |
EnsureSpace ensure_space(this); |
emit_arith(2, Operand(dst), Immediate(imm32)); |