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

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

Issue 991893003: Remove frame pointer from StackHandler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_stack-handler-1
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 | « src/arm/frames-arm.h ('k') | src/arm64/frames-arm64.h » ('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 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak, isolate()))); 1392 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak, isolate())));
1393 CEntryStub ces(isolate(), 1); 1393 CEntryStub ces(isolate(), 1);
1394 DCHECK(AllowThisStubCall(&ces)); 1394 DCHECK(AllowThisStubCall(&ces));
1395 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); 1395 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK);
1396 } 1396 }
1397 1397
1398 1398
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 == 4 * 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 STATIC_ASSERT(StackHandlerConstants::kFPOffset == 3 * kPointerSize);
1407 1406
1408 // 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.
1409 // 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.
1410 // Set up the the state (r6) for pushing. 1409 // Set up the the state (r6) for pushing.
1411 unsigned state = 1410 unsigned state =
1412 StackHandler::IndexField::encode(handler_index) | 1411 StackHandler::IndexField::encode(handler_index) |
1413 StackHandler::KindField::encode(kind); 1412 StackHandler::KindField::encode(kind);
1414 mov(r6, Operand(state)); 1413 mov(r6, Operand(state));
1415 1414
1416 // Push the frame pointer, context, and state. 1415 // Push the context and state.
1417 if (kind == StackHandler::JS_ENTRY) { 1416 if (kind == StackHandler::JS_ENTRY) {
1418 mov(cp, Operand(Smi::FromInt(0))); // Indicates no context. 1417 mov(cp, Operand(Smi::FromInt(0))); // Indicates no context.
1419 mov(ip, Operand::Zero()); // NULL frame pointer. 1418 stm(db_w, sp, r6.bit() | cp.bit());
1420 stm(db_w, sp, r6.bit() | cp.bit() | ip.bit());
1421 } else { 1419 } else {
1422 stm(db_w, sp, r6.bit() | cp.bit() | fp.bit()); 1420 stm(db_w, sp, r6.bit() | cp.bit());
1423 } 1421 }
1424 1422
1425 // Link the current handler as the next handler. 1423 // Link the current handler as the next handler.
1426 mov(r6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); 1424 mov(r6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
1427 ldr(r5, MemOperand(r6)); 1425 ldr(r5, MemOperand(r6));
1428 push(r5); 1426 push(r5);
1429 // Set this new handler as the current one. 1427 // Set this new handler as the current one.
1430 str(sp, MemOperand(r6)); 1428 str(sp, MemOperand(r6));
1431 } 1429 }
1432 1430
(...skipping 2463 matching lines...) Expand 10 before | Expand all | Expand 10 after
3896 } 3894 }
3897 } 3895 }
3898 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3896 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3899 add(result, result, Operand(dividend, LSR, 31)); 3897 add(result, result, Operand(dividend, LSR, 31));
3900 } 3898 }
3901 3899
3902 } // namespace internal 3900 } // namespace internal
3903 } // namespace v8 3901 } // namespace v8
3904 3902
3905 #endif // V8_TARGET_ARCH_ARM 3903 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/frames-arm.h ('k') | src/arm64/frames-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698