| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 | 983 |
| 984 void StoreRegistersStateStub::Generate(MacroAssembler* masm) { | 984 void StoreRegistersStateStub::Generate(MacroAssembler* masm) { |
| 985 MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm); | 985 MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm); |
| 986 UseScratchRegisterScope temps(masm); | 986 UseScratchRegisterScope temps(masm); |
| 987 Register saved_lr = temps.UnsafeAcquire(to_be_pushed_lr()); | 987 Register saved_lr = temps.UnsafeAcquire(to_be_pushed_lr()); |
| 988 Register return_address = temps.AcquireX(); | 988 Register return_address = temps.AcquireX(); |
| 989 __ Mov(return_address, lr); | 989 __ Mov(return_address, lr); |
| 990 // Restore lr with the value it had before the call to this stub (the value | 990 // Restore lr with the value it had before the call to this stub (the value |
| 991 // which must be pushed). | 991 // which must be pushed). |
| 992 __ Mov(lr, saved_lr); | 992 __ Mov(lr, saved_lr); |
| 993 if (save_doubles_ == kSaveFPRegs) { | 993 __ PushSafepointRegisters(); |
| 994 __ PushSafepointRegistersAndDoubles(); | |
| 995 } else { | |
| 996 __ PushSafepointRegisters(); | |
| 997 } | |
| 998 __ Ret(return_address); | 994 __ Ret(return_address); |
| 999 } | 995 } |
| 1000 | 996 |
| 1001 | 997 |
| 1002 void RestoreRegistersStateStub::Generate(MacroAssembler* masm) { | 998 void RestoreRegistersStateStub::Generate(MacroAssembler* masm) { |
| 1003 MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm); | 999 MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm); |
| 1004 UseScratchRegisterScope temps(masm); | 1000 UseScratchRegisterScope temps(masm); |
| 1005 Register return_address = temps.AcquireX(); | 1001 Register return_address = temps.AcquireX(); |
| 1006 // Preserve the return address (lr will be clobbered by the pop). | 1002 // Preserve the return address (lr will be clobbered by the pop). |
| 1007 __ Mov(return_address, lr); | 1003 __ Mov(return_address, lr); |
| 1008 if (save_doubles_ == kSaveFPRegs) { | 1004 __ PopSafepointRegisters(); |
| 1009 __ PopSafepointRegistersAndDoubles(); | |
| 1010 } else { | |
| 1011 __ PopSafepointRegisters(); | |
| 1012 } | |
| 1013 __ Ret(return_address); | 1005 __ Ret(return_address); |
| 1014 } | 1006 } |
| 1015 | 1007 |
| 1016 | 1008 |
| 1017 void MathPowStub::Generate(MacroAssembler* masm) { | 1009 void MathPowStub::Generate(MacroAssembler* masm) { |
| 1018 // Stack on entry: | 1010 // Stack on entry: |
| 1019 // jssp[0]: Exponent (as a tagged value). | 1011 // jssp[0]: Exponent (as a tagged value). |
| 1020 // jssp[1]: Base (as a tagged value). | 1012 // jssp[1]: Base (as a tagged value). |
| 1021 // | 1013 // |
| 1022 // The (tagged) result will be returned in x0, as a heap number. | 1014 // The (tagged) result will be returned in x0, as a heap number. |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 1266 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 1275 CreateAllocationSiteStub::GenerateAheadOfTime(isolate); | 1267 CreateAllocationSiteStub::GenerateAheadOfTime(isolate); |
| 1276 BinaryOpICStub::GenerateAheadOfTime(isolate); | 1268 BinaryOpICStub::GenerateAheadOfTime(isolate); |
| 1277 StoreRegistersStateStub::GenerateAheadOfTime(isolate); | 1269 StoreRegistersStateStub::GenerateAheadOfTime(isolate); |
| 1278 RestoreRegistersStateStub::GenerateAheadOfTime(isolate); | 1270 RestoreRegistersStateStub::GenerateAheadOfTime(isolate); |
| 1279 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate); | 1271 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate); |
| 1280 } | 1272 } |
| 1281 | 1273 |
| 1282 | 1274 |
| 1283 void StoreRegistersStateStub::GenerateAheadOfTime(Isolate* isolate) { | 1275 void StoreRegistersStateStub::GenerateAheadOfTime(Isolate* isolate) { |
| 1284 StoreRegistersStateStub stub1(isolate, kDontSaveFPRegs); | 1276 StoreRegistersStateStub stub(isolate); |
| 1285 stub1.GetCode(); | 1277 stub.GetCode(); |
| 1286 StoreRegistersStateStub stub2(isolate, kSaveFPRegs); | |
| 1287 stub2.GetCode(); | |
| 1288 } | 1278 } |
| 1289 | 1279 |
| 1290 | 1280 |
| 1291 void RestoreRegistersStateStub::GenerateAheadOfTime(Isolate* isolate) { | 1281 void RestoreRegistersStateStub::GenerateAheadOfTime(Isolate* isolate) { |
| 1292 RestoreRegistersStateStub stub1(isolate, kDontSaveFPRegs); | 1282 RestoreRegistersStateStub stub(isolate); |
| 1293 stub1.GetCode(); | 1283 stub.GetCode(); |
| 1294 RestoreRegistersStateStub stub2(isolate, kSaveFPRegs); | |
| 1295 stub2.GetCode(); | |
| 1296 } | 1284 } |
| 1297 | 1285 |
| 1298 | 1286 |
| 1299 void CodeStub::GenerateFPStubs(Isolate* isolate) { | 1287 void CodeStub::GenerateFPStubs(Isolate* isolate) { |
| 1300 // Floating-point code doesn't get special handling in ARM64, so there's | 1288 // Floating-point code doesn't get special handling in ARM64, so there's |
| 1301 // nothing to do here. | 1289 // nothing to do here. |
| 1302 USE(isolate); | 1290 USE(isolate); |
| 1303 } | 1291 } |
| 1304 | 1292 |
| 1305 | 1293 |
| (...skipping 4107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5413 MemOperand(fp, 6 * kPointerSize), | 5401 MemOperand(fp, 6 * kPointerSize), |
| 5414 NULL); | 5402 NULL); |
| 5415 } | 5403 } |
| 5416 | 5404 |
| 5417 | 5405 |
| 5418 #undef __ | 5406 #undef __ |
| 5419 | 5407 |
| 5420 } } // namespace v8::internal | 5408 } } // namespace v8::internal |
| 5421 | 5409 |
| 5422 #endif // V8_TARGET_ARCH_ARM64 | 5410 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |