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 "src/compilation-info.h" | 7 #include "src/compilation-info.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1951 } | 1951 } |
1952 case kAtomicExchangeUint16: { | 1952 case kAtomicExchangeUint16: { |
1953 __ xchg_w(i.InputRegister(0), i.MemoryOperand(1)); | 1953 __ xchg_w(i.InputRegister(0), i.MemoryOperand(1)); |
1954 __ movzx_w(i.InputRegister(0), i.InputRegister(0)); | 1954 __ movzx_w(i.InputRegister(0), i.InputRegister(0)); |
1955 break; | 1955 break; |
1956 } | 1956 } |
1957 case kAtomicExchangeWord32: { | 1957 case kAtomicExchangeWord32: { |
1958 __ xchg(i.InputRegister(0), i.MemoryOperand(1)); | 1958 __ xchg(i.InputRegister(0), i.MemoryOperand(1)); |
1959 break; | 1959 break; |
1960 } | 1960 } |
| 1961 case kAtomicCompareExchangeInt8: { |
| 1962 __ cmpxchg_b(i.MemoryOperand(2), i.InputRegister(1)); |
| 1963 __ movsx_b(eax, eax); |
| 1964 break; |
| 1965 } |
| 1966 case kAtomicCompareExchangeUint8: { |
| 1967 __ cmpxchg_b(i.MemoryOperand(2), i.InputRegister(1)); |
| 1968 __ movzx_b(eax, eax); |
| 1969 break; |
| 1970 } |
| 1971 case kAtomicCompareExchangeInt16: { |
| 1972 __ cmpxchg_w(i.MemoryOperand(2), i.InputRegister(1)); |
| 1973 __ movsx_w(eax, eax); |
| 1974 break; |
| 1975 } |
| 1976 case kAtomicCompareExchangeUint16: { |
| 1977 __ cmpxchg_w(i.MemoryOperand(2), i.InputRegister(1)); |
| 1978 __ movzx_w(eax, eax); |
| 1979 break; |
| 1980 } |
| 1981 case kAtomicCompareExchangeWord32: { |
| 1982 __ cmpxchg(i.MemoryOperand(2), i.InputRegister(1)); |
| 1983 break; |
| 1984 } |
1961 case kAtomicLoadInt8: | 1985 case kAtomicLoadInt8: |
1962 case kAtomicLoadUint8: | 1986 case kAtomicLoadUint8: |
1963 case kAtomicLoadInt16: | 1987 case kAtomicLoadInt16: |
1964 case kAtomicLoadUint16: | 1988 case kAtomicLoadUint16: |
1965 case kAtomicLoadWord32: | 1989 case kAtomicLoadWord32: |
1966 case kAtomicStoreWord8: | 1990 case kAtomicStoreWord8: |
1967 case kAtomicStoreWord16: | 1991 case kAtomicStoreWord16: |
1968 case kAtomicStoreWord32: | 1992 case kAtomicStoreWord32: |
1969 UNREACHABLE(); // Won't be generated by instruction selector. | 1993 UNREACHABLE(); // Won't be generated by instruction selector. |
1970 break; | 1994 break; |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2672 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2696 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2673 __ Nop(padding_size); | 2697 __ Nop(padding_size); |
2674 } | 2698 } |
2675 } | 2699 } |
2676 | 2700 |
2677 #undef __ | 2701 #undef __ |
2678 | 2702 |
2679 } // namespace compiler | 2703 } // namespace compiler |
2680 } // namespace internal | 2704 } // namespace internal |
2681 } // namespace v8 | 2705 } // namespace v8 |
OLD | NEW |