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

Side by Side Diff: src/ia32/macro-assembler-ia32.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/mips/full-codegen-mips.cc » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 893
894 894
895 void MacroAssembler::AssertNotSmi(Register object) { 895 void MacroAssembler::AssertNotSmi(Register object) {
896 if (emit_debug_code()) { 896 if (emit_debug_code()) {
897 test(object, Immediate(kSmiTagMask)); 897 test(object, Immediate(kSmiTagMask));
898 Check(not_equal, kOperandIsASmi); 898 Check(not_equal, kOperandIsASmi);
899 } 899 }
900 } 900 }
901 901
902 902
903 void MacroAssembler::Prologue(CompilationInfo* info) { 903 void MacroAssembler::StubPrologue() {
904 if (info->IsStub()) { 904 push(ebp); // Caller's frame pointer.
905 mov(ebp, esp);
906 push(esi); // Callee's context.
907 push(Immediate(Smi::FromInt(StackFrame::STUB)));
908 }
909
910
911 void MacroAssembler::Prologue(bool code_pre_aging) {
912 PredictableCodeSizeScope predictible_code_size_scope(this,
913 kNoCodeAgeSequenceLength);
914 if (code_pre_aging) {
915 // Pre-age the code.
916 call(isolate()->builtins()->MarkCodeAsExecutedOnce(),
917 RelocInfo::CODE_AGE_SEQUENCE);
918 Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength);
919 } else {
905 push(ebp); // Caller's frame pointer. 920 push(ebp); // Caller's frame pointer.
906 mov(ebp, esp); 921 mov(ebp, esp);
907 push(esi); // Callee's context. 922 push(esi); // Callee's context.
908 push(Immediate(Smi::FromInt(StackFrame::STUB))); 923 push(edi); // Callee's JS function.
909 } else {
910 PredictableCodeSizeScope predictible_code_size_scope(this,
911 kNoCodeAgeSequenceLength);
912 if (info->IsCodePreAgingActive()) {
913 // Pre-age the code.
914 call(isolate()->builtins()->MarkCodeAsExecutedOnce(),
915 RelocInfo::CODE_AGE_SEQUENCE);
916 Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength);
917 } else {
918 push(ebp); // Caller's frame pointer.
919 mov(ebp, esp);
920 push(esi); // Callee's context.
921 push(edi); // Callee's JS function.
922 }
923 } 924 }
924 } 925 }
925 926
926 927
927 void MacroAssembler::EnterFrame(StackFrame::Type type) { 928 void MacroAssembler::EnterFrame(StackFrame::Type type) {
928 push(ebp); 929 push(ebp);
929 mov(ebp, esp); 930 mov(ebp, esp);
930 push(esi); 931 push(esi);
931 push(Immediate(Smi::FromInt(type))); 932 push(Immediate(Smi::FromInt(type)));
932 push(Immediate(CodeObject())); 933 push(Immediate(CodeObject()));
(...skipping 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after
3458 if (ms.shift() > 0) sar(edx, ms.shift()); 3459 if (ms.shift() > 0) sar(edx, ms.shift());
3459 mov(eax, dividend); 3460 mov(eax, dividend);
3460 shr(eax, 31); 3461 shr(eax, 31);
3461 add(edx, eax); 3462 add(edx, eax);
3462 } 3463 }
3463 3464
3464 3465
3465 } } // namespace v8::internal 3466 } } // namespace v8::internal
3466 3467
3467 #endif // V8_TARGET_ARCH_IA32 3468 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698