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

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

Issue 1002203002: Remove kind field from StackHandler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add TODO. 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 | src/arm64/macro-assembler-arm64.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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_ARM 9 #if V8_TARGET_ARCH_ARM
10 10
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 void MacroAssembler::PushTryHandler(StackHandler::Kind kind, 1399 void MacroAssembler::PushTryHandler(StackHandler::Kind kind,
1400 int handler_index) { 1400 int handler_index) {
1401 // Adjust this code if not the case. 1401 // Adjust this code if not the case.
1402 STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize); 1402 STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize);
1403 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); 1403 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
1404 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize); 1404 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize);
1405 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize); 1405 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize);
1406 1406
1407 // For the JSEntry handler, we must preserve r0-r4, r5-r6 are available. 1407 // For the JSEntry handler, we must preserve r0-r4, r5-r6 are available.
1408 // We will build up the handler from the bottom by pushing on the stack. 1408 // We will build up the handler from the bottom by pushing on the stack.
1409 // Set up the the state (r6) for pushing. 1409 // Set up the the index (r6) for pushing.
1410 unsigned state = 1410 mov(r6, Operand(handler_index));
1411 StackHandler::IndexField::encode(handler_index) |
1412 StackHandler::KindField::encode(kind);
1413 mov(r6, Operand(state));
1414 1411
1415 // Push the context and state. 1412 // Push the context and index.
1416 if (kind == StackHandler::JS_ENTRY) { 1413 if (kind == StackHandler::JS_ENTRY) {
1417 mov(cp, Operand(Smi::FromInt(0))); // Indicates no context. 1414 mov(cp, Operand(Smi::FromInt(0))); // Indicates no context.
1418 stm(db_w, sp, r6.bit() | cp.bit()); 1415 stm(db_w, sp, r6.bit() | cp.bit());
1419 } else { 1416 } else {
1420 stm(db_w, sp, r6.bit() | cp.bit()); 1417 stm(db_w, sp, r6.bit() | cp.bit());
1421 } 1418 }
1422 1419
1423 // Link the current handler as the next handler. 1420 // Link the current handler as the next handler.
1424 mov(r6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); 1421 mov(r6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
1425 ldr(r5, MemOperand(r6)); 1422 ldr(r5, MemOperand(r6));
(...skipping 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after
3894 } 3891 }
3895 } 3892 }
3896 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3893 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3897 add(result, result, Operand(dividend, LSR, 31)); 3894 add(result, result, Operand(dividend, LSR, 31));
3898 } 3895 }
3899 3896
3900 } // namespace internal 3897 } // namespace internal
3901 } // namespace v8 3898 } // namespace v8
3902 3899
3903 #endif // V8_TARGET_ARCH_ARM 3900 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698