| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 | 1126 |
| 1127 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( | 1127 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( |
| 1128 Isolate* isolate) { | 1128 Isolate* isolate) { |
| 1129 StoreBufferOverflowStub stub1(kDontSaveFPRegs); | 1129 StoreBufferOverflowStub stub1(kDontSaveFPRegs); |
| 1130 stub1.GetCode(isolate); | 1130 stub1.GetCode(isolate); |
| 1131 StoreBufferOverflowStub stub2(kSaveFPRegs); | 1131 StoreBufferOverflowStub stub2(kSaveFPRegs); |
| 1132 stub2.GetCode(isolate); | 1132 stub2.GetCode(isolate); |
| 1133 } | 1133 } |
| 1134 | 1134 |
| 1135 | 1135 |
| 1136 void StoreRegistersStateStub::Generate(MacroAssembler* masm) { |
| 1137 MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm); |
| 1138 UseScratchRegisterScope temps(masm); |
| 1139 Register saved_lr = temps.Acquire(to_be_pushed_lr()); |
| 1140 Register return_address = temps.AcquireX(); |
| 1141 __ Mov(return_address, lr); |
| 1142 // Restore lr with the value it had before the call to this stub (the value |
| 1143 // which must be pushed). |
| 1144 __ Mov(lr, saved_lr); |
| 1145 if (save_doubles_ == kSaveFPRegs) { |
| 1146 __ PushSafepointRegistersAndDoubles(); |
| 1147 } else { |
| 1148 __ PushSafepointRegisters(); |
| 1149 } |
| 1150 masm->Ret(return_address); |
| 1151 } |
| 1152 |
| 1153 |
| 1154 void RestoreRegistersStateStub::Generate(MacroAssembler* masm) { |
| 1155 MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm); |
| 1156 UseScratchRegisterScope temps(masm); |
| 1157 Register return_address = temps.AcquireX(); |
| 1158 // Preserve the return address (lr will be clobbered by the pop). |
| 1159 __ Mov(return_address, lr); |
| 1160 if (save_doubles_ == kSaveFPRegs) { |
| 1161 __ PopSafepointRegistersAndDoubles(); |
| 1162 } else { |
| 1163 __ PopSafepointRegisters(); |
| 1164 } |
| 1165 masm->Ret(return_address); |
| 1166 } |
| 1167 |
| 1168 |
| 1136 void MathPowStub::Generate(MacroAssembler* masm) { | 1169 void MathPowStub::Generate(MacroAssembler* masm) { |
| 1137 // Stack on entry: | 1170 // Stack on entry: |
| 1138 // jssp[0]: Exponent (as a tagged value). | 1171 // jssp[0]: Exponent (as a tagged value). |
| 1139 // jssp[1]: Base (as a tagged value). | 1172 // jssp[1]: Base (as a tagged value). |
| 1140 // | 1173 // |
| 1141 // The (tagged) result will be returned in x0, as a heap number. | 1174 // The (tagged) result will be returned in x0, as a heap number. |
| 1142 | 1175 |
| 1143 Register result_tagged = x0; | 1176 Register result_tagged = x0; |
| 1144 Register base_tagged = x10; | 1177 Register base_tagged = x10; |
| 1145 Register exponent_tagged = x11; | 1178 Register exponent_tagged = x11; |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 // It is important that the following stubs are generated in this order | 1420 // It is important that the following stubs are generated in this order |
| 1388 // because pregenerated stubs can only call other pregenerated stubs. | 1421 // because pregenerated stubs can only call other pregenerated stubs. |
| 1389 // RecordWriteStub uses StoreBufferOverflowStub, which in turn uses | 1422 // RecordWriteStub uses StoreBufferOverflowStub, which in turn uses |
| 1390 // CEntryStub. | 1423 // CEntryStub. |
| 1391 CEntryStub::GenerateAheadOfTime(isolate); | 1424 CEntryStub::GenerateAheadOfTime(isolate); |
| 1392 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate); | 1425 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate); |
| 1393 StubFailureTrampolineStub::GenerateAheadOfTime(isolate); | 1426 StubFailureTrampolineStub::GenerateAheadOfTime(isolate); |
| 1394 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 1427 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 1395 CreateAllocationSiteStub::GenerateAheadOfTime(isolate); | 1428 CreateAllocationSiteStub::GenerateAheadOfTime(isolate); |
| 1396 BinaryOpICStub::GenerateAheadOfTime(isolate); | 1429 BinaryOpICStub::GenerateAheadOfTime(isolate); |
| 1430 StoreRegistersStateStub::GenerateAheadOfTime(isolate); |
| 1431 RestoreRegistersStateStub::GenerateAheadOfTime(isolate); |
| 1397 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate); | 1432 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate); |
| 1398 } | 1433 } |
| 1399 | 1434 |
| 1400 | 1435 |
| 1436 void StoreRegistersStateStub::GenerateAheadOfTime(Isolate* isolate) { |
| 1437 StoreRegistersStateStub stub1(kDontSaveFPRegs); |
| 1438 stub1.GetCode(isolate); |
| 1439 StoreRegistersStateStub stub2(kSaveFPRegs); |
| 1440 stub2.GetCode(isolate); |
| 1441 } |
| 1442 |
| 1443 |
| 1444 void RestoreRegistersStateStub::GenerateAheadOfTime(Isolate* isolate) { |
| 1445 RestoreRegistersStateStub stub1(kDontSaveFPRegs); |
| 1446 stub1.GetCode(isolate); |
| 1447 RestoreRegistersStateStub stub2(kSaveFPRegs); |
| 1448 stub2.GetCode(isolate); |
| 1449 } |
| 1450 |
| 1451 |
| 1401 void CodeStub::GenerateFPStubs(Isolate* isolate) { | 1452 void CodeStub::GenerateFPStubs(Isolate* isolate) { |
| 1402 // Floating-point code doesn't get special handling in ARM64, so there's | 1453 // Floating-point code doesn't get special handling in ARM64, so there's |
| 1403 // nothing to do here. | 1454 // nothing to do here. |
| 1404 USE(isolate); | 1455 USE(isolate); |
| 1405 } | 1456 } |
| 1406 | 1457 |
| 1407 | 1458 |
| 1408 static void JumpIfOOM(MacroAssembler* masm, | 1459 static void JumpIfOOM(MacroAssembler* masm, |
| 1409 Register value, | 1460 Register value, |
| 1410 Register scratch, | 1461 Register scratch, |
| (...skipping 4309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5720 MemOperand(fp, 6 * kPointerSize), | 5771 MemOperand(fp, 6 * kPointerSize), |
| 5721 NULL); | 5772 NULL); |
| 5722 } | 5773 } |
| 5723 | 5774 |
| 5724 | 5775 |
| 5725 #undef __ | 5776 #undef __ |
| 5726 | 5777 |
| 5727 } } // namespace v8::internal | 5778 } } // namespace v8::internal |
| 5728 | 5779 |
| 5729 #endif // V8_TARGET_ARCH_ARM64 | 5780 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |