dynalloc.ssa 339 B

123456789101112131415161718192021222324252627
  1. # make sure dynamic allocations
  2. # and caller-save regs interact
  3. # soundly
  4. function $g() {
  5. @start
  6. ret
  7. }
  8. function w $f(w %arg) {
  9. @start
  10. call $g()
  11. @alloc
  12. %r =l alloc8 16
  13. storel 180388626474, %r
  14. %r8 =l add 8, %r
  15. storel 180388626474, %r8
  16. ret %arg
  17. }
  18. export
  19. function w $main() {
  20. @start
  21. %a =w call $f(w 0)
  22. %b =w call $f(w 0)
  23. ret %a
  24. }