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

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

Issue 1016333002: PPC: Remove kind field from StackHandler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | 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 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 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #if V8_TARGET_ARCH_PPC 10 #if V8_TARGET_ARCH_PPC
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 int handler_index) { 1090 int handler_index) {
1091 // Adjust this code if not the case. 1091 // Adjust this code if not the case.
1092 STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize); 1092 STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize);
1093 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); 1093 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
1094 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize); 1094 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize);
1095 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize); 1095 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize);
1096 1096
1097 // For the JSEntry handler, we must preserve r1-r7, r0,r8-r12 are available. 1097 // For the JSEntry handler, we must preserve r1-r7, r0,r8-r12 are available.
1098 // We want the stack to look like 1098 // We want the stack to look like
1099 // sp -> NextOffset 1099 // sp -> NextOffset
1100 // state 1100 // index
1101 // context 1101 // context
1102 1102
1103 // Link the current handler as the next handler. 1103 // Link the current handler as the next handler.
1104 mov(r8, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); 1104 mov(r8, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
1105 LoadP(r0, MemOperand(r8)); 1105 LoadP(r0, MemOperand(r8));
1106 StorePU(r0, MemOperand(sp, -StackHandlerConstants::kSize)); 1106 StorePU(r0, MemOperand(sp, -StackHandlerConstants::kSize));
1107 // Set this new handler as the current one. 1107 // Set this new handler as the current one.
1108 StoreP(sp, MemOperand(r8)); 1108 StoreP(sp, MemOperand(r8));
1109 1109
1110 unsigned state = StackHandler::IndexField::encode(handler_index) | 1110 mov(r8, Operand(handler_index));
1111 StackHandler::KindField::encode(kind);
1112 LoadIntLiteral(r8, state);
1113
1114 if (kind == StackHandler::JS_ENTRY) { 1111 if (kind == StackHandler::JS_ENTRY) {
1115 LoadSmiLiteral(cp, Smi::FromInt(0)); // Indicates no context. 1112 LoadSmiLiteral(cp, Smi::FromInt(0)); // Indicates no context.
1116 } 1113 }
1117 StoreP(r8, MemOperand(sp, StackHandlerConstants::kStateOffset)); 1114 StoreP(r8, MemOperand(sp, StackHandlerConstants::kStateOffset));
1118 StoreP(cp, MemOperand(sp, StackHandlerConstants::kContextOffset)); 1115 StoreP(cp, MemOperand(sp, StackHandlerConstants::kContextOffset));
1119 } 1116 }
1120 1117
1121 1118
1122 void MacroAssembler::PopTryHandler() { 1119 void MacroAssembler::PopTryHandler() {
1123 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); 1120 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
(...skipping 3418 matching lines...) Expand 10 before | Expand all | Expand 10 after
4542 } 4539 }
4543 if (mag.shift > 0) srawi(result, result, mag.shift); 4540 if (mag.shift > 0) srawi(result, result, mag.shift);
4544 ExtractBit(r0, dividend, 31); 4541 ExtractBit(r0, dividend, 31);
4545 add(result, result, r0); 4542 add(result, result, r0);
4546 } 4543 }
4547 4544
4548 } // namespace internal 4545 } // namespace internal
4549 } // namespace v8 4546 } // namespace v8
4550 4547
4551 #endif // V8_TARGET_ARCH_PPC 4548 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698