Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: runtime/vm/assembler_mips.cc

Issue 1227733002: VM: Load common VM constants from Thread on ARM and MIPS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: added back assertion Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_mips.cc
diff --git a/runtime/vm/assembler_mips.cc b/runtime/vm/assembler_mips.cc
index b418fc80d782c34fccf176f348667985f5426608..3d56a04ddf383aad7d1fd54a287a5d147fa52114 100644
--- a/runtime/vm/assembler_mips.cc
+++ b/runtime/vm/assembler_mips.cc
@@ -459,6 +459,12 @@ void Assembler::SubuDetectOverflow(Register rd, Register rs, Register rt,
void Assembler::LoadObjectHelper(Register rd,
const Object& object,
bool is_unique) {
+ // Load common VM constants from the thread. This works also in places where
+ // no constant pool is set up (e.g. intrinsic code).
+ if (Thread::CanLoadFromThread(object)) {
+ lw(rd, Address(THR, Thread::OffsetFromThread(object)));
+ return;
+ }
ASSERT(!in_delay_slot_);
// Smis and VM heap objects are never relocated; do not use object pool.
if (object.IsSmi()) {
@@ -568,8 +574,8 @@ void Assembler::StoreIntoObject(Register object,
if (object != T0) {
mov(T0, object);
}
- StubCode* stub_code = Isolate::Current()->stub_code();
- BranchLink(&stub_code->UpdateStoreBufferLabel());
+ lw(T9, Address(THR, Thread::update_store_buffer_entry_point_offset()));
+ jalr(T9);
lw(RA, Address(SP, 0 * kWordSize));
if (value != T0) {
// Restore T0.
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698