pic-and-nonpic-6-o32b.s 442 B

12345678910111213141516171819202122232425262728293031323334353637
  1. .set noreorder
  2. .abicalls
  3. .global f1
  4. .ent f1
  5. f1:
  6. .option pic0
  7. jal f3
  8. .option pic2
  9. lui $2,%hi(f2)
  10. jr $31
  11. addiu $2,$2,%lo(f2)
  12. .end f1
  13. .global f2
  14. .ent f2
  15. f2:
  16. .cpload $25
  17. lw $25,%call16(extf1)($28)
  18. lw $4,%got(extf2)($28)
  19. lw $5,%got(extd1)($28)
  20. jalr $25
  21. lw $6,%got(extd2)($28)
  22. lw $25,%call16(extf3)($28)
  23. jr $25
  24. lw $4,%got(extf4)($28)
  25. .end f2
  26. .global f3
  27. .ent f3
  28. f3:
  29. jr $31
  30. nop
  31. .end f3
  32. .data
  33. .word extd1
  34. .word extd3