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