acc/include/ir.h
szdytom 6950807161 leg
Signed-off-by: szdytom <szdytom@163.com>
2023-06-11 20:50:44 +08:00

21 lines
288 B
C

#ifndef ACC_ACIR_H
#define ACC_ACIR_H
// operations in the ACC IR(ACIR)
enum {
IR_ADD, IR_SUB, IR_MUL, IR_DIV,
IR_EQ, IR_NE, IR_LT, IR_GT, IR_LE, IR_GE,
IR_NEG,
IR_LIT,
};
struct IRinstruction {
int op;
union {
struct { IRinstruction *left, *right; };
int val;
};
};
#endif