Skip to content

Instantly share code, notes, and snippets.

@KPCCoiL
Last active August 29, 2015 14:10
Show Gist options
  • Save KPCCoiL/48f8518fc032553627f2 to your computer and use it in GitHub Desktop.
Save KPCCoiL/48f8518fc032553627f2 to your computer and use it in GitHub Desktop.
declare i32 @putchar(i32)
define i32 @add(i32 %a, i32 %b) {
%1 = add i32 %a, %b
ret i32 %1
}
define void @loop() {
%1 = call i32 @add(i32 0, i32 97)
call i32 @putchar(i32 %1)
call void @loop()
ret void
}
define void @main() {
%1 = call i32 @add(i32 0, i32 97)
call void @loop()
ret void
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment