comparison doc/disas_examples/x86.plan9call.disas @ 473:ead041d93e36

- ppc doc and disas examples related to aggregates
author Tassilo Philipp
date Wed, 16 Feb 2022 16:44:11 +0100
parents e5820b7a3fbc
children
comparison
equal deleted inserted replaced
472:e5820b7a3fbc 473:ead041d93e36
71 ; } 71 ; }
72 ; 72 ;
73 ; void nonleaf_call(int a, int b, int c, int d, int e, struct A f, int g, int h) 73 ; void nonleaf_call(int a, int b, int c, int d, int e, struct A f, int g, int h)
74 ; { 74 ; {
75 ; /* use some local data */ 75 ; /* use some local data */
76 ; char l[100] = 'L'; 76 ; char l[100] = { 'L' };
77 ; leaf_call(b, c, d, e, f, g, h); 77 ; leaf_call(b, c, d, e, f, g, h);
78 ; } 78 ; }
79 ; 79 ;
80 ; int main() 80 ; int main()
81 ; { 81 ; {
163 ; } 163 ; }
164 ; 164 ;
165 ; void nonleaf_call(int a, int b, struct A c, struct B d, int e, int f, struct A g, struct B h, int i, int j) 165 ; void nonleaf_call(int a, int b, struct A c, struct B d, int e, int f, struct A g, struct B h, int i, int j)
166 ; { 166 ; {
167 ; /* use some local data */ 167 ; /* use some local data */
168 ; char l[100] = 'L'; 168 ; char l[100] = { 'L' };
169 ; leaf_call(b, c, d, e, f, g, h, i, j); 169 ; leaf_call(b, c, d, e, f, g, h, i, j);
170 ; } 170 ; }
171 ; 171 ;
172 ; int main() 172 ; int main()
173 ; { 173 ; {
299 ; int main() 299 ; int main()
300 ; { 300 ; {
301 ; return (int)f(); 301 ; return (int)f();
302 ; } 302 ; }
303 303
304
305
304 ; output from plan9-4th_edition-x86 w/ 8c x.c && 8l -a x.8 306 ; output from plan9-4th_edition-x86 w/ 8c x.c && 8l -a x.8
305 307
306 001020 (2) TEXT f1+0(SB),$0 308 001020 (2) TEXT f1+0(SB),$0
307 001020 8b442404 (4) MOVL .ret+4(FP),AX ; ptr to retval space -> eax 309 001020 8b442404 (4) MOVL .ret+4(FP),AX ; ptr to retval space -> eax
308 001024 c700031c0000 (4) MOVL $7171,(AX) ; | 310 001024 c700031c0000 (4) MOVL $7171,(AX) ; |
342 ; { 344 ; {
343 ; struct Small s = f0(); 345 ; struct Small s = f0();
344 ; struct Big b = f1(); 346 ; struct Big b = f1();
345 ; return b.j + s.x; 347 ; return b.j + s.x;
346 ; } 348 ; }
349
350
347 351
348 ; output from plan9-4th_edition-x86 w/ 8c x.c && 8l -a x.8 352 ; output from plan9-4th_edition-x86 w/ 8c x.c && 8l -a x.8
349 353
350 001020 (5) TEXT f0+0 (SB),$16 354 001020 (5) TEXT f0+0 (SB),$16
351 001020 83ec08 (5) SUBL $8,SP ; prolog 355 001020 83ec08 (5) SUBL $8,SP ; prolog