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

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

Issue 288213002: Refactor MacroAssembler::Prologue. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 6 years, 7 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 | « src/arm/macro-assembler-arm.h ('k') | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/macro-assembler-arm.cc
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
index f354843e4ada8c2311da5cecc1a1ffb2dd55174b..25bb678cd50b5061af6e72300ed066df4fc76e6a 100644
--- a/src/arm/macro-assembler-arm.cc
+++ b/src/arm/macro-assembler-arm.cc
@@ -902,29 +902,34 @@ void MacroAssembler::LoadConstantPoolPointerRegister() {
}
-void MacroAssembler::Prologue(CompilationInfo* info) {
- if (info->IsStub()) {
- PushFixedFrame();
- Push(Smi::FromInt(StackFrame::STUB));
+void MacroAssembler::StubPrologue() {
+ PushFixedFrame();
+ Push(Smi::FromInt(StackFrame::STUB));
+ // Adjust FP to point to saved FP.
+ add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
+ if (FLAG_enable_ool_constant_pool) {
+ LoadConstantPoolPointerRegister();
+ set_constant_pool_available(true);
+ }
+}
+
+
+void MacroAssembler::Prologue(bool code_pre_aging) {
+ PredictableCodeSizeScope predictible_code_size_scope(
+ this, kNoCodeAgeSequenceLength);
+ // The following three instructions must remain together and unmodified
+ // for code aging to work properly.
+ if (code_pre_aging) {
+ // Pre-age the code.
+ Code* stub = Code::GetPreAgedCodeAgeStub(isolate());
+ add(r0, pc, Operand(-8));
+ ldr(pc, MemOperand(pc, -4));
+ emit_code_stub_address(stub);
+ } else {
+ PushFixedFrame(r1);
+ nop(ip.code());
// Adjust FP to point to saved FP.
add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
- } else {
- PredictableCodeSizeScope predictible_code_size_scope(
- this, kNoCodeAgeSequenceLength);
- // The following three instructions must remain together and unmodified
- // for code aging to work properly.
- if (info->IsCodePreAgingActive()) {
- // Pre-age the code.
- Code* stub = Code::GetPreAgedCodeAgeStub(isolate());
- add(r0, pc, Operand(-8));
- ldr(pc, MemOperand(pc, -4));
- emit_code_stub_address(stub);
- } else {
- PushFixedFrame(r1);
- nop(ip.code());
- // Adjust FP to point to saved FP.
- add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
- }
}
if (FLAG_enable_ool_constant_pool) {
LoadConstantPoolPointerRegister();
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698