Index: runtime/vm/assembler_mips.h |
diff --git a/runtime/vm/assembler_mips.h b/runtime/vm/assembler_mips.h |
index f3aaed52ea3a942db5018788bddc8809208723db..252839983a1f9a517ca5738a6900e26af0c83079 100644 |
--- a/runtime/vm/assembler_mips.h |
+++ b/runtime/vm/assembler_mips.h |
@@ -288,21 +288,12 @@ class Assembler : public ValueObject { |
// Set up a stub frame so that the stack traversal code can easily identify |
// a stub frame. |
- void EnterStubFrame(); |
+ void EnterStubFrame(intptr_t frame_size = 0); |
void LeaveStubFrame(); |
// A separate macro for when a Ret immediately follows, so that we can use |
// the branch delay slot. |
void LeaveStubFrameAndReturn(Register ra = RA); |
- // Instruction pattern from entrypoint is used in dart frame prologs |
- // to set up the frame and save a PC which can be used to figure out the |
- // RawInstruction object corresponding to the code running in the frame. |
- // See EnterDartFrame. There are 6 instructions before we know the PC. |
- static const intptr_t kEntryPointToPcMarkerOffset = 6 * Instr::kInstrSize; |
- static intptr_t EntryPointToPcMarkerOffset() { |
- return kEntryPointToPcMarkerOffset; |
- } |
- |
void UpdateAllocationStats(intptr_t cid, |
Register temp_reg, |
Heap::Space space, |
@@ -912,11 +903,10 @@ class Assembler : public ValueObject { |
SubuDetectOverflow(rd, rs, rd, ro); |
} |
- void Branch(const StubEntry& stub_entry); |
- |
- void BranchPatchable(const StubEntry& stub_entry); |
+ void Branch(const StubEntry& stub_entry, Register pp = PP); |
void BranchLink(const ExternalLabel* label, Patchability patchable); |
+ |
void BranchLink(const StubEntry& stub_entry, |
Patchability patchable = kNotPatchable); |
@@ -929,15 +919,17 @@ class Assembler : public ValueObject { |
} |
} |
- void LoadPoolPointer() { |
+ void LoadPoolPointer(Register reg = PP) { |
ASSERT(!in_delay_slot_); |
- GetNextPC(TMP); // TMP gets the address of the next instruction. |
- const intptr_t object_pool_pc_dist = |
- Instructions::HeaderSize() - Instructions::object_pool_offset() + |
- CodeSize(); |
- lw(PP, Address(TMP, -object_pool_pc_dist)); |
+ CheckCodePointer(); |
+ lw(reg, FieldAddress(CODE_REG, Code::object_pool_offset())); |
+ set_constant_pool_allowed(reg == PP); |
} |
+ void CheckCodePointer(); |
+ |
+ void RestoreCodePointer(); |
+ |
void LoadImmediate(Register rd, int32_t value) { |
ASSERT(!in_delay_slot_); |
if (Utils::IsInt(kImmBits, value)) { |
@@ -1518,13 +1510,14 @@ class Assembler : public ValueObject { |
void EnterCallRuntimeFrame(intptr_t frame_space); |
void LeaveCallRuntimeFrame(); |
- bool CanLoadFromObjectPool(const Object& object) const; |
- void LoadWordFromPoolOffset(Register rd, int32_t offset); |
void LoadObject(Register rd, const Object& object); |
void LoadUniqueObject(Register rd, const Object& object); |
void LoadExternalLabel(Register rd, |
const ExternalLabel* label, |
Patchability patchable); |
+ void LoadFunctionFromCalleePool(Register dst, |
+ const Function& function, |
+ Register new_pp); |
void LoadNativeEntry(Register rd, |
const ExternalLabel* label, |
Patchability patchable); |
@@ -1576,8 +1569,8 @@ class Assembler : public ValueObject { |
// enable easy access to the RawInstruction object of code corresponding |
// to this frame. |
void EnterDartFrame(intptr_t frame_size); |
- void LeaveDartFrame(); |
- void LeaveDartFrameAndReturn(); |
+ void LeaveDartFrame(RestorePP restore_pp = kRestoreCallerPP); |
+ void LeaveDartFrameAndReturn(Register ra = RA); |
// Set up a Dart frame for a function compiled for on-stack replacement. |
// The frame layout is a normal Dart frame, but the frame is partially set |
@@ -1638,7 +1631,11 @@ class Assembler : public ValueObject { |
bool constant_pool_allowed_; |
void BranchLink(const ExternalLabel* label); |
+ void BranchLink(const Code& code, Patchability patchable); |
+ |
+ bool CanLoadFromObjectPool(const Object& object) const; |
+ void LoadWordFromPoolOffset(Register rd, int32_t offset, Register pp = PP); |
void LoadObjectHelper(Register rd, const Object& object, bool is_unique); |
void Emit(int32_t value) { |