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

Unified Diff: runtime/vm/instructions_mips_test.cc

Issue 12703028: Adds Stop to MIPS. Starts on MIPS call patcher. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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
Index: runtime/vm/instructions_mips_test.cc
===================================================================
--- runtime/vm/instructions_mips_test.cc (revision 20500)
+++ runtime/vm/instructions_mips_test.cc (working copy)
@@ -15,12 +15,18 @@
#define __ assembler->
ASSEMBLER_TEST_GENERATE(Call, assembler) {
- UNIMPLEMENTED();
+ __ BranchLinkPatchable(&StubCode::InstanceFunctionLookupLabel());
+ __ Ret();
}
ASSEMBLER_TEST_RUN(Call, test) {
- CallPattern call(test->entry(), test->code());
+ // The return address, which must be the address of an instruction contained
+ // in the code, points to the Ret instruction above, i.e. two instructions
+ // before the end of the code buffer, including the delay slot for the
+ // return jump.
+ CallPattern call(test->entry() + test->code().Size() - (2*Instr::kInstrSize),
+ test->code());
EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(),
call.TargetAddress());
}

Powered by Google App Engine
This is Rietveld 408576698