From 0ede7e7f9d6235092d9e3ae2df8b25445fb89c38 Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 20 Aug 2022 14:02:48 +0200 Subject: more IR progress --- src/ir.hff | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/ir.hff') diff --git a/src/ir.hff b/src/ir.hff index 987db3b..ec949ec 100644 --- a/src/ir.hff +++ b/src/ir.hff @@ -18,6 +18,8 @@ struct IRValue { BImm bool, Null, Tmp int, + Local *Decl, + Global *Decl, } } @@ -28,7 +30,9 @@ enum union IRArg { } enum IRInstT { + nop, neg, + not, compl, fneg, add, @@ -46,15 +50,24 @@ enum IRInstT { fsub, fmul, fdiv, + eq, + neq, + lt, + lteq, copy, + load, + store, call, + b, + beqz, ret0, + ret, } struct IRInst { t IRInstT, next *IRInst, - cond *IRInst, + branch *IRInst, call_nargs int, args [0]IRArg, } -- cgit v1.2.3