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

Side by Side 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 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/codegen-mips.cc ('k') | src/mips/simulator-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4508 matching lines...) Expand 10 before | Expand all | Expand 10 after
4519 Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); 4519 Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
4520 } else { 4520 } else {
4521 PredictableCodeSizeScope predictible_code_size_scope( 4521 PredictableCodeSizeScope predictible_code_size_scope(
4522 this, kNoCodeAgeSequenceLength * Assembler::kInstrSize); 4522 this, kNoCodeAgeSequenceLength * Assembler::kInstrSize);
4523 // The following three instructions must remain together and unmodified 4523 // The following three instructions must remain together and unmodified
4524 // for code aging to work properly. 4524 // for code aging to work properly.
4525 if (isolate()->IsCodePreAgingActive()) { 4525 if (isolate()->IsCodePreAgingActive()) {
4526 // Pre-age the code. 4526 // Pre-age the code.
4527 Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); 4527 Code* stub = Code::GetPreAgedCodeAgeStub(isolate());
4528 nop(Assembler::CODE_AGE_MARKER_NOP); 4528 nop(Assembler::CODE_AGE_MARKER_NOP);
4529 // Save the function's original return address 4529 // Load the stub address to t9 and call it,
4530 // (it will be clobbered by Call(t9)). 4530 // GetCodeAgeAndParity() extracts the stub address from this instruction.
4531 mov(at, ra);
4532 // Load the stub address to t9 and call it.
4533 li(t9, 4531 li(t9,
4534 Operand(reinterpret_cast<uint32_t>(stub->instruction_start()))); 4532 Operand(reinterpret_cast<uint32_t>(stub->instruction_start())),
4535 Call(t9); 4533 CONSTANT_SIZE);
4536 // Record the stub address in the empty space for GetCodeAgeAndParity(). 4534 nop(); // Prevent jalr to jal optimization.
4537 emit_code_stub_address(stub); 4535 jalr(t9, a0);
4536 nop(); // Branch delay slot nop.
4537 nop(); // Pad the empty space.
4538 } else { 4538 } else {
4539 Push(ra, fp, cp, a1); 4539 Push(ra, fp, cp, a1);
4540 nop(Assembler::CODE_AGE_SEQUENCE_NOP); 4540 nop(Assembler::CODE_AGE_SEQUENCE_NOP);
4541 // Adjust fp to point to caller's fp. 4541 // Adjust fp to point to caller's fp.
4542 Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); 4542 Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
4543 } 4543 }
4544 } 4544 }
4545 } 4545 }
4546 4546
4547 4547
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
5749 opcode == BGTZL); 5749 opcode == BGTZL);
5750 opcode = (cond == eq) ? BEQ : BNE; 5750 opcode = (cond == eq) ? BEQ : BNE;
5751 instr = (instr & ~kOpcodeMask) | opcode; 5751 instr = (instr & ~kOpcodeMask) | opcode;
5752 masm_.emit(instr); 5752 masm_.emit(instr);
5753 } 5753 }
5754 5754
5755 5755
5756 } } // namespace v8::internal 5756 } } // namespace v8::internal
5757 5757
5758 #endif // V8_TARGET_ARCH_MIPS 5758 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« 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