| 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 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2158 // when the C++ code returns to the stub because LR holds the return address | 2158 // when the C++ code returns to the stub because LR holds the return address |
| 2159 // in AAPCS64. If the stub is moved (perhaps during a GC), we could end up | 2159 // in AAPCS64. If the stub is moved (perhaps during a GC), we could end up |
| 2160 // returning to dead code. | 2160 // returning to dead code. |
| 2161 // TODO(jbramley): Whilst this is the only analysis that makes sense, I can't | 2161 // TODO(jbramley): Whilst this is the only analysis that makes sense, I can't |
| 2162 // find any comment to confirm this, and I don't hit any crashes whatever | 2162 // find any comment to confirm this, and I don't hit any crashes whatever |
| 2163 // this function returns. The anaylsis should be properly confirmed. | 2163 // this function returns. The anaylsis should be properly confirmed. |
| 2164 return true; | 2164 return true; |
| 2165 } | 2165 } |
| 2166 | 2166 |
| 2167 | 2167 |
| 2168 bool CEntryStub::IsPregenerated() { | 2168 bool CEntryStub::IsPregenerated(Isolate* isolate) { |
| 2169 USE(isolate); |
| 2169 return result_size_ == 1; | 2170 return result_size_ == 1; |
| 2170 } | 2171 } |
| 2171 | 2172 |
| 2172 | 2173 |
| 2173 void CEntryStub::GenerateAheadOfTime(Isolate* isolate) { | 2174 void CEntryStub::GenerateAheadOfTime(Isolate* isolate) { |
| 2174 CEntryStub stub(1, kDontSaveFPRegs); | 2175 CEntryStub stub(1, kDontSaveFPRegs); |
| 2175 stub.GetCode(isolate)->set_is_pregenerated(true); | 2176 stub.GetCode(isolate)->set_is_pregenerated(true); |
| 2176 CEntryStub stub_fp(1, kSaveFPRegs); | 2177 CEntryStub stub_fp(1, kSaveFPRegs); |
| 2177 stub_fp.GetCode(isolate)->set_is_pregenerated(true); | 2178 stub_fp.GetCode(isolate)->set_is_pregenerated(true); |
| 2178 } | 2179 } |
| (...skipping 3808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5987 } | 5988 } |
| 5988 } | 5989 } |
| 5989 | 5990 |
| 5990 | 5991 |
| 5991 bool CodeStub::CanUseFPRegisters() { | 5992 bool CodeStub::CanUseFPRegisters() { |
| 5992 // FP registers always available on A64. | 5993 // FP registers always available on A64. |
| 5993 return true; | 5994 return true; |
| 5994 } | 5995 } |
| 5995 | 5996 |
| 5996 | 5997 |
| 5997 bool RecordWriteStub::IsPregenerated() { | 5998 bool RecordWriteStub::IsPregenerated(Isolate* isolate) { |
| 5999 USE(isolate); |
| 5998 // If the stub exists in the kAheadOfTime list, it is pregenerated. | 6000 // If the stub exists in the kAheadOfTime list, it is pregenerated. |
| 5999 for (const int* entry = kAheadOfTime; *entry != 0; entry++) { | 6001 for (const int* entry = kAheadOfTime; *entry != 0; entry++) { |
| 6000 if (*entry == MinorKeyFor(object_, value_, address_, | 6002 if (*entry == MinorKeyFor(object_, value_, address_, |
| 6001 remembered_set_action_, save_fp_regs_mode_)) { | 6003 remembered_set_action_, save_fp_regs_mode_)) { |
| 6002 return true; | 6004 return true; |
| 6003 } | 6005 } |
| 6004 } | 6006 } |
| 6005 return false; | 6007 return false; |
| 6006 } | 6008 } |
| 6007 | 6009 |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6300 uintptr_t entry_hook = | 6302 uintptr_t entry_hook = |
| 6301 reinterpret_cast<uintptr_t>(masm->isolate()->function_entry_hook()); | 6303 reinterpret_cast<uintptr_t>(masm->isolate()->function_entry_hook()); |
| 6302 __ Mov(x10, entry_hook); | 6304 __ Mov(x10, entry_hook); |
| 6303 #else | 6305 #else |
| 6304 // Under the simulator we need to indirect the entry hook through a trampoline | 6306 // Under the simulator we need to indirect the entry hook through a trampoline |
| 6305 // function at a known address. | 6307 // function at a known address. |
| 6306 ApiFunction dispatcher(FUNCTION_ADDR(EntryHookTrampoline)); | 6308 ApiFunction dispatcher(FUNCTION_ADDR(EntryHookTrampoline)); |
| 6307 __ Mov(x10, Operand(ExternalReference(&dispatcher, | 6309 __ Mov(x10, Operand(ExternalReference(&dispatcher, |
| 6308 ExternalReference::BUILTIN_CALL, | 6310 ExternalReference::BUILTIN_CALL, |
| 6309 masm->isolate()))); | 6311 masm->isolate()))); |
| 6312 // It additionally takes an isolate as a third parameter |
| 6313 __ Mov(x2, Operand(ExternalReference::isolate_address(masm->isolate()))); |
| 6310 #endif | 6314 #endif |
| 6311 | 6315 |
| 6312 // The caller's return address is above the saved temporaries. | 6316 // The caller's return address is above the saved temporaries. |
| 6313 // Grab its location for the second argument to the hook. | 6317 // Grab its location for the second argument to the hook. |
| 6314 __ Add(x1, __ StackPointer(), kNumSavedRegs * kPointerSize); | 6318 __ Add(x1, __ StackPointer(), kNumSavedRegs * kPointerSize); |
| 6315 | 6319 |
| 6316 { | 6320 { |
| 6317 // Create a dummy frame, as CallCFunction requires this. | 6321 // Create a dummy frame, as CallCFunction requires this. |
| 6318 FrameScope frame(masm, StackFrame::MANUAL); | 6322 FrameScope frame(masm, StackFrame::MANUAL); |
| 6319 __ CallCFunction(x10, 2, 0); | 6323 __ CallCFunction(x10, 2, 0); |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6904 __ Bind(&fast_elements_case); | 6908 __ Bind(&fast_elements_case); |
| 6905 GenerateCase(masm, FAST_ELEMENTS); | 6909 GenerateCase(masm, FAST_ELEMENTS); |
| 6906 } | 6910 } |
| 6907 | 6911 |
| 6908 | 6912 |
| 6909 #undef __ | 6913 #undef __ |
| 6910 | 6914 |
| 6911 } } // namespace v8::internal | 6915 } } // namespace v8::internal |
| 6912 | 6916 |
| 6913 #endif // V8_TARGET_ARCH_A64 | 6917 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |