function foo:long (x:long) %{ /* bpf */ /* pure */ /* if x <= 10 then 50 else 100 */ 0xd5, $x, -, _bar, 10; /* jsle $x, 10, _bar */ 0xb7, $$, -, -, 100; /* mov $$, 100 */ florb, -, -, _done, -; /* TRIGGER ERROR */ label, _bar; 0xb7, $$, -, -, 50; /* mov $$, 50 */ label, _done; /* 0xbf, $$, $$, -, -; /* dummy op */ %} function bar:long (x:long) { if (x <= 10) return 50 else return 100 } probe begin { printf("foo(1)=%d should be %d\n", foo(1), bar(1)) printf("foo(8)=%d should be %d\n", foo(8), bar(8)) printf("foo(15)=%d should be %d\n", foo(15), bar(15)) exit() }