OLD | NEW |
1 //===- subzero/src/IceInstX86BaseImpl.h - Generic X86 instructions -*- C++ -*=// | 1 //===- subzero/src/IceInstX86BaseImpl.h - Generic X86 instructions -*- C++ -*=// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
(...skipping 245 matching lines...) Loading... |
256 : InstX86Base(Func, InstX86Base::Ucomiss, 2, nullptr) { | 256 : InstX86Base(Func, InstX86Base::Ucomiss, 2, nullptr) { |
257 this->addSource(Src0); | 257 this->addSource(Src0); |
258 this->addSource(Src1); | 258 this->addSource(Src1); |
259 } | 259 } |
260 | 260 |
261 template <typename TraitsType> | 261 template <typename TraitsType> |
262 InstImpl<TraitsType>::InstX86UD2::InstX86UD2(Cfg *Func) | 262 InstImpl<TraitsType>::InstX86UD2::InstX86UD2(Cfg *Func) |
263 : InstX86Base(Func, InstX86Base::UD2, 0, nullptr) {} | 263 : InstX86Base(Func, InstX86Base::UD2, 0, nullptr) {} |
264 | 264 |
265 template <typename TraitsType> | 265 template <typename TraitsType> |
| 266 InstImpl<TraitsType>::InstX86Int3::InstX86Int3(Cfg *Func) |
| 267 : InstX86Base(Func, InstX86Base::Int3, 0, nullptr) {} |
| 268 |
| 269 template <typename TraitsType> |
266 InstImpl<TraitsType>::InstX86Test::InstX86Test(Cfg *Func, Operand *Src1, | 270 InstImpl<TraitsType>::InstX86Test::InstX86Test(Cfg *Func, Operand *Src1, |
267 Operand *Src2) | 271 Operand *Src2) |
268 : InstX86Base(Func, InstX86Base::Test, 2, nullptr) { | 272 : InstX86Base(Func, InstX86Base::Test, 2, nullptr) { |
269 this->addSource(Src1); | 273 this->addSource(Src1); |
270 this->addSource(Src2); | 274 this->addSource(Src2); |
271 } | 275 } |
272 | 276 |
273 template <typename TraitsType> | 277 template <typename TraitsType> |
274 InstImpl<TraitsType>::InstX86Mfence::InstX86Mfence(Cfg *Func) | 278 InstImpl<TraitsType>::InstX86Mfence::InstX86Mfence(Cfg *Func) |
275 : InstX86Base(Func, InstX86Base::Mfence, 0, nullptr) { | 279 : InstX86Base(Func, InstX86Base::Mfence, 0, nullptr) { |
(...skipping 1497 matching lines...) Loading... |
1773 | 1777 |
1774 template <typename TraitsType> | 1778 template <typename TraitsType> |
1775 void InstImpl<TraitsType>::InstX86UD2::dump(const Cfg *Func) const { | 1779 void InstImpl<TraitsType>::InstX86UD2::dump(const Cfg *Func) const { |
1776 if (!BuildDefs::dump()) | 1780 if (!BuildDefs::dump()) |
1777 return; | 1781 return; |
1778 Ostream &Str = Func->getContext()->getStrDump(); | 1782 Ostream &Str = Func->getContext()->getStrDump(); |
1779 Str << "ud2"; | 1783 Str << "ud2"; |
1780 } | 1784 } |
1781 | 1785 |
1782 template <typename TraitsType> | 1786 template <typename TraitsType> |
| 1787 void InstImpl<TraitsType>::InstX86Int3::emit(const Cfg *Func) const { |
| 1788 if (!BuildDefs::dump()) |
| 1789 return; |
| 1790 Ostream &Str = Func->getContext()->getStrEmit(); |
| 1791 assert(this->getSrcSize() == 0); |
| 1792 Str << "\t" |
| 1793 "int 3"; |
| 1794 } |
| 1795 |
| 1796 template <typename TraitsType> |
| 1797 void InstImpl<TraitsType>::InstX86Int3::emitIAS(const Cfg *Func) const { |
| 1798 Assembler *Asm = Func->getAssembler<Assembler>(); |
| 1799 Asm->int3(); |
| 1800 } |
| 1801 |
| 1802 template <typename TraitsType> |
| 1803 void InstImpl<TraitsType>::InstX86Int3::dump(const Cfg *Func) const { |
| 1804 if (!BuildDefs::dump()) |
| 1805 return; |
| 1806 Ostream &Str = Func->getContext()->getStrDump(); |
| 1807 Str << "int 3"; |
| 1808 } |
| 1809 |
| 1810 template <typename TraitsType> |
1783 void InstImpl<TraitsType>::InstX86Test::emit(const Cfg *Func) const { | 1811 void InstImpl<TraitsType>::InstX86Test::emit(const Cfg *Func) const { |
1784 if (!BuildDefs::dump()) | 1812 if (!BuildDefs::dump()) |
1785 return; | 1813 return; |
1786 Ostream &Str = Func->getContext()->getStrEmit(); | 1814 Ostream &Str = Func->getContext()->getStrEmit(); |
1787 assert(this->getSrcSize() == 2); | 1815 assert(this->getSrcSize() == 2); |
1788 Str << "\t" | 1816 Str << "\t" |
1789 "test" << this->getWidthString(this->getSrc(0)->getType()) << "\t"; | 1817 "test" << this->getWidthString(this->getSrc(0)->getType()) << "\t"; |
1790 this->getSrc(1)->emit(Func); | 1818 this->getSrc(1)->emit(Func); |
1791 Str << ", "; | 1819 Str << ", "; |
1792 this->getSrc(0)->emit(Func); | 1820 this->getSrc(0)->emit(Func); |
(...skipping 1104 matching lines...) Loading... |
2897 return; | 2925 return; |
2898 Ostream &Str = Func->getContext()->getStrDump(); | 2926 Ostream &Str = Func->getContext()->getStrDump(); |
2899 Str << "IACA_END"; | 2927 Str << "IACA_END"; |
2900 } | 2928 } |
2901 | 2929 |
2902 } // end of namespace X86NAMESPACE | 2930 } // end of namespace X86NAMESPACE |
2903 | 2931 |
2904 } // end of namespace Ice | 2932 } // end of namespace Ice |
2905 | 2933 |
2906 #endif // SUBZERO_SRC_ICEINSTX86BASEIMPL_H | 2934 #endif // SUBZERO_SRC_ICEINSTX86BASEIMPL_H |
OLD | NEW |