Add a trapff instruction.
This is the floating point equivalent of trapif: Trap when a given condition is in the floating-point flags. Define Intel encodings comparable to the trapif encodings.
This commit is contained in:
@@ -216,6 +216,9 @@ ebb0(v0: i32):
|
||||
trapz v0, stk_ovf
|
||||
v1 = ifcmp_imm v0, 5
|
||||
trapif ugt v1, oob
|
||||
v2 = bitcast.f32 v1
|
||||
v3 = ffcmp v2, v2
|
||||
trapff uno v3, int_ovf
|
||||
return
|
||||
}
|
||||
; sameln: function %cond_traps(i32)
|
||||
@@ -223,5 +226,8 @@ ebb0(v0: i32):
|
||||
; nextln: trapz $v0, stk_ovf
|
||||
; nextln: $v1 = ifcmp_imm v0, 5
|
||||
; nextln: trapif ugt $v1, oob
|
||||
; nextln: $v2 = bitcast.f32 $v1
|
||||
; nextln: $v3 = ffcmp $v2, $v2
|
||||
; nextln: trapff uno $v3, int_ovf
|
||||
; nextln: return
|
||||
; nextln: }
|
||||
|
||||
Reference in New Issue
Block a user