Chromium Code Reviews| 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 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2018 Str << "storeq." << this->getSrc(0)->getType() << " "; | 2018 Str << "storeq." << this->getSrc(0)->getType() << " "; |
| 2019 this->getSrc(1)->dump(Func); | 2019 this->getSrc(1)->dump(Func); |
| 2020 Str << ", "; | 2020 Str << ", "; |
| 2021 this->getSrc(0)->dump(Func); | 2021 this->getSrc(0)->dump(Func); |
| 2022 } | 2022 } |
| 2023 | 2023 |
| 2024 template <typename TraitsType> | 2024 template <typename TraitsType> |
| 2025 void InstImpl<TraitsType>::InstX86Lea::emit(const Cfg *Func) const { | 2025 void InstImpl<TraitsType>::InstX86Lea::emit(const Cfg *Func) const { |
| 2026 if (!BuildDefs::dump()) | 2026 if (!BuildDefs::dump()) |
| 2027 return; | 2027 return; |
| 2028 if (auto *Add = | |
| 2029 InstX86BaseUnaryopGPR<InstX86Base::Lea>::deoptLeaToAddOrNull(Func)) { | |
|
Jim Stichnoth
2016/08/02 03:43:53
this->deoptLeaToAddOrNull(Func)
Seriously.
manasijm
2016/08/02 16:08:37
Works! Was 'misguided' by my IDE..
| |
| 2030 Add->emit(Func); | |
| 2031 return; | |
| 2032 } | |
| 2033 | |
| 2028 Ostream &Str = Func->getContext()->getStrEmit(); | 2034 Ostream &Str = Func->getContext()->getStrEmit(); |
| 2029 assert(this->getSrcSize() == 1); | 2035 assert(this->getSrcSize() == 1); |
| 2030 assert(this->getDest()->hasReg()); | 2036 assert(this->getDest()->hasReg()); |
| 2031 Str << "\t" | 2037 Str << "\t" |
| 2032 "lea" << this->getWidthString(this->getDest()->getType()) << "\t"; | 2038 "lea" << this->getWidthString(this->getDest()->getType()) << "\t"; |
| 2033 Operand *Src0 = this->getSrc(0); | 2039 Operand *Src0 = this->getSrc(0); |
| 2034 if (const auto *Src0Var = llvm::dyn_cast<Variable>(Src0)) { | 2040 if (const auto *Src0Var = llvm::dyn_cast<Variable>(Src0)) { |
| 2035 Type Ty = Src0Var->getType(); | 2041 Type Ty = Src0Var->getType(); |
| 2036 // lea on x86-32 doesn't accept mem128 operands, so cast VSrc0 to an | 2042 // lea on x86-32 doesn't accept mem128 operands, so cast VSrc0 to an |
| 2037 // acceptable type. | 2043 // acceptable type. |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2938 return; | 2944 return; |
| 2939 Ostream &Str = Func->getContext()->getStrDump(); | 2945 Ostream &Str = Func->getContext()->getStrDump(); |
| 2940 Str << "IACA_END"; | 2946 Str << "IACA_END"; |
| 2941 } | 2947 } |
| 2942 | 2948 |
| 2943 } // end of namespace X86NAMESPACE | 2949 } // end of namespace X86NAMESPACE |
| 2944 | 2950 |
| 2945 } // end of namespace Ice | 2951 } // end of namespace Ice |
| 2946 | 2952 |
| 2947 #endif // SUBZERO_SRC_ICEINSTX86BASEIMPL_H | 2953 #endif // SUBZERO_SRC_ICEINSTX86BASEIMPL_H |
| OLD | NEW |