aboutsummaryrefslogtreecommitdiff
path: root/src/ir.hff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir.hff')
-rw-r--r--src/ir.hff15
1 files changed, 14 insertions, 1 deletions
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,
}