| OLD | NEW |
| 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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 | 901 |
| 902 | 902 |
| 903 void MacroAssembler::AssertNotSmi(Register object) { | 903 void MacroAssembler::AssertNotSmi(Register object) { |
| 904 if (emit_debug_code()) { | 904 if (emit_debug_code()) { |
| 905 test(object, Immediate(kSmiTagMask)); | 905 test(object, Immediate(kSmiTagMask)); |
| 906 Check(not_equal, kOperandIsASmi); | 906 Check(not_equal, kOperandIsASmi); |
| 907 } | 907 } |
| 908 } | 908 } |
| 909 | 909 |
| 910 | 910 |
| 911 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { | 911 void MacroAssembler::Prologue(CompilationInfo* info) { |
| 912 if (frame_mode == BUILD_STUB_FRAME) { | 912 if (info->IsStub()) { |
| 913 push(ebp); // Caller's frame pointer. | 913 push(ebp); // Caller's frame pointer. |
| 914 mov(ebp, esp); | 914 mov(ebp, esp); |
| 915 push(esi); // Callee's context. | 915 push(esi); // Callee's context. |
| 916 push(Immediate(Smi::FromInt(StackFrame::STUB))); | 916 push(Immediate(Smi::FromInt(StackFrame::STUB))); |
| 917 } else { | 917 } else { |
| 918 PredictableCodeSizeScope predictible_code_size_scope(this, | 918 PredictableCodeSizeScope predictible_code_size_scope(this, |
| 919 kNoCodeAgeSequenceLength); | 919 kNoCodeAgeSequenceLength); |
| 920 if (isolate()->IsCodePreAgingActive()) { | 920 if (info->IsCodePreAgingActive()) { |
| 921 // Pre-age the code. | 921 // Pre-age the code. |
| 922 call(isolate()->builtins()->MarkCodeAsExecutedOnce(), | 922 call(isolate()->builtins()->MarkCodeAsExecutedOnce(), |
| 923 RelocInfo::CODE_AGE_SEQUENCE); | 923 RelocInfo::CODE_AGE_SEQUENCE); |
| 924 Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength); | 924 Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength); |
| 925 } else { | 925 } else { |
| 926 push(ebp); // Caller's frame pointer. | 926 push(ebp); // Caller's frame pointer. |
| 927 mov(ebp, esp); | 927 mov(ebp, esp); |
| 928 push(esi); // Callee's context. | 928 push(esi); // Callee's context. |
| 929 push(edi); // Callee's JS function. | 929 push(edi); // Callee's JS function. |
| 930 } | 930 } |
| (...skipping 2534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3465 if (ms.shift() > 0) sar(edx, ms.shift()); | 3465 if (ms.shift() > 0) sar(edx, ms.shift()); |
| 3466 mov(eax, dividend); | 3466 mov(eax, dividend); |
| 3467 shr(eax, 31); | 3467 shr(eax, 31); |
| 3468 add(edx, eax); | 3468 add(edx, eax); |
| 3469 } | 3469 } |
| 3470 | 3470 |
| 3471 | 3471 |
| 3472 } } // namespace v8::internal | 3472 } } // namespace v8::internal |
| 3473 | 3473 |
| 3474 #endif // V8_TARGET_ARCH_IA32 | 3474 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |