From d022406db2eec768af8fa2af886633df51488f28 Mon Sep 17 00:00:00 2001 From: "fschneider@chromium.org" Date: Wed, 26 Oct 2011 08:17:24 +0000 Subject: [PATCH] Land two MIPS changes. Issue 8368021: MIPS: port Fix compilation on ARM and x64 broken by r9738 Issue 8378001: MIPS: port Avoid static initializers in assember-arm.h. Review URL: http://codereview.chromium.org/8341048 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/assembler-mips-inl.h | 15 +++++++++------ src/mips/assembler-mips.h | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/mips/assembler-mips-inl.h b/src/mips/assembler-mips-inl.h index 553c511c3..2ba9760e2 100644 --- a/src/mips/assembler-mips-inl.h +++ b/src/mips/assembler-mips-inl.h @@ -116,10 +116,10 @@ int RelocInfo::target_address_size() { } -void RelocInfo::set_target_address(Address target) { +void RelocInfo::set_target_address(Address target, WriteBarrierMode mode) { ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); Assembler::set_target_address_at(pc_, target); - if (host() != NULL && IsCodeTarget(rmode_)) { + if (mode == UPDATE_WRITE_BARRIER && host() != NULL && IsCodeTarget(rmode_)) { Object* target_code = Code::GetCodeFromTargetAddress(target); host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( host(), this, HeapObject::cast(target_code)); @@ -150,10 +150,12 @@ Object** RelocInfo::target_object_address() { } -void RelocInfo::set_target_object(Object* target) { +void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) { ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); Assembler::set_target_address_at(pc_, reinterpret_cast
(target)); - if (host() != NULL && target->IsHeapObject()) { + if (mode == UPDATE_WRITE_BARRIER && + host() != NULL && + target->IsHeapObject()) { host()->GetHeap()->incremental_marking()->RecordWrite( host(), &Memory::Object_at(pc_), HeapObject::cast(target)); } @@ -184,11 +186,12 @@ JSGlobalPropertyCell* RelocInfo::target_cell() { } -void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell) { +void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, + WriteBarrierMode mode) { ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); Address address = cell->address() + JSGlobalPropertyCell::kValueOffset; Memory::Address_at(pc_) = address; - if (host() != NULL) { + if (mode == UPDATE_WRITE_BARRIER && host() != NULL) { // TODO(1550) We are passing NULL as a slot because cell can never be on // evacuation candidate. host()->GetHeap()->incremental_marking()->RecordWrite( diff --git a/src/mips/assembler-mips.h b/src/mips/assembler-mips.h index 38e9537af..b66ea0d9f 100644 --- a/src/mips/assembler-mips.h +++ b/src/mips/assembler-mips.h @@ -302,7 +302,7 @@ const FPURegister f29 = { 29 }; const FPURegister f30 = { 30 }; const FPURegister f31 = { 31 }; -const FPURegister kDoubleRegZero = f28; +static const FPURegister& kDoubleRegZero = f28; // FPU (coprocessor 1) control registers. // Currently only FCSR (#31) is implemented. -- 2.34.1