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

Unified Diff: src/IceInstARM32.cpp

Issue 1187513006: ARM: Assign "actuals" at call site to the appropriate GPR/stack slot. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: tpypo Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: src/IceInstARM32.cpp
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp
index 5131ecc4a901b7d2cebe3ca906ca8427578607f8..3b8b8c2ea68560122f75172fb89ed1adcb7c4a0a 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -198,6 +198,13 @@ OperandARM32FlexReg::OperandARM32FlexReg(Cfg *Func, Type Ty, Variable *Reg,
Vars[1] = ShiftVar;
}
+InstARM32AdjustStack::InstARM32AdjustStack(Cfg *Func, Variable *SP,
+ SizeT Amount, Operand *SrcAmount)
+ : InstARM32(Func, InstARM32::Adjuststack, 2, SP), Amount(Amount) {
+ addSource(SP);
+ addSource(SrcAmount);
+}
+
InstARM32Br::InstARM32Br(Cfg *Func, const CfgNode *TargetTrue,
const CfgNode *TargetFalse, CondARM32::Cond Pred)
: InstARM32Pred(Func, InstARM32::Br, 0, nullptr, Pred),
@@ -631,6 +638,33 @@ void InstARM32Pop::dump(const Cfg *Func) const {
}
}
+void InstARM32AdjustStack::emit(const Cfg *Func) const {
+ if (!ALLOW_DUMP)
+ return;
+ Ostream &Str = Func->getContext()->getStrEmit();
+ assert(getSrcSize() == 2);
+ Str << "\t"
+ << "sub"
+ << "\tsp, ";
Jim Stichnoth 2015/06/18 19:47:33 There is both "sp" and getSrc(0). Should they bot
jvoung (off chromium) 2015/06/18 21:18:30 Hmm yeah, I'll just use the actual operand.
+ getSrc(0)->emit(Func);
+ Str << ", ";
+ getSrc(1)->emit(Func);
+ Func->getTarget()->updateStackAdjustment(Amount);
+}
+
+void InstARM32AdjustStack::emitIAS(const Cfg *Func) const {
+ (void)Func;
+ llvm_unreachable("Not yet implemented");
+ Func->getTarget()->updateStackAdjustment(Amount);
+}
+
+void InstARM32AdjustStack::dump(const Cfg *Func) const {
+ if (!ALLOW_DUMP)
+ return;
+ Ostream &Str = Func->getContext()->getStrDump();
+ Str << "sp = sub.i32 sp, " << Amount;
Jim Stichnoth 2015/06/18 19:47:33 Maybe add SrcAmount to the dump output for complet
jvoung (off chromium) 2015/06/18 21:18:30 Done.
+}
+
void InstARM32Push::emit(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
« src/IceInstARM32.h ('K') | « src/IceInstARM32.h ('k') | src/IceTargetLoweringARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698