OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1316 // Push callee-saved registers and synchronize the system stack pointer (csp) | 1316 // Push callee-saved registers and synchronize the system stack pointer (csp) |
1317 // and the JavaScript stack pointer (jssp). | 1317 // and the JavaScript stack pointer (jssp). |
1318 // | 1318 // |
1319 // We must not write to jssp until after the PushCalleeSavedRegisters() | 1319 // We must not write to jssp until after the PushCalleeSavedRegisters() |
1320 // call, since jssp is itself a callee-saved register. | 1320 // call, since jssp is itself a callee-saved register. |
1321 __ SetStackPointer(csp); | 1321 __ SetStackPointer(csp); |
1322 __ PushCalleeSavedRegisters(); | 1322 __ PushCalleeSavedRegisters(); |
1323 __ Mov(jssp, csp); | 1323 __ Mov(jssp, csp); |
1324 __ SetStackPointer(jssp); | 1324 __ SetStackPointer(jssp); |
1325 | 1325 |
1326 // Configure the FPCR. We don't restore it, so this is technically not allowed | |
1327 // according to AAPCS64. However, we only set default-NaN mode and this will | |
1328 // be harmless for most C code. Also, it works for ARM. | |
1329 __ ConfigureFPCR(); | |
1330 | |
1331 ProfileEntryHookStub::MaybeCallEntryHook(masm); | 1326 ProfileEntryHookStub::MaybeCallEntryHook(masm); |
1332 | 1327 |
1333 // Set up the reserved register for 0.0. | 1328 // Set up the reserved register for 0.0. |
1334 __ Fmov(fp_zero, 0.0); | 1329 __ Fmov(fp_zero, 0.0); |
1335 | 1330 |
1336 // Build an entry frame (see layout below). | 1331 // Build an entry frame (see layout below). |
1337 int marker = type(); | 1332 int marker = type(); |
1338 int64_t bad_frame_pointer = -1L; // Bad frame pointer to fail if it is used. | 1333 int64_t bad_frame_pointer = -1L; // Bad frame pointer to fail if it is used. |
1339 __ Mov(x13, bad_frame_pointer); | 1334 __ Mov(x13, bad_frame_pointer); |
1340 __ Mov(x12, Smi::FromInt(marker)); | 1335 __ Mov(x12, Smi::FromInt(marker)); |
(...skipping 4736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6077 __ Dmb(InnerShareable, BarrierAll); | 6072 __ Dmb(InnerShareable, BarrierAll); |
6078 ReturnUnsignedInteger32(masm, d0, x0, x1, x2); | 6073 ReturnUnsignedInteger32(masm, d0, x0, x1, x2); |
6079 } | 6074 } |
6080 | 6075 |
6081 #undef __ | 6076 #undef __ |
6082 | 6077 |
6083 } // namespace internal | 6078 } // namespace internal |
6084 } // namespace v8 | 6079 } // namespace v8 |
6085 | 6080 |
6086 #endif // V8_TARGET_ARCH_ARM64 | 6081 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |