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

Side by Side Diff: src/x87/macro-assembler-x87.cc

Issue 2132303002: X87: [builtins] Construct builtin frame in String/Number ctors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | no next file » | 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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 1071
1072 void MacroAssembler::LeaveFrame(StackFrame::Type type) { 1072 void MacroAssembler::LeaveFrame(StackFrame::Type type) {
1073 if (emit_debug_code()) { 1073 if (emit_debug_code()) {
1074 cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset), 1074 cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset),
1075 Immediate(Smi::FromInt(type))); 1075 Immediate(Smi::FromInt(type)));
1076 Check(equal, kStackFrameTypesMustMatch); 1076 Check(equal, kStackFrameTypesMustMatch);
1077 } 1077 }
1078 leave(); 1078 leave();
1079 } 1079 }
1080 1080
1081 void MacroAssembler::EnterBuiltinFrame(Register context, Register target,
1082 Register argc) {
1083 Push(ebp);
1084 Move(ebp, esp);
1085 Push(context);
1086 Push(target);
1087 Push(argc);
1088 }
1089
1090 void MacroAssembler::LeaveBuiltinFrame(Register context, Register target,
1091 Register argc) {
1092 Pop(argc);
1093 Pop(target);
1094 Pop(context);
1095 leave();
1096 }
1097
1081 void MacroAssembler::EnterExitFramePrologue(StackFrame::Type frame_type) { 1098 void MacroAssembler::EnterExitFramePrologue(StackFrame::Type frame_type) {
1082 DCHECK(frame_type == StackFrame::EXIT || 1099 DCHECK(frame_type == StackFrame::EXIT ||
1083 frame_type == StackFrame::BUILTIN_EXIT); 1100 frame_type == StackFrame::BUILTIN_EXIT);
1084 1101
1085 // Set up the frame structure on the stack. 1102 // Set up the frame structure on the stack.
1086 DCHECK_EQ(+2 * kPointerSize, ExitFrameConstants::kCallerSPDisplacement); 1103 DCHECK_EQ(+2 * kPointerSize, ExitFrameConstants::kCallerSPDisplacement);
1087 DCHECK_EQ(+1 * kPointerSize, ExitFrameConstants::kCallerPCOffset); 1104 DCHECK_EQ(+1 * kPointerSize, ExitFrameConstants::kCallerPCOffset);
1088 DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset); 1105 DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset);
1089 push(ebp); 1106 push(ebp);
1090 mov(ebp, esp); 1107 mov(ebp, esp);
(...skipping 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after
3284 mov(eax, dividend); 3301 mov(eax, dividend);
3285 shr(eax, 31); 3302 shr(eax, 31);
3286 add(edx, eax); 3303 add(edx, eax);
3287 } 3304 }
3288 3305
3289 3306
3290 } // namespace internal 3307 } // namespace internal
3291 } // namespace v8 3308 } // namespace v8
3292 3309
3293 #endif // V8_TARGET_ARCH_X87 3310 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698