shithub: scc

ref: d0763d72e63709ffc8af883c5dd2db4be98f6b77
dir: /cc2/cc2.h/

View raw version

typedef struct {
	union {
		struct {
			char type;
			char storage;
		} v;
		struct {
			short addr;
		} l;
	} u;
} Symbol;

typedef struct node {
	char op;
	char type;
	int8_t sethi;
	int8_t addrtype;
	union {
		Symbol *sym;
		int imm;
	} u;
	struct node *left, *right;
} Node;

#define AUTO     'A'
#define REGISTER 'R'
#define STATIC   'S'