Advertisement
Guest User

Untitled

a guest
Jul 10th, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.78 KB | None | 0 0
  1. struct s {
  2.   int a[256];
  3.   int b;
  4. };
  5.  
  6. void f0(struct s s)
  7. {
  8. }
  9.  
  10. void f1(struct s s)
  11. {
  12.   f0(s);
  13. }
  14.  
  15. ---
  16.  
  17. stefan@wonka:~$ ~/milkymist/llvm/bin/clang -ccc-host-triple lm32 -c -S struct_byval.c -o -
  18.         .file   "struct_byval.c"
  19.         .text
  20.         .globl  f0
  21.         .type   f0,@function
  22. f0:
  23.         ret
  24. .Ltmp0:
  25.         .size   f0, .Ltmp0-f0
  26.  
  27.         .globl  f1
  28.         .type   f1,@function
  29. f1:
  30.         addi     sp, sp, -16
  31.         sw       (sp+16), ra
  32.         sw       (sp+12), fp
  33.         addi     fp, sp, 20
  34.         sw       (fp+-12), r1
  35.         calli    f0
  36.         lw       r1, (fp+-12)
  37.         sw       (fp+-16), r1
  38.         lw       fp, (sp+12)
  39.         lw       ra, (sp+16)
  40.         addi     sp, sp, 16
  41.         ret
  42. .Ltmp1:
  43.         .size   f1, .Ltmp1-f1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement