Ditch stack_check instruction
This commit is contained in:
committed by
Dan Gohman
parent
944251260b
commit
e9111d1de2
@@ -546,8 +546,6 @@ instructions before instruction selection::
|
||||
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
|
||||
----------------
|
||||
|
||||
|
||||
@@ -108,17 +108,3 @@ ebb0(v0: i32, v999: i64):
|
||||
; nextln: v2 = load.f32 v1+0x7fff_ffff
|
||||
return v2
|
||||
}
|
||||
|
||||
; Stack overflow check.
|
||||
; The stack limit is stored in a pointer-sized global variable.
|
||||
function %stkchk(i64 vmctx) baldrdash {
|
||||
gv0 = vmctx+64
|
||||
|
||||
ebb0(v0: i64):
|
||||
; check: ebb0(
|
||||
stack_check gv0
|
||||
; check: $(limit=$V) = load.i64 notrap aligned
|
||||
; check: $(flags=$V) = ifcmp_sp $limit
|
||||
; check: trapif uge $flags, stk_ovf
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user