Chromium Code Reviews| Index: src/IceInstARM32.h |
| diff --git a/src/IceInstARM32.h b/src/IceInstARM32.h |
| index 1ba5d4e9efd5a5a14adb96a811026193ffed8aba..451490f1f1a0cb9389b867ea19cdb4a566e03755 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,30 @@ private: |
| const CfgNode *TargetFalse; |
| }; |
| +// AdjustStack instruction - subtracts SP by the given amount and |
| +// updates the stack offset during code emission. |
|
Jim Stichnoth
2015/06/18 19:47:33
It would be helpful to document what appears at fi
jvoung (off chromium)
2015/06/18 21:18:30
Yep -- okay done.
|
| +class InstARM32AdjustStack : public InstARM32 { |
| + InstARM32AdjustStack() = delete; |
| + InstARM32AdjustStack(const InstARM32AdjustStack &) = delete; |
| + InstARM32AdjustStack &operator=(const InstARM32AdjustStack &) = delete; |
| + |
| +public: |
| + 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); |
| + SizeT Amount; |
|
Jim Stichnoth
2015/06/18 19:47:33
const?
jvoung (off chromium)
2015/06/18 21:18:30
Done.
|
| +}; |
| + |
| // 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. |