Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: src/IceInstX86BaseImpl.h

Issue 1876413002: Subzero. WASM. Additional progress. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review feedback and merging with master Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceInstX86Base.h ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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...) Expand 10 before | Expand all | Expand 10 after
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...) Expand 10 before | Expand all | Expand 10 after
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...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « src/IceInstX86Base.h ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698