Files
wasmtime/cranelift/filetests/isa/intel/legalize-custom.cton
Jakob Stoklund Olesen 217434b474 Add custom legalization for conditional traps.
The expansion of these instructions requires the CFG to be modified,
something the Python XForms can't yet do.
2017-08-28 11:19:42 -07:00

31 lines
507 B
Plaintext

; Test the custom legalizations.
test legalizer
isa intel
set is_64bit
isa intel
; regex: V=v\d+
; regex: EBB=ebb\d+
function %cond_trap(i32) {
ebb0(v1: i32):
trapz v1
return
; check: $ebb0($v1: i32):
; nextln: brnz $v1, $(new=$EBB)
; nextln: trap
; check: $new:
; nextln: return
}
function %cond_trap2(i32) {
ebb0(v1: i32):
trapnz v1
return
; check: $ebb0($v1: i32):
; nextln: brz $v1, $(new=$EBB)
; nextln: trap
; check: $new:
; nextln: return
}