env.ssa (386B)
1 # sanity checks for env calls 2 3 function l $epar(env %e, l %i) { 4 @start 5 %x =l add %e, %i 6 ret %x 7 } 8 9 export function l $earg(l %a, l %b) { 10 @start 11 %r1 =l call $epar(env %a, l %b) 12 # okay to call a regular function 13 # with an env argument 14 %r2 =l call $labs(env 113, l %r1) 15 ret %r2 16 } 17 18 # >>> driver 19 # extern long earg(long, long); 20 # int main(void) { return !(earg(2, -44) == 42); } 21 # <<<