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 2701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2712 RecordComment("Abort message: "); | 2712 RecordComment("Abort message: "); |
2713 RecordComment(msg); | 2713 RecordComment(msg); |
2714 } | 2714 } |
2715 | 2715 |
2716 if (FLAG_trap_on_abort) { | 2716 if (FLAG_trap_on_abort) { |
2717 stop(msg); | 2717 stop(msg); |
2718 return; | 2718 return; |
2719 } | 2719 } |
2720 #endif | 2720 #endif |
2721 | 2721 |
2722 LoadSmiLiteral(r0, Smi::FromInt(reason)); | 2722 // Check if Abort() has already been initialized. |
2723 push(r0); | 2723 DCHECK(isolate()->builtins()->Abort()->IsHeapObject()); |
| 2724 |
| 2725 LoadSmiLiteral(r3, Smi::FromInt(static_cast<int>(reason))); |
| 2726 |
2724 // Disable stub call restrictions to always allow calls to abort. | 2727 // Disable stub call restrictions to always allow calls to abort. |
2725 if (!has_frame_) { | 2728 if (!has_frame_) { |
2726 // We don't actually want to generate a pile of code for this, so just | 2729 // We don't actually want to generate a pile of code for this, so just |
2727 // claim there is a stack frame, without generating one. | 2730 // claim there is a stack frame, without generating one. |
2728 FrameScope scope(this, StackFrame::NONE); | 2731 FrameScope scope(this, StackFrame::NONE); |
2729 CallRuntime(Runtime::kAbort); | 2732 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); |
2730 } else { | 2733 } else { |
2731 CallRuntime(Runtime::kAbort); | 2734 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); |
2732 } | 2735 } |
2733 // will not return here | 2736 // will not return here |
2734 } | 2737 } |
2735 | 2738 |
2736 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { | 2739 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { |
2737 if (context_chain_length > 0) { | 2740 if (context_chain_length > 0) { |
2738 // Move up the chain of contexts to the context containing the slot. | 2741 // Move up the chain of contexts to the context containing the slot. |
2739 LoadP(dst, MemOperand(cp, Context::SlotOffset(Context::PREVIOUS_INDEX))); | 2742 LoadP(dst, MemOperand(cp, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
2740 for (int i = 1; i < context_chain_length; i++) { | 2743 for (int i = 1; i < context_chain_length; i++) { |
2741 LoadP(dst, MemOperand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); | 2744 LoadP(dst, MemOperand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
(...skipping 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5522 } | 5525 } |
5523 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5526 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
5524 ExtractBit(r0, dividend, 31); | 5527 ExtractBit(r0, dividend, 31); |
5525 AddP(result, r0); | 5528 AddP(result, r0); |
5526 } | 5529 } |
5527 | 5530 |
5528 } // namespace internal | 5531 } // namespace internal |
5529 } // namespace v8 | 5532 } // namespace v8 |
5530 | 5533 |
5531 #endif // V8_TARGET_ARCH_S390 | 5534 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |