comparison examples/pi/add.pi @ 307:e609d5296ee9

Massive rewrite of codegenerator
author Windel Bouwman
date Thu, 12 Dec 2013 20:42:56 +0100
parents
children 68b01c8abf8a
comparison
equal deleted inserted replaced
306:b145f8e6050b 307:e609d5296ee9
1
2 function i32 add(i32 a, i32 b)
3 init:
4 i32 c = a + b
5 return c
6
7 function void test()
8 init:
9 a = 2
10 cjmp a > 3 L1 L2
11 L1:
12 i32 b1 = 3
13 jmp L3
14 L2:
15 i32 b2 = 6 + a
16 jmp L3
17 L3:
18 b = phi i32 [b2, L2], [b1, L1]
19 return b
20