qute

A software analysis framework built around the QBE intermediate language

git clone https://git.8pit.net/qute.git

 1export function w $myprintf(w %n.L6.val,l %fmt.L7.val, ...)
 2{
 3@myprintf.body
 4@.L8
 5	%n.L6 =l	alloc4	4
 6	%fmt.L7 =l	alloc8	8
 7	%args.L10 =l	alloc8	24
 8	%copy.L12 =l	alloc8	24
 9		storew	%n.L6.val,%n.L6
10		storel	%fmt.L7.val,%fmt.L7
11		vastart %args.L10
12		blit	%args.L10,%copy.L12,24
13		ret	0
14}
15data $.L11 = align 1 {
16	b	"hello, world!",
17	b	0,
18}
19export function w $main()
20{
21@main.body
22@.L15
23	%.L12 =w	call	$myprintf(w 0, l $.L11, ...)
24		ret	%.L12
25@.L16
26		ret	0
27}