Implement stack_addr, stack_load, stack_store for x86-64. (#370)
This commit is contained in:
21
cranelift/filetests/isa/x86/stack-load-store64.cton
Normal file
21
cranelift/filetests/isa/x86/stack-load-store64.cton
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user