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

Unified Diff: runtime/vm/assembler_arm.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: 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 | « no previous file | runtime/vm/assembler_mips.cc » ('j') | runtime/vm/assembler_mips.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm.cc
diff --git a/runtime/vm/assembler_arm.cc b/runtime/vm/assembler_arm.cc
index 28d2c56e48094e249777c1b2e5052a44b8f90e48..56c154f2554301fbdb9e1ca38a131b624fa5ef5e 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -1567,6 +1567,12 @@ void Assembler::LoadObjectHelper(Register rd,
const Object& object,
Condition cond,
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)) {
+ ldr(rd, Address(THR, Thread::OffsetFromThread(object)), cond);
+ return;
+ }
// Smis and VM heap objects are never relocated; do not use object pool.
if (object.IsSmi()) {
LoadImmediate(rd, reinterpret_cast<int32_t>(object.raw()), cond);
@@ -1808,8 +1814,8 @@ void Assembler::StoreIntoObject(Register object,
if (object != R0) {
mov(R0, Operand(object));
}
- StubCode* stub_code = Isolate::Current()->stub_code();
- BranchLink(&stub_code->UpdateStoreBufferLabel());
+ ldr(LR, Address(THR, Thread::update_store_buffer_entry_point_offset()));
+ blx(LR);
PopList(regs);
Bind(&done);
}
« no previous file with comments | « no previous file | runtime/vm/assembler_mips.cc » ('j') | runtime/vm/assembler_mips.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698