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