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

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

Issue 2141723003: PPC/s390: [builtins] Construct builtin frame in String/Number ctors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed Load instr, don't have to update sp 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/ppc/macro-assembler-ppc.h ('k') | src/s390/builtins-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_PPC 8 #if V8_TARGET_ARCH_PPC
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 LoadP(kConstantPoolRegister, 1065 LoadP(kConstantPoolRegister,
1066 MemOperand(fp, StandardFrameConstants::kConstantPoolOffset)); 1066 MemOperand(fp, StandardFrameConstants::kConstantPoolOffset));
1067 } 1067 }
1068 mtlr(r0); 1068 mtlr(r0);
1069 frame_ends = pc_offset(); 1069 frame_ends = pc_offset();
1070 Add(sp, fp, StandardFrameConstants::kCallerSPOffset + stack_adjustment, r0); 1070 Add(sp, fp, StandardFrameConstants::kCallerSPOffset + stack_adjustment, r0);
1071 mr(fp, ip); 1071 mr(fp, ip);
1072 return frame_ends; 1072 return frame_ends;
1073 } 1073 }
1074 1074
1075 void MacroAssembler::EnterBuiltinFrame(Register context, Register target,
1076 Register argc) {
1077 int fp_delta = 0;
1078 mflr(r0);
1079 if (FLAG_enable_embedded_constant_pool) {
1080 if (target.is_valid()) {
1081 Push(r0, fp, kConstantPoolRegister, context, target);
1082 fp_delta = 3;
1083 } else {
1084 Push(r0, fp, kConstantPoolRegister, context);
1085 fp_delta = 2;
1086 }
1087 } else {
1088 if (target.is_valid()) {
1089 Push(r0, fp, context, target);
1090 fp_delta = 2;
1091 } else {
1092 Push(r0, fp, context);
1093 fp_delta = 1;
1094 }
1095 }
1096 addi(fp, sp, Operand(fp_delta * kPointerSize));
1097 Push(argc);
1098 }
1099
1100 void MacroAssembler::LeaveBuiltinFrame(Register context, Register target,
1101 Register argc) {
1102 Pop(argc);
1103 if (FLAG_enable_embedded_constant_pool) {
1104 if (target.is_valid()) {
1105 Pop(r0, fp, kConstantPoolRegister, context, target);
1106 } else {
1107 Pop(r0, fp, kConstantPoolRegister, context);
1108 }
1109 } else {
1110 if (target.is_valid()) {
1111 Pop(r0, fp, context, target);
1112 } else {
1113 Pop(r0, fp, context);
1114 }
1115 }
1116 mtlr(r0);
1117 }
1075 1118
1076 // ExitFrame layout (probably wrongish.. needs updating) 1119 // ExitFrame layout (probably wrongish.. needs updating)
1077 // 1120 //
1078 // SP -> previousSP 1121 // SP -> previousSP
1079 // LK reserved 1122 // LK reserved
1080 // code 1123 // code
1081 // sp_on_exit (for debug?) 1124 // sp_on_exit (for debug?)
1082 // oldSP->prev SP 1125 // oldSP->prev SP
1083 // LK 1126 // LK
1084 // <parameters on stack> 1127 // <parameters on stack>
(...skipping 3787 matching lines...) Expand 10 before | Expand all | Expand 10 after
4872 } 4915 }
4873 if (mag.shift > 0) srawi(result, result, mag.shift); 4916 if (mag.shift > 0) srawi(result, result, mag.shift);
4874 ExtractBit(r0, dividend, 31); 4917 ExtractBit(r0, dividend, 31);
4875 add(result, result, r0); 4918 add(result, result, r0);
4876 } 4919 }
4877 4920
4878 } // namespace internal 4921 } // namespace internal
4879 } // namespace v8 4922 } // namespace v8
4880 4923
4881 #endif // V8_TARGET_ARCH_PPC 4924 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | src/s390/builtins-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698