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

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

Issue 985803002: Remove code object 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 | 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 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 == 5 * kPointerSize); 1402 STATIC_ASSERT(StackHandlerConstants::kSize == 4 * kPointerSize);
1403 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); 1403 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
1404 STATIC_ASSERT(StackHandlerConstants::kCodeOffset == 1 * kPointerSize); 1404 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize);
1405 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 2 * kPointerSize); 1405 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize);
1406 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 3 * kPointerSize); 1406 STATIC_ASSERT(StackHandlerConstants::kFPOffset == 3 * kPointerSize);
1407 STATIC_ASSERT(StackHandlerConstants::kFPOffset == 4 * kPointerSize);
1408 1407
1409 // For the JSEntry handler, we must preserve r0-r4, r5-r6 are available. 1408 // For the JSEntry handler, we must preserve r0-r4, r5-r6 are available.
1410 // We will build up the handler from the bottom by pushing on the stack. 1409 // We will build up the handler from the bottom by pushing on the stack.
1411 // Set up the code object (r5) and the state (r6) for pushing. 1410 // Set up the the state (r6) for pushing.
1412 unsigned state = 1411 unsigned state =
1413 StackHandler::IndexField::encode(handler_index) | 1412 StackHandler::IndexField::encode(handler_index) |
1414 StackHandler::KindField::encode(kind); 1413 StackHandler::KindField::encode(kind);
1415 mov(r5, Operand(CodeObject()));
1416 mov(r6, Operand(state)); 1414 mov(r6, Operand(state));
1417 1415
1418 // Push the frame pointer, context, state, and code object. 1416 // Push the frame pointer, context, and state.
1419 if (kind == StackHandler::JS_ENTRY) { 1417 if (kind == StackHandler::JS_ENTRY) {
1420 mov(cp, Operand(Smi::FromInt(0))); // Indicates no context. 1418 mov(cp, Operand(Smi::FromInt(0))); // Indicates no context.
1421 mov(ip, Operand::Zero()); // NULL frame pointer. 1419 mov(ip, Operand::Zero()); // NULL frame pointer.
1422 stm(db_w, sp, r5.bit() | r6.bit() | cp.bit() | ip.bit()); 1420 stm(db_w, sp, r6.bit() | cp.bit() | ip.bit());
1423 } else { 1421 } else {
1424 stm(db_w, sp, r5.bit() | r6.bit() | cp.bit() | fp.bit()); 1422 stm(db_w, sp, r6.bit() | cp.bit() | fp.bit());
1425 } 1423 }
1426 1424
1427 // Link the current handler as the next handler. 1425 // Link the current handler as the next handler.
1428 mov(r6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); 1426 mov(r6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
1429 ldr(r5, MemOperand(r6)); 1427 ldr(r5, MemOperand(r6));
1430 push(r5); 1428 push(r5);
1431 // Set this new handler as the current one. 1429 // Set this new handler as the current one.
1432 str(sp, MemOperand(r6)); 1430 str(sp, MemOperand(r6));
1433 } 1431 }
1434 1432
(...skipping 2463 matching lines...) Expand 10 before | Expand all | Expand 10 after
3898 } 3896 }
3899 } 3897 }
3900 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3898 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3901 add(result, result, Operand(dividend, LSR, 31)); 3899 add(result, result, Operand(dividend, LSR, 31));
3902 } 3900 }
3903 3901
3904 } // namespace internal 3902 } // namespace internal
3905 } // namespace v8 3903 } // namespace v8
3906 3904
3907 #endif // V8_TARGET_ARCH_ARM 3905 #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