#include #include #include typedef unsigned int uint; typedef unsigned short ushort; typedef unsigned char uchar; /* How do I deal with stack slots (alloc, set, get) ? * It seems that computing the address of the slot * and then dereferencing is a bad idea, it uses * one register while I could use the machine * addressing capabilities. */ enum { R = 0, /* invalid reference */ NRegs = 32, Tmp0 = NRegs+1, NString = 32, NPreds = 15, NBlks = 128, NInss = 256, NPhis = 32, }; typedef struct Ins Ins; typedef struct Phi Phi; typedef struct Blk Blk; typedef struct Sym Sym; typedef struct Fn Fn; typedef ushort Ref; enum { RSym = 0, RConst = 1, RMask = 1, RShift = 1, NRefs = ((ushort)-1)>>RShift, }; #define SYM(x) (((x)<