Index: runtime/vm/assembler_ia32.cc |
diff --git a/runtime/vm/assembler_ia32.cc b/runtime/vm/assembler_ia32.cc |
index 6ccb225c4c062ab56c54a85bb3489c6077086dec..bb54355f149fe7875f439b6a811a32698a2c949b 100644 |
--- a/runtime/vm/assembler_ia32.cc |
+++ b/runtime/vm/assembler_ia32.cc |
@@ -268,6 +268,16 @@ void Assembler::movw(const Address& dst, Register src) { |
} |
+void Assembler::movw(const Address& dst, const Immediate& imm) { |
+ AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
+ EmitOperandSizeOverride(); |
+ EmitUint8(0xC7); |
+ EmitOperand(0, dst); |
+ EmitUint8(imm.value() & 0xFF); |
+ EmitUint8((imm.value() >> 8) & 0xFF); |
+} |
+ |
+ |
void Assembler::leal(Register dst, const Address& src) { |
AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
EmitUint8(0x8D); |
@@ -1417,6 +1427,24 @@ void Assembler::cmpl(const Address& address, const Immediate& imm) { |
} |
+void Assembler::cmpw(Register reg, const Address& address) { |
+ AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
+ EmitOperandSizeOverride(); |
+ EmitUint8(0x3B); |
+ EmitOperand(reg, address); |
+} |
+ |
+ |
+void Assembler::cmpw(const Address& address, const Immediate& imm) { |
+ AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
+ EmitOperandSizeOverride(); |
+ EmitUint8(0x81); |
+ EmitOperand(7, address); |
+ EmitUint8(imm.value() & 0xFF); |
+ EmitUint8((imm.value() >> 8) & 0xFF); |
+} |
+ |
+ |
void Assembler::cmpb(const Address& address, const Immediate& imm) { |
ASSERT(imm.is_int8()); |
AssemblerBuffer::EnsureCapacity ensured(&buffer_); |