| OLD | NEW |
| 1 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ------*- C++ -*-===// | 1 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ------*- C++ -*-===// |
| 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
| 5 // | 5 // |
| 6 // Modified by the Subzero authors. | 6 // Modified by the Subzero authors. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // The Subzero Code Generator | 10 // The Subzero Code Generator |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 void j(CondX86::BrCond condition, Label *label, bool near = kFarJump); | 796 void j(CondX86::BrCond condition, Label *label, bool near = kFarJump); |
| 797 void j(CondX86::BrCond condition, const ConstantRelocatable *label); | 797 void j(CondX86::BrCond condition, const ConstantRelocatable *label); |
| 798 | 798 |
| 799 void jmp(GPRRegister reg); | 799 void jmp(GPRRegister reg); |
| 800 void jmp(Label *label, bool near = kFarJump); | 800 void jmp(Label *label, bool near = kFarJump); |
| 801 void jmp(const ConstantRelocatable *label); | 801 void jmp(const ConstantRelocatable *label); |
| 802 | 802 |
| 803 void mfence(); | 803 void mfence(); |
| 804 | 804 |
| 805 void lock(); | 805 void lock(); |
| 806 void cmpxchg(Type Ty, const Address &address, GPRRegister reg); | 806 void cmpxchg(Type Ty, const Address &address, GPRRegister reg, bool Locked); |
| 807 void cmpxchg8b(const Address &address); | 807 void cmpxchg8b(const Address &address, bool Locked); |
| 808 void xadd(Type Ty, const Address &address, GPRRegister reg); | 808 void xadd(Type Ty, const Address &address, GPRRegister reg, bool Locked); |
| 809 void xchg(Type Ty, const Address &address, GPRRegister reg); | 809 void xchg(Type Ty, const Address &address, GPRRegister reg); |
| 810 | 810 |
| 811 void LockCmpxchg(Type Ty, const Address &address, GPRRegister reg) { | |
| 812 lock(); | |
| 813 cmpxchg(Ty, address, reg); | |
| 814 } | |
| 815 | |
| 816 void EmitSegmentOverride(uint8_t prefix); | 811 void EmitSegmentOverride(uint8_t prefix); |
| 817 | 812 |
| 818 intptr_t PreferredLoopAlignment() { return 16; } | 813 intptr_t PreferredLoopAlignment() { return 16; } |
| 819 void Align(intptr_t alignment, intptr_t offset); | 814 void Align(intptr_t alignment, intptr_t offset); |
| 820 void Bind(Label *label); | 815 void Bind(Label *label); |
| 821 | 816 |
| 822 intptr_t CodeSize() const { return buffer_.Size(); } | 817 intptr_t CodeSize() const { return buffer_.Size(); } |
| 823 | 818 |
| 824 private: | 819 private: |
| 825 inline void EmitUint8(uint8_t value); | 820 inline void EmitUint8(uint8_t value); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 inline void AssemblerX86::EmitFixup(AssemblerFixup *fixup) { | 872 inline void AssemblerX86::EmitFixup(AssemblerFixup *fixup) { |
| 878 buffer_.EmitFixup(fixup); | 873 buffer_.EmitFixup(fixup); |
| 879 } | 874 } |
| 880 | 875 |
| 881 inline void AssemblerX86::EmitOperandSizeOverride() { EmitUint8(0x66); } | 876 inline void AssemblerX86::EmitOperandSizeOverride() { EmitUint8(0x66); } |
| 882 | 877 |
| 883 } // end of namespace x86 | 878 } // end of namespace x86 |
| 884 } // end of namespace Ice | 879 } // end of namespace Ice |
| 885 | 880 |
| 886 #endif // SUBZERO_SRC_ASSEMBLER_IA32_H_ | 881 #endif // SUBZERO_SRC_ASSEMBLER_IA32_H_ |
| OLD | NEW |