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 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1985 } | 1985 } |
1986 case kAtomicExchangeUint16: { | 1986 case kAtomicExchangeUint16: { |
1987 __ xchg_w(i.InputRegister(0), i.MemoryOperand(1)); | 1987 __ xchg_w(i.InputRegister(0), i.MemoryOperand(1)); |
1988 __ movzx_w(i.InputRegister(0), i.InputRegister(0)); | 1988 __ movzx_w(i.InputRegister(0), i.InputRegister(0)); |
1989 break; | 1989 break; |
1990 } | 1990 } |
1991 case kAtomicExchangeWord32: { | 1991 case kAtomicExchangeWord32: { |
1992 __ xchg(i.InputRegister(0), i.MemoryOperand(1)); | 1992 __ xchg(i.InputRegister(0), i.MemoryOperand(1)); |
1993 break; | 1993 break; |
1994 } | 1994 } |
| 1995 case kAtomicCompareExchangeInt8: { |
| 1996 __ cmpxchg_b(i.MemoryOperand(2), i.InputRegister(1)); |
| 1997 __ movsx_b(eax, eax); |
| 1998 break; |
| 1999 } |
| 2000 case kAtomicCompareExchangeUint8: { |
| 2001 __ cmpxchg_b(i.MemoryOperand(2), i.InputRegister(1)); |
| 2002 __ movzx_b(eax, eax); |
| 2003 break; |
| 2004 } |
| 2005 case kAtomicCompareExchangeInt16: { |
| 2006 __ cmpxchg_w(i.MemoryOperand(2), i.InputRegister(1)); |
| 2007 __ movsx_w(eax, eax); |
| 2008 break; |
| 2009 } |
| 2010 case kAtomicCompareExchangeUint16: { |
| 2011 __ cmpxchg_w(i.MemoryOperand(2), i.InputRegister(1)); |
| 2012 __ movzx_w(eax, eax); |
| 2013 break; |
| 2014 } |
| 2015 case kAtomicCompareExchangeWord32: { |
| 2016 __ cmpxchg(i.MemoryOperand(2), i.InputRegister(1)); |
| 2017 break; |
| 2018 } |
1995 case kAtomicLoadInt8: | 2019 case kAtomicLoadInt8: |
1996 case kAtomicLoadUint8: | 2020 case kAtomicLoadUint8: |
1997 case kAtomicLoadInt16: | 2021 case kAtomicLoadInt16: |
1998 case kAtomicLoadUint16: | 2022 case kAtomicLoadUint16: |
1999 case kAtomicLoadWord32: | 2023 case kAtomicLoadWord32: |
2000 case kAtomicStoreWord8: | 2024 case kAtomicStoreWord8: |
2001 case kAtomicStoreWord16: | 2025 case kAtomicStoreWord16: |
2002 case kAtomicStoreWord32: | 2026 case kAtomicStoreWord32: |
2003 UNREACHABLE(); // Won't be generated by instruction selector. | 2027 UNREACHABLE(); // Won't be generated by instruction selector. |
2004 break; | 2028 break; |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2706 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2730 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2707 __ Nop(padding_size); | 2731 __ Nop(padding_size); |
2708 } | 2732 } |
2709 } | 2733 } |
2710 | 2734 |
2711 #undef __ | 2735 #undef __ |
2712 | 2736 |
2713 } // namespace compiler | 2737 } // namespace compiler |
2714 } // namespace internal | 2738 } // namespace internal |
2715 } // namespace v8 | 2739 } // namespace v8 |
OLD | NEW |