Add a stack_check instruction.
This instruction loads a stack limit from a global variable and compares it to the stack pointer, trapping if the stack has grown beyond the limit. Also add a expand_flags transform group containing legalization patterns for ISAs with CPU flags. Fixes #234.
This commit is contained in:
@@ -511,6 +511,11 @@ instructions before instruction selection::
|
||||
v9 = stack_addr ss3, 16
|
||||
v1 = load.f64 v9
|
||||
|
||||
When Cretonne code is running in a sandbox, it can also be necessary to include
|
||||
stack overflow checks in the prologue.
|
||||
|
||||
.. autoinst:: stack_check
|
||||
|
||||
Global variables
|
||||
----------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user