source: branches/libc-0.6/testcase/572asm.s@ 2800

Last change on this file since 2800 was 601, checked in by bird, 22 years ago

Headers.

  • Property cvs2svn:cvs-rev set to 1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/* $Id: 572asm.s 601 2003-08-15 23:50:34Z bird $ */
2/** @file
3 *
4 * _Optlink declaration and definition testcases.
5 *
6 * InnoTek Systemberatung GmbH confidential
7 *
8 * Copyright (c) 2003 InnoTek Systemberatung GmbH
9 * Author: knut st. osmundsen <bird-srcspam@anduin.net>
10 *
11 * All Rights Reserved
12 *
13 */
14 .file "570asm.s"
15
16 .text
17
18.globl ExternCVoid
19ExternCVoid:
20 jmp verify
21
22.globl ExternCPVoid
23ExternCPVoid:
24 jmp verify
25
26.globl ExternCInt
27ExternCInt:
28 jmp verify
29
30.globl ExternCPType
31ExternCPType:
32 jmp verify
33
34
35.globl CVoid
36CVoid:
37 jmp verify
38
39.globl CPVoid
40CPVoid:
41 jmp verify
42
43.globl CInt
44CInt:
45 jmp verify
46
47.globl CPType
48CPType:
49 jmp verify
50
51.globl _Z4Voidiiii
52_Z4Voidiiii:
53 jmp verify
54
55.globl _Z5PVoidiiii
56_Z5PVoidiiii:
57 jmp verify
58
59.globl _Z3Intiiii
60_Z3Intiiii:
61 jmp verify
62
63.globl _Z5PTypeiiii
64_Z5PTypeiiii:
65 jmp verify
66
67
68.globl _ZN3foo16StaticMemberVoidEiiii
69_ZN3foo16StaticMemberVoidEiiii:
70 jmp verify
71
72.globl _ZN3foo17StaticMemberPVoidEiiii
73_ZN3foo17StaticMemberPVoidEiiii:
74 jmp verify
75
76.globl _ZN3foo15StaticMemberIntEiiii
77_ZN3foo15StaticMemberIntEiiii:
78 jmp verify
79
80.globl _ZN3foo17StaticMemberPTypeEiiii
81_ZN3foo17StaticMemberPTypeEiiii:
82 jmp verify
83
84
85.globl _ZN3foo10MemberVoidEiiii
86_ZN3foo10MemberVoidEiiii:
87 jmp verify2
88
89.globl _ZN3foo11MemberPVoidEiiii
90_ZN3foo11MemberPVoidEiiii:
91 jmp verify2
92
93.globl _ZN3foo9MemberIntEiiii
94_ZN3foo9MemberIntEiiii:
95 jmp verify2
96
97.globl _ZN3foo11MemberPTypeEiiii
98_ZN3foo11MemberPTypeEiiii:
99 jmp verify2
100
101
102
103verify:
104 pushl %ebp
105 movl %esp, %ebp
106
107 cmpl $1, %eax
108 je ok1
109 int $3
110
111ok1:
112 cmpl $2, %edx
113 je ok2
114 int $3
115
116
117ok2:
118 cmpl $3, %ecx
119 je ok3
120 int $3
121
122ok3:
123 movl 20(%ebp), %eax
124 cmpl $4, %eax
125 je ok4
126 int $3
127
128ok4:
129 xor %eax, %eax
130 dec %eax
131 mov %eax, %edx
132 mov %eax, %ecx
133
134 mov %ebp, %ebp
135 popl %ebp
136 ret
137
138
139verify2:
140 pushl %ebp
141 movl %esp, %ebp
142
143 test %eax, %eax
144 jnz okthis
145 int $3
146
147okthis:
148 cmpl $1, %edx
149 je ok21
150 int $3
151
152ok21:
153 cmpl $2, %ecx
154 je ok22
155 int $3
156
157
158ok22:
159 movl 20(%ebp), %eax
160 cmpl $3, %eax
161 je ok23
162 int $3
163
164ok23:
165 movl 24(%ebp), %eax
166 cmpl $4, %eax
167 je ok24
168 int $3
169
170ok24:
171 xor %eax, %eax
172 dec %eax
173 mov %eax, %edx
174 mov %eax, %ecx
175
176 mov %ebp, %ebp
177 popl %ebp
178 ret
179
Note: See TracBrowser for help on using the repository browser.