Revision: 8023
Author: [email protected]
Date: Tue May 24 00:56:20 2011
Log: MIPS: arch-independent changes to support mips.
This change supports all non-crankshaft features except serialization.
This must be built after the changes in
http://codereview.chromium.org/6966031
are landed.
BUG=
TEST=
Review URL: http://codereview.chromium.org//7039058
http://code.google.com/p/v8/source/detail?r=8023
Modified:
/branches/bleeding_edge/src/assembler.h
/branches/bleeding_edge/src/mips/assembler-mips-inl.h
/branches/bleeding_edge/test/cctest/cctest.status
/branches/bleeding_edge/test/mjsunit/mjsunit.status
=======================================
--- /branches/bleeding_edge/src/assembler.h Mon May 16 07:10:56 2011
+++ /branches/bleeding_edge/src/assembler.h Tue May 24 00:56:20 2011
@@ -348,6 +348,19 @@
byte* pc_;
Mode rmode_;
intptr_t data_;
+#ifdef V8_TARGET_ARCH_MIPS
+ // Code and Embedded Object pointers in mips are stored split
+ // across two consecutive 32-bit instructions. Heap management
+ // routines expect to access these pointers indirectly. The following
+ // location provides a place for these pointers to exist natually
+ // when accessed via the Iterator.
+ Object *reconstructed_obj_ptr_;
+ // External-reference pointers are also split across instruction-pairs
+ // in mips, but are accessed via indirect pointers. This location
+ // provides a place for that pointer to exist naturally. Its address
+ // is returned by RelocInfo::target_reference_address().
+ Address reconstructed_adr_ptr_;
+#endif // V8_TARGET_ARCH_MIPS
friend class RelocIterator;
};
=======================================
--- /branches/bleeding_edge/src/mips/assembler-mips-inl.h Mon May 9
07:28:09 2011
+++ /branches/bleeding_edge/src/mips/assembler-mips-inl.h Tue May 24
00:56:20 2011
@@ -95,24 +95,8 @@
Address RelocInfo::target_address_address() {
- ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY
- || rmode_ == EMBEDDED_OBJECT
- || rmode_ == EXTERNAL_REFERENCE);
- // Read the address of the word containing the target_address in an
- // instruction stream.
- // The only architecture-independent user of this function is the
serializer.
- // The serializer uses it to find out how many raw bytes of instruction
to
- // output before the next target.
- // For an instructions like LUI/ORI where the target bits are mixed into
the
- // instruction bits, the size of the target will be zero, indicating
that the
- // serializer should not step forward in memory after a target is
resolved
- // and written. In this case the target_address_address function should
- // return the end of the instructions to be patched, allowing the
- // deserializer to deserialize the instructions as raw bytes and put
them in
- // place, ready to be patched with the target. In our case, that is the
- // address of the instruction that follows LUI/ORI instruction pair.
- return reinterpret_cast<Address>(
- pc_ + Assembler::kInstructionsFor32BitConstant *
Assembler::kInstrSize);
+ ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
+ return reinterpret_cast<Address>(pc_);
}
@@ -144,12 +128,9 @@
// Provide a "natural pointer" to the embedded object,
// which can be de-referenced during heap iteration.
ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
- // TODO(mips): Commenting out, to simplify arch-independent changes.
- // GC won't work like this, but this commit is for asm/disasm/sim.
- // reconstructed_obj_ptr_ =
- // reinterpret_cast<Object*>(Assembler::target_address_at(pc_));
- // return &reconstructed_obj_ptr_;
- return NULL;
+ reconstructed_obj_ptr_ =
+ reinterpret_cast<Object*>(Assembler::target_address_at(pc_));
+ return &reconstructed_obj_ptr_;
}
@@ -161,11 +142,8 @@
Address* RelocInfo::target_reference_address() {
ASSERT(rmode_ == EXTERNAL_REFERENCE);
- // TODO(mips): Commenting out, to simplify arch-independent changes.
- // GC won't work like this, but this commit is for asm/disasm/sim.
- // reconstructed_adr_ptr_ = Assembler::target_address_at(pc_);
- // return &reconstructed_adr_ptr_;
- return NULL;
+ reconstructed_adr_ptr_ = Assembler::target_address_at(pc_);
+ return &reconstructed_adr_ptr_;
}
@@ -251,23 +229,18 @@
void RelocInfo::Visit(ObjectVisitor* visitor) {
RelocInfo::Mode mode = rmode();
if (mode == RelocInfo::EMBEDDED_OBJECT) {
- // RelocInfo is needed when pointer must be updated/serialized, such as
- // UpdatingVisitor in mark-compact.cc or Serializer in serialize.cc.
- // It is ignored by visitors that do not need it.
- // TODO(mips): Commenting out, to simplify arch-independent changes.
- // GC won't work like this, but this commit is for asm/disasm/sim.
- // visitor->VisitPointer(target_object_address(), this);
+ Object** p = target_object_address();
+ Object* orig = *p;
+ visitor->VisitPointer(p);
+ if (*p != orig) {
+ set_target_object(*p);
+ }
} else if (RelocInfo::IsCodeTarget(mode)) {
visitor->VisitCodeTarget(this);
} else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) {
visitor->VisitGlobalPropertyCell(this);
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
- // RelocInfo is needed when external-references must be serialized by
- // Serializer Visitor in serialize.cc. It is ignored by visitors that
- // do not need it.
- // TODO(mips): Commenting out, to simplify arch-independent changes.
- // Serializer won't work like this, but this commit is for
asm/disasm/sim.
- // visitor->VisitExternalReference(target_reference_address(), this);
+ visitor->VisitExternalReference(target_reference_address());
#ifdef ENABLE_DEBUGGER_SUPPORT
// TODO(isolates): Get a cached isolate below.
} else if (((RelocInfo::IsJSReturn(mode) &&
=======================================
--- /branches/bleeding_edge/test/cctest/cctest.status Wed May 11 10:29:47
2011
+++ /branches/bleeding_edge/test/cctest/cctest.status Tue May 24 00:56:20
2011
@@ -81,26 +81,5 @@
##############################################################################
[ $arch == mips ]
-test-accessors: SKIP
-test-alloc: SKIP
-test-api: SKIP
-test-compiler: SKIP
-test-cpu-profiler: SKIP
-test-debug: SKIP
-test-decls: SKIP
test-deoptimization: SKIP
-test-func-name-inference: SKIP
-test-heap: SKIP
-test-heap-profiler: SKIP
-test-lockers: SKIP
-test-log: SKIP
-test-log-utils: SKIP
-test-mark-compact: SKIP
-test-parsing: SKIP
-test-profile-generator: SKIP
-test-regexp: SKIP
test-serialize: SKIP
-test-sockets: SKIP
-test-strings: SKIP
-test-threads: SKIP
-test-thread-termination: SKIP
=======================================
--- /branches/bleeding_edge/test/mjsunit/mjsunit.status Fri Apr 15 04:29:01
2011
+++ /branches/bleeding_edge/test/mjsunit/mjsunit.status Tue May 24 00:56:20
2011
@@ -113,5 +113,29 @@
##############################################################################
[ $arch == mips ]
-# Skip all tests on MIPS.
-*: SKIP
+# Skip long-running tests.
+compiler/alloc-number: SKIP
+compiler/array-length: SKIP
+compiler/assignment-deopt: SKIP
+compiler/deopt-args: SKIP
+compiler/inline-compare: SKIP
+compiler/inline-global-access: SKIP
+compiler/optimized-function-calls: SKIP
+compiler/pic: SKIP
+compiler/property-calls: SKIP
+compiler/recursive-deopt: SKIP
+compiler/regress-4: SKIP
+compiler/regress-funcaller: SKIP
+compiler/regress-gvn: SKIP
+compiler/regress-rep-change: SKIP
+compiler/regress-arguments: SKIP
+compiler/regress-funarguments: SKIP
+compiler/regress-or: SKIP
+compiler/regress-3249650: SKIP
+compiler/simple-deopt: SKIP
+regress/regress-490: SKIP
+regress/regress-634: SKIP
+regress/regress-create-exception: SKIP
+regress/regress-3218915: SKIP
+regress/regress-3247124: SKIP
+
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev