diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-09-25 13:37:06 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-09-25 13:37:06 +0000 |
commit | a72cb229d555a8ca86dca748733ea3791eaeec14 (patch) | |
tree | b051a0f2d10c126a83d22ff45f2feecf0365aca3 /compiler/utils | |
parent | d7e2f329ddacd2294ba94cd5acde026677d32e0d (diff) | |
parent | 3c04974a90b0e03f4b509010bff49f0b2a3da57f (diff) | |
download | art-a72cb229d555a8ca86dca748733ea3791eaeec14.zip art-a72cb229d555a8ca86dca748733ea3791eaeec14.tar.gz art-a72cb229d555a8ca86dca748733ea3791eaeec14.tar.bz2 |
Merge "Optimize suspend checks in optimizing compiler."
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/x86/assembler_x86.cc | 8 | ||||
-rw-r--r-- | compiler/utils/x86/assembler_x86.h | 2 | ||||
-rw-r--r-- | compiler/utils/x86_64/assembler_x86_64.cc | 8 | ||||
-rw-r--r-- | compiler/utils/x86_64/assembler_x86_64.h | 2 |
4 files changed, 20 insertions, 0 deletions
diff --git a/compiler/utils/x86/assembler_x86.cc b/compiler/utils/x86/assembler_x86.cc index 2c9bc28..f888d46 100644 --- a/compiler/utils/x86/assembler_x86.cc +++ b/compiler/utils/x86/assembler_x86.cc @@ -746,6 +746,7 @@ void X86Assembler::xchgl(Register dst, Register src) { EmitRegisterOperand(dst, src); } + void X86Assembler::xchgl(Register reg, const Address& address) { AssemblerBuffer::EnsureCapacity ensured(&buffer_); EmitUint8(0x87); @@ -753,6 +754,13 @@ void X86Assembler::xchgl(Register reg, const Address& address) { } +void X86Assembler::cmpw(const Address& address, const Immediate& imm) { + AssemblerBuffer::EnsureCapacity ensured(&buffer_); + EmitUint8(0x66); + EmitComplex(7, address, imm); +} + + void X86Assembler::cmpl(Register reg, const Immediate& imm) { AssemblerBuffer::EnsureCapacity ensured(&buffer_); EmitComplex(7, Operand(reg), imm); diff --git a/compiler/utils/x86/assembler_x86.h b/compiler/utils/x86/assembler_x86.h index 5c4e34f..ec983d9 100644 --- a/compiler/utils/x86/assembler_x86.h +++ b/compiler/utils/x86/assembler_x86.h @@ -337,6 +337,8 @@ class X86Assembler FINAL : public Assembler { void xchgl(Register dst, Register src); void xchgl(Register reg, const Address& address); + void cmpw(const Address& address, const Immediate& imm); + void cmpl(Register reg, const Immediate& imm); void cmpl(Register reg0, Register reg1); void cmpl(Register reg, const Address& address); diff --git a/compiler/utils/x86_64/assembler_x86_64.cc b/compiler/utils/x86_64/assembler_x86_64.cc index 1e2884a..a47e968 100644 --- a/compiler/utils/x86_64/assembler_x86_64.cc +++ b/compiler/utils/x86_64/assembler_x86_64.cc @@ -839,6 +839,14 @@ void X86_64Assembler::xchgl(CpuRegister reg, const Address& address) { } +void X86_64Assembler::cmpw(const Address& address, const Immediate& imm) { + AssemblerBuffer::EnsureCapacity ensured(&buffer_); + EmitOptionalRex32(address); + EmitUint8(0x66); + EmitComplex(7, address, imm); +} + + void X86_64Assembler::cmpl(CpuRegister reg, const Immediate& imm) { AssemblerBuffer::EnsureCapacity ensured(&buffer_); EmitOptionalRex32(reg); diff --git a/compiler/utils/x86_64/assembler_x86_64.h b/compiler/utils/x86_64/assembler_x86_64.h index 763dafe..1fd65c2 100644 --- a/compiler/utils/x86_64/assembler_x86_64.h +++ b/compiler/utils/x86_64/assembler_x86_64.h @@ -378,6 +378,8 @@ class X86_64Assembler FINAL : public Assembler { void xchgq(CpuRegister dst, CpuRegister src); void xchgl(CpuRegister reg, const Address& address); + void cmpw(const Address& address, const Immediate& imm); + void cmpl(CpuRegister reg, const Immediate& imm); void cmpl(CpuRegister reg0, CpuRegister reg1); void cmpl(CpuRegister reg, const Address& address); |