Commit | Line | Data |
---|---|---|
ef60d697 FF |
1 | ;; This is the hand hacked output of the TI C compiler for a simple |
2 | ;; test program that contains local/global functions, local/global | |
3 | ;; function calls, and an "if" and "for" statement. | |
4 | ||
5 | .file "relocs1.s" | |
6 | ||
7 | .global _xfunc | |
8 | ||
9 | _sfunc: | |
10 | addu -16,r1,r1 | |
11 | st 12(r1),r31 | |
12 | st 0(r1),r2 | |
13 | jsr _xfunc(r0),r31 | |
14 | ld 0(r1),r2 | |
15 | ld 12(r1),r31 | |
16 | jsr r31(r0),r0 | |
17 | addu 16,r1,r1 | |
18 | ||
19 | .global _gfunc | |
20 | ||
21 | _gfunc: | |
22 | addu -16,r1,r1 | |
23 | st 12(r1),r31 | |
24 | st 0(r1),r2 | |
25 | jsr _sfunc(r0),r31 | |
26 | ld 0(r1),r2 | |
27 | ld 12(r1),r31 | |
28 | jsr r31(r0),r0 | |
29 | addu 16,r1,r1 | |
30 | ||
31 | ||
32 | .global _branches | |
33 | ||
34 | _branches: | |
35 | addu -16,r1,r1 | |
36 | st 12(r1),r31 | |
37 | st 0(r1),r2 | |
38 | ld 0(r1),r2 | |
39 | st 4(r1),r2 | |
40 | ld 0(r1),r2 | |
41 | ld 4(r1),r3 | |
42 | addu 10,r2,r2 | |
43 | cmp r3,r2,r2 | |
44 | bbo.a L12,r2,ge.w | |
45 | L8: | |
46 | ld 4(r1),r2 | |
47 | bbz.a L10,r2,0 | |
48 | jsr _gfunc(r0),r31 | |
49 | ld 4(r1),r2 | |
50 | br.a L11 | |
51 | L10: | |
52 | jsr _xfunc(r0),r31 | |
53 | ld 4(r1),r2 | |
54 | L11: | |
55 | ld 4(r1),r2 | |
56 | addu 1,r2,r2 | |
57 | st 4(r1),r2 | |
58 | ld 0(r1),r3 | |
59 | ld 4(r1),r2 | |
60 | addu 10,r3,r3 | |
61 | cmp r2,r3,r2 | |
62 | bbo.a L8,r2,lt.w | |
63 | L12: | |
64 | ld 12(r1),r31 | |
65 | jsr r31(r0),r0 | |
66 | addu 16,r1,r1 |