mirror of https://github.com/rust-lang/rfcs
Update text/3594-expose-stackrealign-attribute.md
Co-authored-by: Jacob Lifshay <programmerjake@gmail.com>
This commit is contained in:
parent
44dc5e88ec
commit
78f5c71380
|
@ -41,7 +41,7 @@ The realign_stack attribute is specified as follows:
|
|||
#[realign_stack]
|
||||
```
|
||||
|
||||
When the `realign_stack` attribute is applied to a function, the compiler ensures that the stack is aligned to the "natural alligmnet" specified in the Data Layout that LLVM uses before executing the function's body.
|
||||
When the `realign_stack` attribute is applied to a function, the compiler no longer assumes the stack is properly aligned when the function is called, so will insert code to align the stack as needed for calling other functions, variables requiring alignment, etc.
|
||||
This alignment is achieved by adjusting the stack pointer accordingly. The alignment is maintained for the duration of the function's execution.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue