Added direct memory operand support for comiss/sd on x86.
Rationale:
Memory operands allows for shorter instruction sequences.
Something that may be used e.g. the upcoming implementation
of the round intrinsic.
Bug=26327751
Change-Id: Ifd976ed86917de1879fa036cbbbff5edf4fb741d
Test: assembler_x86_test
diff --git a/compiler/utils/x86/assembler_x86.cc b/compiler/utils/x86/assembler_x86.cc
index f931d75..b865790 100644
--- a/compiler/utils/x86/assembler_x86.cc
+++ b/compiler/utils/x86/assembler_x86.cc
@@ -727,6 +727,14 @@
}
+void X86Assembler::comiss(XmmRegister a, const Address& b) {
+ AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+ EmitUint8(0x0F);
+ EmitUint8(0x2F);
+ EmitOperand(a, b);
+}
+
+
void X86Assembler::comisd(XmmRegister a, XmmRegister b) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
EmitUint8(0x66);
@@ -736,6 +744,15 @@
}
+void X86Assembler::comisd(XmmRegister a, const Address& b) {
+ AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+ EmitUint8(0x66);
+ EmitUint8(0x0F);
+ EmitUint8(0x2F);
+ EmitOperand(a, b);
+}
+
+
void X86Assembler::ucomiss(XmmRegister a, XmmRegister b) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
EmitUint8(0x0F);