Index: src/x64/assembler-x64-inl.h |
diff --git a/src/x64/assembler-x64-inl.h b/src/x64/assembler-x64-inl.h |
index 9c7f9b618de21dcc013a9f2cc794aa33b1e2bf7c..c9ab6275f2b8d7d038e5a7119c4e65e3e9d806b1 100644 |
--- a/src/x64/assembler-x64-inl.h |
+++ b/src/x64/assembler-x64-inl.h |
@@ -89,6 +89,11 @@ void Assembler::emit_rex_64(XMMRegister reg, Register rm_reg) { |
} |
+void Assembler::emit_rex_64(Register reg, XMMRegister rm_reg) { |
+ emit(0x48 | (reg.code() & 0x8) >> 1 | rm_reg.code() >> 3); |
+} |
+ |
+ |
void Assembler::emit_rex_64(Register reg, const Operand& op) { |
emit(0x48 | reg.high_bit() << 2 | op.rex_); |
} |
@@ -160,6 +165,12 @@ void Assembler::emit_optional_rex_32(XMMRegister reg, Register base) { |
} |
+void Assembler::emit_optional_rex_32(Register reg, XMMRegister base) { |
+ byte rex_bits = (reg.code() & 0x8) >> 1 | (base.code() & 0x8) >> 3; |
+ if (rex_bits != 0) emit(0x40 | rex_bits); |
+} |
+ |
+ |
void Assembler::emit_optional_rex_32(Register rm_reg) { |
if (rm_reg.high_bit()) emit(0x41); |
} |