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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 } | 926 } |
927 | 927 |
928 void MacroAssembler::MovInt64ToDouble(DoubleRegister dst, Register src) { | 928 void MacroAssembler::MovInt64ToDouble(DoubleRegister dst, Register src) { |
929 ldgr(dst, src); | 929 ldgr(dst, src); |
930 } | 930 } |
931 | 931 |
932 void MacroAssembler::StubPrologue(StackFrame::Type type, Register base, | 932 void MacroAssembler::StubPrologue(StackFrame::Type type, Register base, |
933 int prologue_offset) { | 933 int prologue_offset) { |
934 { | 934 { |
935 ConstantPoolUnavailableScope constant_pool_unavailable(this); | 935 ConstantPoolUnavailableScope constant_pool_unavailable(this); |
936 LoadSmiLiteral(r1, Smi::FromInt(type)); | 936 Load(r1, Operand(StackFrame::TypeToMarker(type))); |
937 PushCommonFrame(r1); | 937 PushCommonFrame(r1); |
938 } | 938 } |
939 } | 939 } |
940 | 940 |
941 void MacroAssembler::Prologue(bool code_pre_aging, Register base, | 941 void MacroAssembler::Prologue(bool code_pre_aging, Register base, |
942 int prologue_offset) { | 942 int prologue_offset) { |
943 DCHECK(!base.is(no_reg)); | 943 DCHECK(!base.is(no_reg)); |
944 { | 944 { |
945 PredictableCodeSizeScope predictible_code_size_scope( | 945 PredictableCodeSizeScope predictible_code_size_scope( |
946 this, kNoCodeAgeSequenceLength); | 946 this, kNoCodeAgeSequenceLength); |
(...skipping 30 matching lines...) Expand all Loading... |
977 | 977 |
978 void MacroAssembler::EnterFrame(StackFrame::Type type, | 978 void MacroAssembler::EnterFrame(StackFrame::Type type, |
979 bool load_constant_pool_pointer_reg) { | 979 bool load_constant_pool_pointer_reg) { |
980 // We create a stack frame with: | 980 // We create a stack frame with: |
981 // Return Addr <-- old sp | 981 // Return Addr <-- old sp |
982 // Old FP <-- new fp | 982 // Old FP <-- new fp |
983 // CP | 983 // CP |
984 // type | 984 // type |
985 // CodeObject <-- new sp | 985 // CodeObject <-- new sp |
986 | 986 |
987 LoadSmiLiteral(ip, Smi::FromInt(type)); | 987 Load(ip, Operand(StackFrame::TypeToMarker(type))); |
988 PushCommonFrame(ip); | 988 PushCommonFrame(ip); |
989 | 989 |
990 if (type == StackFrame::INTERNAL) { | 990 if (type == StackFrame::INTERNAL) { |
991 mov(r0, Operand(CodeObject())); | 991 mov(r0, Operand(CodeObject())); |
992 push(r0); | 992 push(r0); |
993 } | 993 } |
994 } | 994 } |
995 | 995 |
996 int MacroAssembler::LeaveFrame(StackFrame::Type type, int stack_adjustment) { | 996 int MacroAssembler::LeaveFrame(StackFrame::Type type, int stack_adjustment) { |
997 // Drop the execution stack down to the frame pointer and restore | 997 // Drop the execution stack down to the frame pointer and restore |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 // Set up the frame structure on the stack. | 1050 // Set up the frame structure on the stack. |
1051 DCHECK_EQ(2 * kPointerSize, ExitFrameConstants::kCallerSPDisplacement); | 1051 DCHECK_EQ(2 * kPointerSize, ExitFrameConstants::kCallerSPDisplacement); |
1052 DCHECK_EQ(1 * kPointerSize, ExitFrameConstants::kCallerPCOffset); | 1052 DCHECK_EQ(1 * kPointerSize, ExitFrameConstants::kCallerPCOffset); |
1053 DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset); | 1053 DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset); |
1054 DCHECK(stack_space > 0); | 1054 DCHECK(stack_space > 0); |
1055 | 1055 |
1056 // This is an opportunity to build a frame to wrap | 1056 // This is an opportunity to build a frame to wrap |
1057 // all of the pushes that have happened inside of V8 | 1057 // all of the pushes that have happened inside of V8 |
1058 // since we were called from C code | 1058 // since we were called from C code |
1059 CleanseP(r14); | 1059 CleanseP(r14); |
1060 LoadSmiLiteral(r1, Smi::FromInt(frame_type)); | 1060 Load(r1, Operand(StackFrame::TypeToMarker(frame_type))); |
1061 PushCommonFrame(r1); | 1061 PushCommonFrame(r1); |
1062 // Reserve room for saved entry sp and code object. | 1062 // Reserve room for saved entry sp and code object. |
1063 lay(sp, MemOperand(fp, -ExitFrameConstants::kFixedFrameSizeFromFp)); | 1063 lay(sp, MemOperand(fp, -ExitFrameConstants::kFixedFrameSizeFromFp)); |
1064 | 1064 |
1065 if (emit_debug_code()) { | 1065 if (emit_debug_code()) { |
1066 StoreP(MemOperand(fp, ExitFrameConstants::kSPOffset), Operand::Zero(), r1); | 1066 StoreP(MemOperand(fp, ExitFrameConstants::kSPOffset), Operand::Zero(), r1); |
1067 } | 1067 } |
1068 mov(r1, Operand(CodeObject())); | 1068 mov(r1, Operand(CodeObject())); |
1069 StoreP(r1, MemOperand(fp, ExitFrameConstants::kCodeOffset)); | 1069 StoreP(r1, MemOperand(fp, ExitFrameConstants::kCodeOffset)); |
1070 | 1070 |
(...skipping 4274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5345 } | 5345 } |
5346 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5346 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
5347 ExtractBit(r0, dividend, 31); | 5347 ExtractBit(r0, dividend, 31); |
5348 AddP(result, r0); | 5348 AddP(result, r0); |
5349 } | 5349 } |
5350 | 5350 |
5351 } // namespace internal | 5351 } // namespace internal |
5352 } // namespace v8 | 5352 } // namespace v8 |
5353 | 5353 |
5354 #endif // V8_TARGET_ARCH_S390 | 5354 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |