summaryrefslogtreecommitdiffstats
path: root/compiler/utils
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-10-06 09:12:41 +0100
committerNicolas Geoffray <ngeoffray@google.com>2014-10-07 20:19:47 +0100
commit7fb49da8ec62e8a10ed9419ade9f32c6b1174687 (patch)
tree8b1bec67452b84809cecd5645543e1f885ccbd44 /compiler/utils
parent4a1b4679cda2f0d2893b8e3f910c21231849291c (diff)
downloadart-7fb49da8ec62e8a10ed9419ade9f32c6b1174687.zip
art-7fb49da8ec62e8a10ed9419ade9f32c6b1174687.tar.gz
art-7fb49da8ec62e8a10ed9419ade9f32c6b1174687.tar.bz2
Add support for floats and doubles.
- Follows Quick conventions. - Currently only works with baseline register allocator. Change-Id: Ie4b8e298f4f5e1cd82364da83e4344d4fc3621a3
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/x86/assembler_x86.cc8
-rw-r--r--compiler/utils/x86/assembler_x86.h1
-rw-r--r--compiler/utils/x86_64/assembler_x86_64.cc9
-rw-r--r--compiler/utils/x86_64/assembler_x86_64.h2
4 files changed, 20 insertions, 0 deletions
diff --git a/compiler/utils/x86/assembler_x86.cc b/compiler/utils/x86/assembler_x86.cc
index 4c7c4e9..3ff24b7 100644
--- a/compiler/utils/x86/assembler_x86.cc
+++ b/compiler/utils/x86/assembler_x86.cc
@@ -277,6 +277,14 @@ void X86Assembler::setb(Condition condition, Register dst) {
}
+void X86Assembler::movaps(XmmRegister dst, XmmRegister src) {
+ AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+ EmitUint8(0x0F);
+ EmitUint8(0x28);
+ EmitXmmRegisterOperand(dst, src);
+}
+
+
void X86Assembler::movss(XmmRegister dst, const Address& src) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
EmitUint8(0xF3);
diff --git a/compiler/utils/x86/assembler_x86.h b/compiler/utils/x86/assembler_x86.h
index 2113c85..1f6f7e6 100644
--- a/compiler/utils/x86/assembler_x86.h
+++ b/compiler/utils/x86/assembler_x86.h
@@ -260,6 +260,7 @@ class X86Assembler FINAL : public Assembler {
void setb(Condition condition, Register dst);
+ void movaps(XmmRegister dst, XmmRegister src);
void movss(XmmRegister dst, const Address& src);
void movss(const Address& dst, XmmRegister src);
void movss(XmmRegister dst, XmmRegister src);
diff --git a/compiler/utils/x86_64/assembler_x86_64.cc b/compiler/utils/x86_64/assembler_x86_64.cc
index 17339ae..705b639 100644
--- a/compiler/utils/x86_64/assembler_x86_64.cc
+++ b/compiler/utils/x86_64/assembler_x86_64.cc
@@ -312,6 +312,15 @@ void X86_64Assembler::leaq(CpuRegister dst, const Address& src) {
}
+void X86_64Assembler::movaps(XmmRegister dst, XmmRegister src) {
+ AssemblerBuffer::EnsureCapacity ensured(&buffer_);
+ EmitOptionalRex32(dst, src);
+ EmitUint8(0x0F);
+ EmitUint8(0x28);
+ EmitXmmRegisterOperand(src.LowBits(), dst);
+}
+
+
void X86_64Assembler::movss(XmmRegister dst, const Address& src) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
EmitUint8(0xF3);
diff --git a/compiler/utils/x86_64/assembler_x86_64.h b/compiler/utils/x86_64/assembler_x86_64.h
index c3e6e3b..268f72b 100644
--- a/compiler/utils/x86_64/assembler_x86_64.h
+++ b/compiler/utils/x86_64/assembler_x86_64.h
@@ -300,6 +300,8 @@ class X86_64Assembler FINAL : public Assembler {
void leaq(CpuRegister dst, const Address& src);
+ void movaps(XmmRegister dst, XmmRegister src);
+
void movss(XmmRegister dst, const Address& src);
void movss(const Address& dst, XmmRegister src);
void movss(XmmRegister dst, XmmRegister src);