| 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
| 10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
| (...skipping 2283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2294 } | 2294 } |
| 2295 case kAtomicExchangeUint16: { | 2295 case kAtomicExchangeUint16: { |
| 2296 __ xchgw(i.InputRegister(0), i.MemoryOperand(1)); | 2296 __ xchgw(i.InputRegister(0), i.MemoryOperand(1)); |
| 2297 __ movzxwl(i.InputRegister(0), i.InputRegister(0)); | 2297 __ movzxwl(i.InputRegister(0), i.InputRegister(0)); |
| 2298 break; | 2298 break; |
| 2299 } | 2299 } |
| 2300 case kAtomicExchangeWord32: { | 2300 case kAtomicExchangeWord32: { |
| 2301 __ xchgl(i.InputRegister(0), i.MemoryOperand(1)); | 2301 __ xchgl(i.InputRegister(0), i.MemoryOperand(1)); |
| 2302 break; | 2302 break; |
| 2303 } | 2303 } |
| 2304 case kAtomicCompareExchangeInt8: { |
| 2305 __ lock(); |
| 2306 __ cmpxchgb(i.MemoryOperand(2), i.InputRegister(1)); |
| 2307 __ movsxbl(rax, rax); |
| 2308 break; |
| 2309 } |
| 2310 case kAtomicCompareExchangeUint8: { |
| 2311 __ lock(); |
| 2312 __ cmpxchgb(i.MemoryOperand(2), i.InputRegister(1)); |
| 2313 __ movzxbl(rax, rax); |
| 2314 break; |
| 2315 } |
| 2316 case kAtomicCompareExchangeInt16: { |
| 2317 __ lock(); |
| 2318 __ cmpxchgw(i.MemoryOperand(2), i.InputRegister(1)); |
| 2319 __ movsxwl(rax, rax); |
| 2320 break; |
| 2321 } |
| 2322 case kAtomicCompareExchangeUint16: { |
| 2323 __ lock(); |
| 2324 __ cmpxchgw(i.MemoryOperand(2), i.InputRegister(1)); |
| 2325 __ movzxwl(rax, rax); |
| 2326 break; |
| 2327 } |
| 2328 case kAtomicCompareExchangeWord32: { |
| 2329 __ lock(); |
| 2330 __ cmpxchgl(i.MemoryOperand(2), i.InputRegister(1)); |
| 2331 break; |
| 2332 } |
| 2304 case kAtomicLoadInt8: | 2333 case kAtomicLoadInt8: |
| 2305 case kAtomicLoadUint8: | 2334 case kAtomicLoadUint8: |
| 2306 case kAtomicLoadInt16: | 2335 case kAtomicLoadInt16: |
| 2307 case kAtomicLoadUint16: | 2336 case kAtomicLoadUint16: |
| 2308 case kAtomicLoadWord32: | 2337 case kAtomicLoadWord32: |
| 2309 case kAtomicStoreWord8: | 2338 case kAtomicStoreWord8: |
| 2310 case kAtomicStoreWord16: | 2339 case kAtomicStoreWord16: |
| 2311 case kAtomicStoreWord32: | 2340 case kAtomicStoreWord32: |
| 2312 UNREACHABLE(); // Won't be generated by instruction selector. | 2341 UNREACHABLE(); // Won't be generated by instruction selector. |
| 2313 break; | 2342 break; |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2931 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2960 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2932 __ Nop(padding_size); | 2961 __ Nop(padding_size); |
| 2933 } | 2962 } |
| 2934 } | 2963 } |
| 2935 | 2964 |
| 2936 #undef __ | 2965 #undef __ |
| 2937 | 2966 |
| 2938 } // namespace compiler | 2967 } // namespace compiler |
| 2939 } // namespace internal | 2968 } // namespace internal |
| 2940 } // namespace v8 | 2969 } // namespace v8 |
| OLD | NEW |