From 86625b1166bd39e28b4dd4995ed6cd88c0bdde7e Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 6 Jun 2023 15:08:46 +0200 Subject: codegen skeleton --- ir.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ir.h') diff --git a/ir.h b/ir.h index 2b6267a..1b5e20f 100644 --- a/ir.h +++ b/ir.h @@ -87,6 +87,7 @@ enum op { #define oiscmp(o) in_range(o, Oequ, Oulte) #define oisalloca(o) in_range(o, Oalloca1, Oalloca16) #define oisstore(o) in_range(o, Ostore1, Ostore8) +#define oisload(o) in_range(o, Oloads1, Oloadf8) enum intrin { INxxx, @@ -153,8 +154,12 @@ struct mctarg { * if passed by pointer cls[0] == KPTR, r[0] contains integer register or -1 if stack */ int (*abiarg)(short r[2], uchar cls[2], int *ni, int *nf, int *ns, union irtype); + + void (*emit)(struct function *); }; +enum { MAXINSTR = 1<<14 }; + extern uchar type2cls[]; extern uchar cls2siz[]; extern const uchar siz2intcls[]; -- cgit v1.2.3