Implement stack_addr, stack_load, stack_store for x86-64. (#370)

This commit is contained in:
Dan Gohman
2018-06-26 06:15:21 -07:00
committed by GitHub
parent fbd637e142
commit 7d2b44289c
6 changed files with 179 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
; legalization of stack load and store instructions on x86-64.
test legalizer
set opt_level=fastest
target x86_64 haswell
function %stack_load_and_store() {
ss0 = explicit_slot 8, offset 0
ebb0:
v0 = stack_load.i64 ss0
; check: v1 = stack_addr.i64 ss0
; check: v0 = load.i64 notrap aligned v1
stack_store.i64 v0, ss0
; check: v2 = stack_addr.i64 ss0
; check: store notrap aligned v0, v2
return
}