aboutsummaryrefslogtreecommitdiff
path: root/deps/lightning/check/add.tst
blob: 9fc054d9fbd15b68ed59ae27e3cb43595be38ed0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
.data	32
fmt:
.c	"%d + %d = %d\n"

.code
	jmpi main

	name test
test:
	prolog
	arg $i0
	arg $i1
	getarg %r0 $i0
	getarg %r1 $i1
	addr %r0 %r0 %r1
	retr %r0
	epilog

	name main
main:
	prolog
	prepare
		pushargi 5
		pushargi 4
	finishi test
	retval %r0
	prepare
		pushargi fmt
		ellipsis
		pushargi 5
		pushargi 4
		pushargr %r0
	finishi @printf
	ret
	epilog