Expand description
Substitutes stack pointer alignment operations utilising logical AND with an arithmetic SUB operation.
The first basic block of every function is searched for a logical AND operation on the stack pointer. By journaling changes to the stack pointer an offset is calculated which is going to be used to alter the operation into a subtraction.
Log Messages
Following cases trigger log messages:
- alignment is untypical for the architecture
- the argument for the AND operation is not a constant
- an operation alters the stack pointer, which can not be journaled.
Functions
- Substitutes logical AND on the stackpointer register by SUB. Expressions are changed to use constants w.r.t the provided bit mask.