| OLD | NEW |
| 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_S390 | 8 #if V8_TARGET_ARCH_S390 |
| 9 | 9 |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1465 | 1465 |
| 1466 void MacroAssembler::DebugBreak() { | 1466 void MacroAssembler::DebugBreak() { |
| 1467 LoadImmP(r2, Operand::Zero()); | 1467 LoadImmP(r2, Operand::Zero()); |
| 1468 mov(r3, | 1468 mov(r3, |
| 1469 Operand(ExternalReference(Runtime::kHandleDebuggerStatement, isolate()))); | 1469 Operand(ExternalReference(Runtime::kHandleDebuggerStatement, isolate()))); |
| 1470 CEntryStub ces(isolate(), 1); | 1470 CEntryStub ces(isolate(), 1); |
| 1471 DCHECK(AllowThisStubCall(&ces)); | 1471 DCHECK(AllowThisStubCall(&ces)); |
| 1472 Call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); | 1472 Call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); |
| 1473 } | 1473 } |
| 1474 | 1474 |
| 1475 void MacroAssembler::MaybeDropFrames() { |
| 1476 // Check whether we need to drop frames to restart a function on the stack. |
| 1477 ExternalReference restart_fp = |
| 1478 ExternalReference::debug_restart_fp_address(isolate()); |
| 1479 mov(r3, Operand(restart_fp)); |
| 1480 LoadP(r3, MemOperand(r3)); |
| 1481 CmpP(r3, Operand::Zero()); |
| 1482 Jump(isolate()->builtins()->FrameDropperTrampoline(), RelocInfo::CODE_TARGET, |
| 1483 ne); |
| 1484 } |
| 1485 |
| 1475 void MacroAssembler::PushStackHandler() { | 1486 void MacroAssembler::PushStackHandler() { |
| 1476 // Adjust this code if not the case. | 1487 // Adjust this code if not the case. |
| 1477 STATIC_ASSERT(StackHandlerConstants::kSize == 1 * kPointerSize); | 1488 STATIC_ASSERT(StackHandlerConstants::kSize == 1 * kPointerSize); |
| 1478 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); | 1489 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); |
| 1479 | 1490 |
| 1480 // Link the current handler as the next handler. | 1491 // Link the current handler as the next handler. |
| 1481 mov(r7, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); | 1492 mov(r7, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); |
| 1482 | 1493 |
| 1483 // Buy the full stack frame for 5 slots. | 1494 // Buy the full stack frame for 5 slots. |
| 1484 lay(sp, MemOperand(sp, -StackHandlerConstants::kSize)); | 1495 lay(sp, MemOperand(sp, -StackHandlerConstants::kSize)); |
| (...skipping 3725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5210 } | 5221 } |
| 5211 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5222 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
| 5212 ExtractBit(r0, dividend, 31); | 5223 ExtractBit(r0, dividend, 31); |
| 5213 AddP(result, r0); | 5224 AddP(result, r0); |
| 5214 } | 5225 } |
| 5215 | 5226 |
| 5216 } // namespace internal | 5227 } // namespace internal |
| 5217 } // namespace v8 | 5228 } // namespace v8 |
| 5218 | 5229 |
| 5219 #endif // V8_TARGET_ARCH_S390 | 5230 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |