Minor fix to a comment for Claim(), Drop(), and Peek().

Change-Id: I7c80121610c99bf3114af7644450209cfdb215cb
This commit is contained in:
Alexandre Rames 2016-07-26 09:31:34 +01:00
parent d375606001
commit ad91cee685

View File

@ -560,17 +560,16 @@ class MacroAssembler : public Assembler {
void Default(JumpTableBase* table);
void EndSwitch(JumpTableBase* table);
// Claim memory on the stack
// Note: Operations on SP are atomic, and thus require to be aligned
// We must always keep the stack 32-bit aligned, and every acess must be
// 32-bit aligned.
// We could Align{Up.Down}(size, 4), but that's potentially problematic:
// Claim memory on the stack.
// Note that the Claim, Drop, and Peek helpers below ensure that offsets used
// are multiples of 32 bits to help maintain 32-bit SP alignment.
// We could `Align{Up,Down}(size, 4)`, but that's potentially problematic:
// Claim(3)
// Claim(1)
// Drop(4)
// would seem correct, when in fact:
// Claim(3) -> sp = sp - 4
// Claim(1) -> sp = sp - 4
// Claim(1) -> sp = sp - 4
// Drop(4) -> sp = sp + 4
//
void Claim(int32_t size) {