view examples/pi/add.pi @ 337:b00219172a42

Added cool lm3s811 qemu project
author Windel Bouwman
date Thu, 20 Feb 2014 20:04:52 +0100
parents 68b01c8abf8a
children
line wrap: on
line source


module addmod

function i32 add(i32 a, i32 b)
 init:
  i32 c = a + b
  return c

function void test()
 init:
  a = 2
  cjmp a > 3 L1 L2
 L1:
  i32 b1 = 3
  jmp L3
 L2:
  i32 b2 = 6 + a
  jmp L3
 L3:
  b = phi i32 [b2, L2], [b1, L1]
  return b