From ec28e9057e84b92acabb7ebf9122af59738917ad Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 17 Jun 2023 14:31:54 +0200 Subject: misc --- ir.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ir.h') diff --git a/ir.h b/ir.h index d3eeeea..f00f6f0 100644 --- a/ir.h +++ b/ir.h @@ -138,6 +138,9 @@ struct function { struct bitset regusage[1]; }; +enum objkind { OBJELF }; +enum mcisa { ISamd64 }; + struct mctarg { short gpr0, /* first gpr */ ngpr, /* gpr count */ @@ -147,6 +150,8 @@ struct mctarg { struct bitset rcallee[1], /* callee-saved */ rglob[1]; /* globally live (never used for regalloc) */ const char (*rnames)[6]; + enum objkind objkind; + enum mcisa isa; /* abiret: lower return type: * scalar/small struct -> returns number of regs (1..2), * r & cls filled with reg and irclass of each scalar return @@ -219,6 +224,7 @@ void useblk(struct function *, struct block *); void putbranch(struct function *, struct block *); void putcondbranch(struct function *, union ref arg, struct block *t, struct block *f); void putreturn(struct function *, union ref r0, union ref r1); +void blkreplref(struct block *, int, union ref from, union ref to); void replref(struct function *, struct block *, int, union ref from, union ref to); void irdump(struct function *); -- cgit v1.2.3