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

Unified Diff: src/IceInstARM32.h

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: review 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
« no previous file with comments | « no previous file | src/IceInstARM32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstARM32.h
diff --git a/src/IceInstARM32.h b/src/IceInstARM32.h
index 1ba5d4e9efd5a5a14adb96a811026193ffed8aba..b9ed01e36e40b25cd1df093e161f61694b284325 100644
--- a/src/IceInstARM32.h
+++ b/src/IceInstARM32.h
@@ -258,6 +258,7 @@ public:
k__Start = Inst::Target,
Adc,
Add,
+ Adjuststack,
And,
Asr,
Bic,
@@ -606,6 +607,34 @@ private:
const CfgNode *TargetFalse;
};
+// AdjustStack instruction - subtracts SP by the given amount and
+// updates the stack offset during code emission.
+class InstARM32AdjustStack : public InstARM32 {
+ InstARM32AdjustStack() = delete;
+ InstARM32AdjustStack(const InstARM32AdjustStack &) = delete;
+ InstARM32AdjustStack &operator=(const InstARM32AdjustStack &) = delete;
+
+public:
+ // Note: We need both Amount and SrcAmount. If Amount is too large then
+ // it needs to be copied to a register (so SrcAmount could be a register).
+ // However, we also need the numeric Amount for bookkeeping, and it's
+ // hard to pull that from the generic SrcAmount operand.
+ static InstARM32AdjustStack *create(Cfg *Func, Variable *SP, SizeT Amount,
+ Operand *SrcAmount) {
+ return new (Func->allocate<InstARM32AdjustStack>())
+ InstARM32AdjustStack(Func, SP, Amount, SrcAmount);
+ }
+ void emit(const Cfg *Func) const override;
+ void emitIAS(const Cfg *Func) const override;
+ void dump(const Cfg *Func) const override;
+ static bool classof(const Inst *Inst) { return isClassof(Inst, Adjuststack); }
+
+private:
+ InstARM32AdjustStack(Cfg *Func, Variable *SP, SizeT Amount,
+ Operand *SrcAmount);
+ const SizeT Amount;
+};
+
// Call instruction (bl/blx). Arguments should have already been pushed.
// Technically bl and the register form of blx can be predicated, but we'll
// leave that out until needed.
« no previous file with comments | « no previous file | src/IceInstARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698