jasmin
jasmin copied to clipboard
Need a checker to ensure that `inline if` is not propagated to low level
Branch: glob_array3_slh
We allow #inline
annotation for if
inside a for
loop for SCT checking. We need a checker which will ensure that these inline if
's are resolved and removed before generating assembly code.
inline fn __keccak_rho_offsets(inline int i, #msf reg u64 ms) -> inline int, #msf reg u64
{
inline int r x y z t;
r = 0;
x = 1;
y = 0;
for t = 0 to 24 {
#inline if (i == x + 5 * y) { // this inline if should not be present in late stages of compilation
r = ((t + 1) * (t + 2) / 2) % 64;
}
z = (2 * x + 3 * y) % 5;
x = y;
y = z;
}
return r, ms;
}