Remove trapif and trapff (#5162)
This branch removes the trapif and trapff instructions, in favor of using an explicit comparison and trapnz. This moves us closer to removing iflags and fflags, but introduces the need to implement instructions like iadd_cout in the x64 and aarch64 backends.
This commit is contained in:
@@ -845,25 +845,6 @@
|
||||
(vec_writable_to_regs dst)))
|
||||
|
||||
|
||||
;;;;; Rules for `trapif`;;;;;;;;;
|
||||
(rule
|
||||
(lower (trapif cc (ifcmp a @ (value_type ty) b) trap_code))
|
||||
(let
|
||||
((test Reg (lower_icmp cc a b ty)))
|
||||
(gen_trapif test trap_code)))
|
||||
|
||||
(rule
|
||||
(lower (trapif _ (iadd_ifcout a @ (value_type ty) b) trap_code))
|
||||
(let
|
||||
((res ValueRegs (lower_uadd_overflow a b ty)))
|
||||
(gen_trapif (value_regs_get res 1) trap_code)))
|
||||
|
||||
|
||||
;;;;; Rules for `trapff`;;;;;;;;;
|
||||
(rule
|
||||
(lower (trapff cc (ffcmp a @ (value_type ty) b) trap_code))
|
||||
(gen_trapff cc a b ty trap_code))
|
||||
|
||||
;;;;; Rules for `bmask`;;;;;;;;;
|
||||
(rule
|
||||
(lower (has_type oty (bmask x @ (value_type ity))))
|
||||
|
||||
Reference in New Issue
Block a user