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

Unified Diff: src/mips/macro-assembler-mips.cc

Issue 83583003: MIPS: Fix and simplify code aging. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « src/mips/codegen-mips.cc ('k') | src/mips/simulator-mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/macro-assembler-mips.cc
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
index cb336f3b0b9262b3c2d12628bec9ec9679a43799..cdfbae39c2a27242f7745cc9cd5d039d11060428 100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -4526,15 +4526,15 @@ void MacroAssembler::Prologue(PrologueFrameMode frame_mode) {
// Pre-age the code.
Code* stub = Code::GetPreAgedCodeAgeStub(isolate());
nop(Assembler::CODE_AGE_MARKER_NOP);
- // Save the function's original return address
- // (it will be clobbered by Call(t9)).
- mov(at, ra);
- // Load the stub address to t9 and call it.
+ // Load the stub address to t9 and call it,
+ // GetCodeAgeAndParity() extracts the stub address from this instruction.
li(t9,
- Operand(reinterpret_cast<uint32_t>(stub->instruction_start())));
- Call(t9);
- // Record the stub address in the empty space for GetCodeAgeAndParity().
- emit_code_stub_address(stub);
+ Operand(reinterpret_cast<uint32_t>(stub->instruction_start())),
+ CONSTANT_SIZE);
+ nop(); // Prevent jalr to jal optimization.
+ jalr(t9, a0);
+ nop(); // Branch delay slot nop.
+ nop(); // Pad the empty space.
} else {
Push(ra, fp, cp, a1);
nop(Assembler::CODE_AGE_SEQUENCE_NOP);
« no previous file with comments | « src/mips/codegen-mips.cc ('k') | src/mips/simulator-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698