Chromium Code Reviews| Index: src/IceInstX86Base.h |
| diff --git a/src/IceInstX86Base.h b/src/IceInstX86Base.h |
| index c19ec9d63e2c651a37834fa965fb9b4a34e8433a..9a2c1113df8a2232d0d4ff3fa320a4963bafd670 100644 |
| --- a/src/IceInstX86Base.h |
| +++ b/src/IceInstX86Base.h |
| @@ -405,8 +405,9 @@ private: |
| InstX86Jmp(Cfg *Func, Operand *Target); |
| }; |
| -/// AdjustStack instruction - subtracts esp by the given amount and updates the |
| -/// stack offset during code emission. |
| +/// AdjustStack instruction - grows the stack (moves esp down) by the given |
|
Jim Stichnoth
2015/11/13 23:30:33
Optional. I like your idea of breaking this into
sehr
2015/11/14 00:30:56
I like the idea too (obviously), but can't make th
|
| +/// amount. If the amount is negative, it shrinks the stack (moves esp up). |
| +/// It also updates the target lowering StackAdjustment during code emission. |
| template <class Machine> |
| class InstX86AdjustStack final : public InstX86Base<Machine> { |
| InstX86AdjustStack() = delete; |
| @@ -414,7 +415,7 @@ class InstX86AdjustStack final : public InstX86Base<Machine> { |
| InstX86AdjustStack &operator=(const InstX86AdjustStack &) = delete; |
| public: |
| - static InstX86AdjustStack *create(Cfg *Func, SizeT Amount, Variable *Esp) { |
| + static InstX86AdjustStack *create(Cfg *Func, int32_t Amount, Variable *Esp) { |
| return new (Func->allocate<InstX86AdjustStack>()) |
| InstX86AdjustStack(Func, Amount, Esp); |
| } |
| @@ -427,8 +428,8 @@ public: |
| } |
| private: |
| - InstX86AdjustStack(Cfg *Func, SizeT Amount, Variable *Esp); |
| - SizeT Amount; |
| + InstX86AdjustStack(Cfg *Func, int32_t Amount, Variable *Esp); |
| + int32_t Amount; |
|
Jim Stichnoth
2015/11/13 23:30:33
Oops, this should be const.
sehr
2015/11/14 00:30:56
Done.
|
| }; |
| /// Call instruction. Arguments should have already been pushed. |