jasmin
jasmin copied to clipboard
Cast bool to machine word
Currently, the only way I know to turn a boolean condition into a word (in a register) is to resort to the #SETcc
intrinsic. I think it would be much more convenient (and readable) to allow using a cast, as exemplified below:
export
fn main(reg u64 x) -> reg u8 {
reg bool b;
reg u8 r;
b = x > 1;
r = (8u)b; // Does not work; we have to do: r = #SETcc(b);
return r;
}