Commit | Line | Data |
---|---|---|
344c9711 FF |
1 | ! Copyright 2004 Free Software Foundation, Inc. |
2 | ! | |
3 | ! This program is free software; you can redistribute it and/or modify | |
4 | ! it under the terms of the GNU General Public License as published by | |
5 | ! the Free Software Foundation; either version 2 of the License, or | |
6 | ! (at your option) any later version. | |
7 | ! | |
8 | ! This program is distributed in the hope that it will be useful, | |
9 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | ! GNU General Public License for more details. | |
12 | ! | |
13 | ! You should have received a copy of the GNU General Public License | |
14 | ! along with this program; if not, write to the Free Software | |
15 | ! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
16 | ! | |
17 | ! Please email any bugs, comments, and/or additions to this file to: | |
18 | ! bug-gdb@gnu.org | |
19 | ! | |
20 | ! This file is part of the gdb testsuite. | |
21 | ! | |
22 | ! It was generated using "sh-elf-gcc -S gdb1291.c", using the following | |
23 | ! source file: | |
24 | ! | |
25 | ! #include <stdio.h> | |
26 | ! | |
27 | ! main() | |
28 | ! { | |
29 | ! printf("hello world\n"); | |
30 | ! sub1(); | |
31 | ! sub2(); | |
32 | ! } | |
33 | ! sub1() | |
34 | ! { | |
35 | ! int buf[64]; | |
36 | ! | |
37 | ! } | |
38 | ! | |
39 | ! sub2() | |
40 | ! { | |
41 | ! int buf[65]; | |
42 | ! | |
43 | ! } | |
44 | ! | |
45 | ! We use a pregenerated assembly file as the test input to avoid possible | |
46 | ! problems with future versions of gcc generating different code. | |
47 | ||
48 | .file "gdb1291.c" | |
49 | .text | |
50 | .section .rodata | |
51 | .align 2 | |
52 | .LC0: | |
53 | .string "hello world\n" | |
54 | .text | |
55 | .align 1 | |
56 | .global _main | |
57 | .type _main, @function | |
58 | _main: | |
59 | mov.l r14,@-r15 | |
60 | sts.l pr,@-r15 | |
61 | mov r15,r14 | |
62 | mov.l .L2,r1 | |
63 | mov r1,r4 | |
64 | mov.l .L3,r1 | |
65 | jsr @r1 | |
66 | nop | |
67 | mov.l .L4,r1 | |
68 | jsr @r1 | |
69 | nop | |
70 | mov.l .L5,r1 | |
71 | jsr @r1 | |
72 | nop | |
73 | mov r14,r15 | |
74 | lds.l @r15+,pr | |
75 | mov.l @r15+,r14 | |
76 | rts | |
77 | nop | |
78 | .L6: | |
79 | .align 2 | |
80 | .L2: | |
81 | .long .LC0 | |
82 | .L3: | |
83 | .long _printf | |
84 | .L4: | |
85 | .long _sub1 | |
86 | .L5: | |
87 | .long _sub2 | |
88 | .size _main, .-_main | |
89 | .align 1 | |
90 | .global _sub1 | |
91 | .type _sub1, @function | |
92 | _sub1: | |
93 | mov.l r14,@-r15 | |
94 | sts.l pr,@-r15 | |
95 | add #-128,r15 | |
96 | add #-128,r15 | |
97 | mov r15,r14 | |
98 | mov.w .L8,r7 | |
99 | add r7,r14 | |
100 | mov r14,r15 | |
101 | lds.l @r15+,pr | |
102 | mov.l @r15+,r14 | |
103 | rts | |
104 | nop | |
105 | .align 1 | |
106 | .L8: | |
107 | .short 256 | |
108 | .size _sub1, .-_sub1 | |
109 | .align 1 | |
110 | .global _sub2 | |
111 | .type _sub2, @function | |
112 | _sub2: | |
113 | mov.l r14,@-r15 | |
114 | sts.l pr,@-r15 | |
115 | mov.w .L11,r1 | |
116 | sub r1,r15 | |
117 | mov r15,r14 | |
118 | mov.w .L11,r7 | |
119 | add r7,r14 | |
120 | mov r14,r15 | |
121 | lds.l @r15+,pr | |
122 | mov.l @r15+,r14 | |
123 | rts | |
124 | nop | |
125 | .align 1 | |
126 | .L11: | |
127 | .short 260 | |
128 | .size _sub2, .-_sub2 | |
129 | .ident "GCC: (GNU) 3.5.0 20040204 (experimental)" |