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 <stdlib.h> | 5 #include <stdlib.h> |
6 #include <cmath> | 6 #include <cmath> |
7 #include <cstdarg> | 7 #include <cstdarg> |
8 | 8 |
9 #if V8_TARGET_ARCH_ARM64 | 9 #if V8_TARGET_ARCH_ARM64 |
10 | 10 |
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1911 | 1911 |
1912 | 1912 |
1913 void Simulator::LoadStoreHelper(Instruction* instr, | 1913 void Simulator::LoadStoreHelper(Instruction* instr, |
1914 int64_t offset, | 1914 int64_t offset, |
1915 AddrMode addrmode) { | 1915 AddrMode addrmode) { |
1916 unsigned srcdst = instr->Rt(); | 1916 unsigned srcdst = instr->Rt(); |
1917 unsigned addr_reg = instr->Rn(); | 1917 unsigned addr_reg = instr->Rn(); |
1918 uintptr_t address = LoadStoreAddress(addr_reg, offset, addrmode); | 1918 uintptr_t address = LoadStoreAddress(addr_reg, offset, addrmode); |
1919 uintptr_t stack = 0; | 1919 uintptr_t stack = 0; |
1920 | 1920 |
1921 base::LockGuard<base::Mutex> lock_guard(&global_monitor_.Pointer()->mutex); | 1921 { |
1922 if (instr->IsLoad()) { | 1922 base::LockGuard<base::Mutex> lock_guard(&global_monitor_.Pointer()->mutex); |
1923 local_monitor_.NotifyLoad(address); | 1923 if (instr->IsLoad()) { |
1924 } else { | 1924 local_monitor_.NotifyLoad(); |
1925 local_monitor_.NotifyStore(address); | 1925 } else { |
1926 global_monitor_.Pointer()->NotifyStore_Locked(address, | 1926 local_monitor_.NotifyStore(); |
1927 &global_monitor_processor_); | 1927 global_monitor_.Pointer()->NotifyStore_Locked(&global_monitor_processor_); |
| 1928 } |
1928 } | 1929 } |
1929 | 1930 |
1930 // Handle the writeback for stores before the store. On a CPU the writeback | 1931 // Handle the writeback for stores before the store. On a CPU the writeback |
1931 // and the store are atomic, but when running on the simulator it is possible | 1932 // and the store are atomic, but when running on the simulator it is possible |
1932 // to be interrupted in between. The simulator is not thread safe and V8 does | 1933 // to be interrupted in between. The simulator is not thread safe and V8 does |
1933 // not require it to be to run JavaScript therefore the profiler may sample | 1934 // not require it to be to run JavaScript therefore the profiler may sample |
1934 // the "simulated" CPU in the middle of load/store with writeback. The code | 1935 // the "simulated" CPU in the middle of load/store with writeback. The code |
1935 // below ensures that push operations are safe even when interrupted: the | 1936 // below ensures that push operations are safe even when interrupted: the |
1936 // stack pointer will be decremented before adding an element to the stack. | 1937 // stack pointer will be decremented before adding an element to the stack. |
1937 if (instr->IsStore()) { | 1938 if (instr->IsStore()) { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2044 AddrMode addrmode) { | 2045 AddrMode addrmode) { |
2045 unsigned rt = instr->Rt(); | 2046 unsigned rt = instr->Rt(); |
2046 unsigned rt2 = instr->Rt2(); | 2047 unsigned rt2 = instr->Rt2(); |
2047 unsigned addr_reg = instr->Rn(); | 2048 unsigned addr_reg = instr->Rn(); |
2048 size_t access_size = 1 << instr->SizeLSPair(); | 2049 size_t access_size = 1 << instr->SizeLSPair(); |
2049 int64_t offset = instr->ImmLSPair() * access_size; | 2050 int64_t offset = instr->ImmLSPair() * access_size; |
2050 uintptr_t address = LoadStoreAddress(addr_reg, offset, addrmode); | 2051 uintptr_t address = LoadStoreAddress(addr_reg, offset, addrmode); |
2051 uintptr_t address2 = address + access_size; | 2052 uintptr_t address2 = address + access_size; |
2052 uintptr_t stack = 0; | 2053 uintptr_t stack = 0; |
2053 | 2054 |
2054 base::LockGuard<base::Mutex> lock_guard(&global_monitor_.Pointer()->mutex); | 2055 { |
2055 if (instr->IsLoad()) { | 2056 base::LockGuard<base::Mutex> lock_guard(&global_monitor_.Pointer()->mutex); |
2056 local_monitor_.NotifyLoad(address); | 2057 if (instr->IsLoad()) { |
2057 local_monitor_.NotifyLoad(address2); | 2058 local_monitor_.NotifyLoad(); |
2058 } else { | 2059 } else { |
2059 local_monitor_.NotifyStore(address); | 2060 local_monitor_.NotifyStore(); |
2060 local_monitor_.NotifyStore(address2); | 2061 global_monitor_.Pointer()->NotifyStore_Locked(&global_monitor_processor_); |
2061 global_monitor_.Pointer()->NotifyStore_Locked(address, | 2062 } |
2062 &global_monitor_processor_); | |
2063 global_monitor_.Pointer()->NotifyStore_Locked(address2, | |
2064 &global_monitor_processor_); | |
2065 } | 2063 } |
2066 | 2064 |
2067 // Handle the writeback for stores before the store. On a CPU the writeback | 2065 // Handle the writeback for stores before the store. On a CPU the writeback |
2068 // and the store are atomic, but when running on the simulator it is possible | 2066 // and the store are atomic, but when running on the simulator it is possible |
2069 // to be interrupted in between. The simulator is not thread safe and V8 does | 2067 // to be interrupted in between. The simulator is not thread safe and V8 does |
2070 // not require it to be to run JavaScript therefore the profiler may sample | 2068 // not require it to be to run JavaScript therefore the profiler may sample |
2071 // the "simulated" CPU in the middle of load/store with writeback. The code | 2069 // the "simulated" CPU in the middle of load/store with writeback. The code |
2072 // below ensures that push operations are safe even when interrupted: the | 2070 // below ensures that push operations are safe even when interrupted: the |
2073 // stack pointer will be decremented before adding an element to the stack. | 2071 // stack pointer will be decremented before adding an element to the stack. |
2074 if (instr->IsStore()) { | 2072 if (instr->IsStore()) { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2198 // Accesses below the stack pointer (but above the platform stack limit) are | 2196 // Accesses below the stack pointer (but above the platform stack limit) are |
2199 // not allowed in the ABI. | 2197 // not allowed in the ABI. |
2200 CheckMemoryAccess(address, stack); | 2198 CheckMemoryAccess(address, stack); |
2201 } | 2199 } |
2202 | 2200 |
2203 | 2201 |
2204 void Simulator::VisitLoadLiteral(Instruction* instr) { | 2202 void Simulator::VisitLoadLiteral(Instruction* instr) { |
2205 uintptr_t address = instr->LiteralAddress(); | 2203 uintptr_t address = instr->LiteralAddress(); |
2206 unsigned rt = instr->Rt(); | 2204 unsigned rt = instr->Rt(); |
2207 | 2205 |
2208 base::LockGuard<base::Mutex> lock_guard(&global_monitor_.Pointer()->mutex); | 2206 { |
2209 local_monitor_.NotifyLoad(address); | 2207 base::LockGuard<base::Mutex> lock_guard(&global_monitor_.Pointer()->mutex); |
| 2208 local_monitor_.NotifyLoad(); |
| 2209 } |
2210 | 2210 |
2211 switch (instr->Mask(LoadLiteralMask)) { | 2211 switch (instr->Mask(LoadLiteralMask)) { |
2212 // Use _no_log variants to suppress the register trace (LOG_REGS, | 2212 // Use _no_log variants to suppress the register trace (LOG_REGS, |
2213 // LOG_VREGS), then print a more detailed log. | 2213 // LOG_VREGS), then print a more detailed log. |
2214 case LDR_w_lit: | 2214 case LDR_w_lit: |
2215 set_wreg_no_log(rt, MemoryRead<uint32_t>(address)); | 2215 set_wreg_no_log(rt, MemoryRead<uint32_t>(address)); |
2216 LogRead(address, rt, kPrintWReg); | 2216 LogRead(address, rt, kPrintWReg); |
2217 break; | 2217 break; |
2218 case LDR_x_lit: | 2218 case LDR_x_lit: |
2219 set_xreg_no_log(rt, MemoryRead<uint64_t>(address)); | 2219 set_xreg_no_log(rt, MemoryRead<uint64_t>(address)); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2293 unsigned access_size = 1 << instr->LoadStoreXSizeLog2(); | 2293 unsigned access_size = 1 << instr->LoadStoreXSizeLog2(); |
2294 uintptr_t address = LoadStoreAddress(rn, 0, AddrMode::Offset); | 2294 uintptr_t address = LoadStoreAddress(rn, 0, AddrMode::Offset); |
2295 DCHECK_EQ(address % access_size, 0); | 2295 DCHECK_EQ(address % access_size, 0); |
2296 base::LockGuard<base::Mutex> lock_guard(&global_monitor_.Pointer()->mutex); | 2296 base::LockGuard<base::Mutex> lock_guard(&global_monitor_.Pointer()->mutex); |
2297 if (is_load != 0) { | 2297 if (is_load != 0) { |
2298 if (is_exclusive) { | 2298 if (is_exclusive) { |
2299 local_monitor_.NotifyLoadExcl(address, get_transaction_size(access_size)); | 2299 local_monitor_.NotifyLoadExcl(address, get_transaction_size(access_size)); |
2300 global_monitor_.Pointer()->NotifyLoadExcl_Locked( | 2300 global_monitor_.Pointer()->NotifyLoadExcl_Locked( |
2301 address, &global_monitor_processor_); | 2301 address, &global_monitor_processor_); |
2302 } else { | 2302 } else { |
2303 local_monitor_.NotifyLoad(address); | 2303 local_monitor_.NotifyLoad(); |
2304 } | 2304 } |
2305 switch (op) { | 2305 switch (op) { |
2306 case LDAR_b: | 2306 case LDAR_b: |
2307 case LDAXR_b: | 2307 case LDAXR_b: |
2308 set_wreg_no_log(rt, MemoryRead<uint8_t>(address)); | 2308 set_wreg_no_log(rt, MemoryRead<uint8_t>(address)); |
2309 break; | 2309 break; |
2310 case LDAR_h: | 2310 case LDAR_h: |
2311 case LDAXR_h: | 2311 case LDAXR_h: |
2312 set_wreg_no_log(rt, MemoryRead<uint16_t>(address)); | 2312 set_wreg_no_log(rt, MemoryRead<uint16_t>(address)); |
2313 break; | 2313 break; |
(...skipping 24 matching lines...) Expand all Loading... |
2338 break; | 2338 break; |
2339 default: | 2339 default: |
2340 UNIMPLEMENTED(); | 2340 UNIMPLEMENTED(); |
2341 } | 2341 } |
2342 LogWrite(address, rt, GetPrintRegisterFormatForSize(access_size)); | 2342 LogWrite(address, rt, GetPrintRegisterFormatForSize(access_size)); |
2343 set_wreg(rs, 0); | 2343 set_wreg(rs, 0); |
2344 } else { | 2344 } else { |
2345 set_wreg(rs, 1); | 2345 set_wreg(rs, 1); |
2346 } | 2346 } |
2347 } else { | 2347 } else { |
2348 local_monitor_.NotifyStore(address); | 2348 local_monitor_.NotifyStore(); |
2349 global_monitor_.Pointer()->NotifyStore_Locked(address, | 2349 global_monitor_.Pointer()->NotifyStore_Locked(&global_monitor_processor_); |
2350 &global_monitor_processor_); | |
2351 switch (op) { | 2350 switch (op) { |
2352 case STLR_b: | 2351 case STLR_b: |
2353 MemoryWrite<uint8_t>(address, wreg(rt)); | 2352 MemoryWrite<uint8_t>(address, wreg(rt)); |
2354 break; | 2353 break; |
2355 case STLR_h: | 2354 case STLR_h: |
2356 MemoryWrite<uint16_t>(address, wreg(rt)); | 2355 MemoryWrite<uint16_t>(address, wreg(rt)); |
2357 break; | 2356 break; |
2358 case STLR_w: | 2357 case STLR_w: |
2359 MemoryWrite<uint32_t>(address, wreg(rt)); | 2358 MemoryWrite<uint32_t>(address, wreg(rt)); |
2360 break; | 2359 break; |
(...skipping 2281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4642 case NEON_ST4: | 4641 case NEON_ST4: |
4643 case NEON_ST4_post: | 4642 case NEON_ST4_post: |
4644 st4(vf, vreg(reg[0]), vreg(reg[1]), vreg(reg[2]), vreg(reg[3]), addr[0]); | 4643 st4(vf, vreg(reg[0]), vreg(reg[1]), vreg(reg[2]), vreg(reg[3]), addr[0]); |
4645 count = 4; | 4644 count = 4; |
4646 log_read = false; | 4645 log_read = false; |
4647 break; | 4646 break; |
4648 default: | 4647 default: |
4649 UNIMPLEMENTED(); | 4648 UNIMPLEMENTED(); |
4650 } | 4649 } |
4651 | 4650 |
| 4651 { |
| 4652 base::LockGuard<base::Mutex> lock_guard(&global_monitor_.Pointer()->mutex); |
| 4653 if (log_read) { |
| 4654 local_monitor_.NotifyLoad(); |
| 4655 } else { |
| 4656 local_monitor_.NotifyStore(); |
| 4657 global_monitor_.Pointer()->NotifyStore_Locked(&global_monitor_processor_); |
| 4658 } |
| 4659 } |
| 4660 |
4652 // Explicitly log the register update whilst we have type information. | 4661 // Explicitly log the register update whilst we have type information. |
4653 for (int i = 0; i < count; i++) { | 4662 for (int i = 0; i < count; i++) { |
4654 // For de-interleaving loads, only print the base address. | 4663 // For de-interleaving loads, only print the base address. |
4655 int lane_size = LaneSizeInBytesFromFormat(vf); | 4664 int lane_size = LaneSizeInBytesFromFormat(vf); |
4656 PrintRegisterFormat format = GetPrintRegisterFormatTryFP( | 4665 PrintRegisterFormat format = GetPrintRegisterFormatTryFP( |
4657 GetPrintRegisterFormatForSize(reg_size, lane_size)); | 4666 GetPrintRegisterFormatForSize(reg_size, lane_size)); |
4658 if (log_read) { | 4667 if (log_read) { |
4659 LogVRead(addr_base, reg[i], format); | 4668 LogVRead(addr_base, reg[i], format); |
4660 } else { | 4669 } else { |
4661 LogVWrite(addr_base, reg[i], format); | 4670 LogVWrite(addr_base, reg[i], format); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4875 LogVWrite(addr, rt, print_format, lane); | 4884 LogVWrite(addr, rt, print_format, lane); |
4876 LogVWrite(addr + esize, rt2, print_format, lane); | 4885 LogVWrite(addr + esize, rt2, print_format, lane); |
4877 LogVWrite(addr + (2 * esize), rt3, print_format, lane); | 4886 LogVWrite(addr + (2 * esize), rt3, print_format, lane); |
4878 LogVWrite(addr + (3 * esize), rt4, print_format, lane); | 4887 LogVWrite(addr + (3 * esize), rt4, print_format, lane); |
4879 } | 4888 } |
4880 break; | 4889 break; |
4881 default: | 4890 default: |
4882 UNIMPLEMENTED(); | 4891 UNIMPLEMENTED(); |
4883 } | 4892 } |
4884 | 4893 |
| 4894 { |
| 4895 base::LockGuard<base::Mutex> lock_guard(&global_monitor_.Pointer()->mutex); |
| 4896 if (do_load) { |
| 4897 local_monitor_.NotifyLoad(); |
| 4898 } else { |
| 4899 local_monitor_.NotifyStore(); |
| 4900 global_monitor_.Pointer()->NotifyStore_Locked(&global_monitor_processor_); |
| 4901 } |
| 4902 } |
| 4903 |
4885 if (addr_mode == PostIndex) { | 4904 if (addr_mode == PostIndex) { |
4886 int rm = instr->Rm(); | 4905 int rm = instr->Rm(); |
4887 int lane_size = LaneSizeInBytesFromFormat(vf); | 4906 int lane_size = LaneSizeInBytesFromFormat(vf); |
4888 set_xreg(instr->Rn(), addr + ((rm == 31) ? (scale * lane_size) : xreg(rm))); | 4907 set_xreg(instr->Rn(), addr + ((rm == 31) ? (scale * lane_size) : xreg(rm))); |
4889 } | 4908 } |
4890 } | 4909 } |
4891 | 4910 |
4892 void Simulator::VisitNEONLoadStoreSingleStruct(Instruction* instr) { | 4911 void Simulator::VisitNEONLoadStoreSingleStruct(Instruction* instr) { |
4893 NEONLoadStoreSingleStructHelper(instr, Offset); | 4912 NEONLoadStoreSingleStructHelper(instr, Offset); |
4894 } | 4913 } |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5848 : access_state_(MonitorAccess::Open), | 5867 : access_state_(MonitorAccess::Open), |
5849 tagged_addr_(0), | 5868 tagged_addr_(0), |
5850 size_(TransactionSize::None) {} | 5869 size_(TransactionSize::None) {} |
5851 | 5870 |
5852 void Simulator::LocalMonitor::Clear() { | 5871 void Simulator::LocalMonitor::Clear() { |
5853 access_state_ = MonitorAccess::Open; | 5872 access_state_ = MonitorAccess::Open; |
5854 tagged_addr_ = 0; | 5873 tagged_addr_ = 0; |
5855 size_ = TransactionSize::None; | 5874 size_ = TransactionSize::None; |
5856 } | 5875 } |
5857 | 5876 |
5858 void Simulator::LocalMonitor::NotifyLoad(uintptr_t addr) { | 5877 void Simulator::LocalMonitor::NotifyLoad() { |
5859 if (access_state_ == MonitorAccess::Exclusive) { | 5878 if (access_state_ == MonitorAccess::Exclusive) { |
5860 // A non exclusive load could clear the local monitor. As a result, it's | 5879 // A non exclusive load could clear the local monitor. As a result, it's |
5861 // most strict to unconditionally clear the local monitor on load. | 5880 // most strict to unconditionally clear the local monitor on load. |
5862 Clear(); | 5881 Clear(); |
5863 } | 5882 } |
5864 } | 5883 } |
5865 | 5884 |
5866 void Simulator::LocalMonitor::NotifyLoadExcl(uintptr_t addr, | 5885 void Simulator::LocalMonitor::NotifyLoadExcl(uintptr_t addr, |
5867 TransactionSize size) { | 5886 TransactionSize size) { |
5868 access_state_ = MonitorAccess::Exclusive; | 5887 access_state_ = MonitorAccess::Exclusive; |
5869 tagged_addr_ = addr; | 5888 tagged_addr_ = addr; |
5870 size_ = size; | 5889 size_ = size; |
5871 } | 5890 } |
5872 | 5891 |
5873 void Simulator::LocalMonitor::NotifyStore(uintptr_t addr) { | 5892 void Simulator::LocalMonitor::NotifyStore() { |
5874 if (access_state_ == MonitorAccess::Exclusive) { | 5893 if (access_state_ == MonitorAccess::Exclusive) { |
5875 // A non exclusive store could clear the local monitor. As a result, it's | 5894 // A non exclusive store could clear the local monitor. As a result, it's |
5876 // most strict to unconditionally clear the local monitor on store. | 5895 // most strict to unconditionally clear the local monitor on store. |
5877 Clear(); | 5896 Clear(); |
5878 } | 5897 } |
5879 } | 5898 } |
5880 | 5899 |
5881 bool Simulator::LocalMonitor::NotifyStoreExcl(uintptr_t addr, | 5900 bool Simulator::LocalMonitor::NotifyStoreExcl(uintptr_t addr, |
5882 TransactionSize size) { | 5901 TransactionSize size) { |
5883 if (access_state_ == MonitorAccess::Exclusive) { | 5902 if (access_state_ == MonitorAccess::Exclusive) { |
(...skipping 27 matching lines...) Expand all Loading... |
5911 tagged_addr_ = 0; | 5930 tagged_addr_ = 0; |
5912 } | 5931 } |
5913 | 5932 |
5914 void Simulator::GlobalMonitor::Processor::NotifyLoadExcl_Locked( | 5933 void Simulator::GlobalMonitor::Processor::NotifyLoadExcl_Locked( |
5915 uintptr_t addr) { | 5934 uintptr_t addr) { |
5916 access_state_ = MonitorAccess::Exclusive; | 5935 access_state_ = MonitorAccess::Exclusive; |
5917 tagged_addr_ = addr; | 5936 tagged_addr_ = addr; |
5918 } | 5937 } |
5919 | 5938 |
5920 void Simulator::GlobalMonitor::Processor::NotifyStore_Locked( | 5939 void Simulator::GlobalMonitor::Processor::NotifyStore_Locked( |
5921 uintptr_t addr, bool is_requesting_processor) { | 5940 bool is_requesting_processor) { |
5922 if (access_state_ == MonitorAccess::Exclusive) { | 5941 if (access_state_ == MonitorAccess::Exclusive) { |
5923 // A non exclusive store could clear the global monitor. As a result, it's | 5942 // A non exclusive store could clear the global monitor. As a result, it's |
5924 // most strict to unconditionally clear global monitors on store. | 5943 // most strict to unconditionally clear global monitors on store. |
5925 Clear_Locked(); | 5944 Clear_Locked(); |
5926 } | 5945 } |
5927 } | 5946 } |
5928 | 5947 |
5929 bool Simulator::GlobalMonitor::Processor::NotifyStoreExcl_Locked( | 5948 bool Simulator::GlobalMonitor::Processor::NotifyStoreExcl_Locked( |
5930 uintptr_t addr, bool is_requesting_processor) { | 5949 uintptr_t addr, bool is_requesting_processor) { |
5931 if (access_state_ == MonitorAccess::Exclusive) { | 5950 if (access_state_ == MonitorAccess::Exclusive) { |
(...skipping 25 matching lines...) Expand all Loading... |
5957 } | 5976 } |
5958 | 5977 |
5959 Simulator::GlobalMonitor::GlobalMonitor() : head_(nullptr) {} | 5978 Simulator::GlobalMonitor::GlobalMonitor() : head_(nullptr) {} |
5960 | 5979 |
5961 void Simulator::GlobalMonitor::NotifyLoadExcl_Locked(uintptr_t addr, | 5980 void Simulator::GlobalMonitor::NotifyLoadExcl_Locked(uintptr_t addr, |
5962 Processor* processor) { | 5981 Processor* processor) { |
5963 processor->NotifyLoadExcl_Locked(addr); | 5982 processor->NotifyLoadExcl_Locked(addr); |
5964 PrependProcessor_Locked(processor); | 5983 PrependProcessor_Locked(processor); |
5965 } | 5984 } |
5966 | 5985 |
5967 void Simulator::GlobalMonitor::NotifyStore_Locked(uintptr_t addr, | 5986 void Simulator::GlobalMonitor::NotifyStore_Locked(Processor* processor) { |
5968 Processor* processor) { | |
5969 // Notify each processor of the store operation. | 5987 // Notify each processor of the store operation. |
5970 for (Processor* iter = head_; iter; iter = iter->next_) { | 5988 for (Processor* iter = head_; iter; iter = iter->next_) { |
5971 bool is_requesting_processor = iter == processor; | 5989 bool is_requesting_processor = iter == processor; |
5972 iter->NotifyStore_Locked(addr, is_requesting_processor); | 5990 iter->NotifyStore_Locked(is_requesting_processor); |
5973 } | 5991 } |
5974 } | 5992 } |
5975 | 5993 |
5976 bool Simulator::GlobalMonitor::NotifyStoreExcl_Locked(uintptr_t addr, | 5994 bool Simulator::GlobalMonitor::NotifyStoreExcl_Locked(uintptr_t addr, |
5977 Processor* processor) { | 5995 Processor* processor) { |
5978 DCHECK(IsProcessorInLinkedList_Locked(processor)); | 5996 DCHECK(IsProcessorInLinkedList_Locked(processor)); |
5979 if (processor->NotifyStoreExcl_Locked(addr, true)) { | 5997 if (processor->NotifyStoreExcl_Locked(addr, true)) { |
5980 // Notify the other processors that this StoreExcl succeeded. | 5998 // Notify the other processors that this StoreExcl succeeded. |
5981 for (Processor* iter = head_; iter; iter = iter->next_) { | 5999 for (Processor* iter = head_; iter; iter = iter->next_) { |
5982 if (iter != processor) { | 6000 if (iter != processor) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6024 processor->prev_ = nullptr; | 6042 processor->prev_ = nullptr; |
6025 processor->next_ = nullptr; | 6043 processor->next_ = nullptr; |
6026 } | 6044 } |
6027 | 6045 |
6028 #endif // USE_SIMULATOR | 6046 #endif // USE_SIMULATOR |
6029 | 6047 |
6030 } // namespace internal | 6048 } // namespace internal |
6031 } // namespace v8 | 6049 } // namespace v8 |
6032 | 6050 |
6033 #endif // V8_TARGET_ARCH_ARM64 | 6051 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |