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

Unified Diff: src/IceInstX86BaseImpl.h

Issue 1472623002: Unify alloca, outgoing arg, and prolog construction (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review fixes. Also removed StackAdjustment. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceInstX86Base.h ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstX86BaseImpl.h
diff --git a/src/IceInstX86BaseImpl.h b/src/IceInstX86BaseImpl.h
index e6384a4552a911c2f9a3baf63d586c8487f521b8..2fbd8c85b89b1653e0e91b10b79bf596a73bf40f 100644
--- a/src/IceInstX86BaseImpl.h
+++ b/src/IceInstX86BaseImpl.h
@@ -57,14 +57,6 @@ InstX86FakeRMW<Machine>::InstX86FakeRMW(Cfg *Func, Operand *Data, Operand *Addr,
}
template <class Machine>
-InstX86AdjustStack<Machine>::InstX86AdjustStack(Cfg *Func, int32_t Amount,
- Variable *Esp)
- : InstX86Base<Machine>(Func, InstX86Base<Machine>::Adjuststack, 1, Esp),
- Amount(Amount) {
- this->addSource(Esp);
-}
-
-template <class Machine>
InstX86Mul<Machine>::InstX86Mul(Cfg *Func, Variable *Dest, Variable *Source1,
Operand *Source2)
: InstX86Base<Machine>(Func, InstX86Base<Machine>::Mul, 2, Dest) {
@@ -2907,46 +2899,6 @@ template <class Machine> void InstX86Pop<Machine>::dump(const Cfg *Func) const {
}
template <class Machine>
-void InstX86AdjustStack<Machine>::emit(const Cfg *Func) const {
- if (!BuildDefs::dump())
- return;
- Ostream &Str = Func->getContext()->getStrEmit();
- if (Amount > 0)
- Str << "\tsubl\t$" << Amount << ", %esp";
- else
- Str << "\taddl\t$" << -Amount << ", %esp";
- auto *Target = InstX86Base<Machine>::getTarget(Func);
- Target->updateStackAdjustment(Amount);
-}
-
-template <class Machine>
-void InstX86AdjustStack<Machine>::emitIAS(const Cfg *Func) const {
- typename InstX86Base<Machine>::Traits::Assembler *Asm =
- Func->getAssembler<typename InstX86Base<Machine>::Traits::Assembler>();
- if (Amount > 0)
- Asm->sub(IceType_i32,
- InstX86Base<Machine>::Traits::RegisterSet::Encoded_Reg_esp,
- Immediate(Amount));
- else
- Asm->add(IceType_i32,
- InstX86Base<Machine>::Traits::RegisterSet::Encoded_Reg_esp,
- Immediate(-Amount));
- auto *Target = InstX86Base<Machine>::getTarget(Func);
- Target->updateStackAdjustment(Amount);
-}
-
-template <class Machine>
-void InstX86AdjustStack<Machine>::dump(const Cfg *Func) const {
- if (!BuildDefs::dump())
- return;
- Ostream &Str = Func->getContext()->getStrDump();
- if (Amount > 0)
- Str << "esp = sub.i32 esp, " << Amount;
- else
- Str << "esp = add.i32 esp, " << -Amount;
-}
-
-template <class Machine>
void InstX86Push<Machine>::emit(const Cfg *Func) const {
if (!BuildDefs::dump())
return;
« 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