abi.c 407 B

12345678910111213141516171819202122232425
  1. #include "all.h"
  2. /* eliminate sub-word abi op
  3. * variants for targets that
  4. * treat char/short/... as
  5. * words with arbitrary high
  6. * bits
  7. */
  8. void
  9. elimsb(Fn *fn)
  10. {
  11. Blk *b;
  12. Ins *i;
  13. for (b=fn->start; b; b=b->link) {
  14. for (i=b->ins; i<&b->ins[b->nins]; i++) {
  15. if (isargbh(i->op))
  16. i->op = Oarg;
  17. if (isparbh(i->op))
  18. i->op = Opar;
  19. }
  20. if (isretbh(b->jmp.type))
  21. b->jmp.type = Jretw;
  22. }
  23. }