diff options
Diffstat (limited to 'compiler/utils/x86_64')
-rw-r--r-- | compiler/utils/x86_64/assembler_x86_64.cc | 22 | ||||
-rw-r--r-- | compiler/utils/x86_64/assembler_x86_64.h | 3 | ||||
-rw-r--r-- | compiler/utils/x86_64/assembler_x86_64_test.cc | 2 |
3 files changed, 13 insertions, 14 deletions
diff --git a/compiler/utils/x86_64/assembler_x86_64.cc b/compiler/utils/x86_64/assembler_x86_64.cc index feceeca..ac95c71 100644 --- a/compiler/utils/x86_64/assembler_x86_64.cc +++ b/compiler/utils/x86_64/assembler_x86_64.cc @@ -2388,9 +2388,9 @@ void X86_64Assembler::BuildFrame(size_t frame_size, ManagedRegister method_reg, } } - DCHECK_EQ(4U, sizeof(StackReference<mirror::ArtMethod>)); + DCHECK_EQ(kX86_64PointerSize, kFramePointerSize); - movl(Address(CpuRegister(RSP), 0), method_reg.AsX86_64().AsCpuRegister()); + movq(Address(CpuRegister(RSP), 0), method_reg.AsX86_64().AsCpuRegister()); for (size_t i = 0; i < entry_spills.size(); ++i) { ManagedRegisterSpill spill = entry_spills.at(i); @@ -2590,18 +2590,18 @@ void X86_64Assembler::LoadFromThread64(ManagedRegister mdest, ThreadOffset<8> sr } } -void X86_64Assembler::LoadRef(ManagedRegister mdest, FrameOffset src) { +void X86_64Assembler::LoadRef(ManagedRegister mdest, FrameOffset src) { X86_64ManagedRegister dest = mdest.AsX86_64(); CHECK(dest.IsCpuRegister()); movq(dest.AsCpuRegister(), Address(CpuRegister(RSP), src)); } -void X86_64Assembler::LoadRef(ManagedRegister mdest, ManagedRegister base, - MemberOffset offs) { +void X86_64Assembler::LoadRef(ManagedRegister mdest, ManagedRegister base, MemberOffset offs, + bool poison_reference) { X86_64ManagedRegister dest = mdest.AsX86_64(); CHECK(dest.IsCpuRegister() && dest.IsCpuRegister()); movl(dest.AsCpuRegister(), Address(base.AsX86_64().AsCpuRegister(), offs)); - if (kPoisonHeapReferences) { + if (kPoisonHeapReferences && poison_reference) { negl(dest.AsCpuRegister()); } } @@ -2667,8 +2667,7 @@ void X86_64Assembler::Move(ManagedRegister mdest, ManagedRegister msrc, size_t s } } -void X86_64Assembler::CopyRef(FrameOffset dest, FrameOffset src, - ManagedRegister mscratch) { +void X86_64Assembler::CopyRef(FrameOffset dest, FrameOffset src, ManagedRegister mscratch) { X86_64ManagedRegister scratch = mscratch.AsX86_64(); CHECK(scratch.IsCpuRegister()); movl(scratch.AsCpuRegister(), Address(CpuRegister(RSP), src)); @@ -2693,9 +2692,8 @@ void X86_64Assembler::CopyRawPtrToThread64(ThreadOffset<8> thr_offs, gs()->movq(Address::Absolute(thr_offs, true), scratch.AsCpuRegister()); } -void X86_64Assembler::Copy(FrameOffset dest, FrameOffset src, - ManagedRegister mscratch, - size_t size) { +void X86_64Assembler::Copy(FrameOffset dest, FrameOffset src, ManagedRegister mscratch, + size_t size) { X86_64ManagedRegister scratch = mscratch.AsX86_64(); if (scratch.IsCpuRegister() && size == 8) { Load(scratch, src, 4); @@ -2834,7 +2832,7 @@ void X86_64Assembler::Call(ManagedRegister mbase, Offset offset, ManagedRegister void X86_64Assembler::Call(FrameOffset base, Offset offset, ManagedRegister mscratch) { CpuRegister scratch = mscratch.AsX86_64().AsCpuRegister(); - movl(scratch, Address(CpuRegister(RSP), base)); + movq(scratch, Address(CpuRegister(RSP), base)); call(Address(scratch, offset)); } diff --git a/compiler/utils/x86_64/assembler_x86_64.h b/compiler/utils/x86_64/assembler_x86_64.h index 7daf994..6b2b65d 100644 --- a/compiler/utils/x86_64/assembler_x86_64.h +++ b/compiler/utils/x86_64/assembler_x86_64.h @@ -668,7 +668,8 @@ class X86_64Assembler FINAL : public Assembler { void LoadRef(ManagedRegister dest, FrameOffset src) OVERRIDE; - void LoadRef(ManagedRegister dest, ManagedRegister base, MemberOffset offs) OVERRIDE; + void LoadRef(ManagedRegister dest, ManagedRegister base, MemberOffset offs, + bool poison_reference) OVERRIDE; void LoadRawPtr(ManagedRegister dest, ManagedRegister base, Offset offs) OVERRIDE; diff --git a/compiler/utils/x86_64/assembler_x86_64_test.cc b/compiler/utils/x86_64/assembler_x86_64_test.cc index dcffe35..b86bc85 100644 --- a/compiler/utils/x86_64/assembler_x86_64_test.cc +++ b/compiler/utils/x86_64/assembler_x86_64_test.cc @@ -1127,7 +1127,7 @@ std::string buildframe_test_fn(AssemblerX86_64Test::Base* assembler_test ATTRIBU ssize_t displacement = static_cast<ssize_t>(frame_size) - (spill_regs.size() * 8 + 8); str << "subq $" << displacement << ", %rsp\n"; // 3) Store method reference. - str << "movl %edi, (%rsp)\n"; + str << "movq %rdi, (%rsp)\n"; // 4) Entry spills. str << "movq %rax, " << frame_size + 0 << "(%rsp)\n"; str << "movq %rbx, " << frame_size + 8 << "(%rsp)\n"; |