aboutsummaryrefslogtreecommitdiff
path: root/rules.py
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-07-04 22:17:01 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-07-04 22:17:01 +0300
commit55df6ea5d5754cd0501d7df5e206f1e35d580f59 (patch)
tree9684e9b4d40122ff717e74315476e8507b0a8540 /rules.py
downloadbcgen-55df6ea5d5754cd0501d7df5e206f1e35d580f59.tar.gz
bcgen-55df6ea5d5754cd0501d7df5e206f1e35d580f59.zip
init
Diffstat (limited to 'rules.py')
-rw-r--r--rules.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/rules.py b/rules.py
new file mode 100644
index 0000000..b0aabbf
--- /dev/null
+++ b/rules.py
@@ -0,0 +1,4 @@
+g = BCGen(r = 7, f = 6, head='gbreg_t t = 0;')
+g.rule('addr', '_RRR__', 'R0 = R1 + R2;')
+g.rule('addr_f', '_FFF__', 'F0 = F1 + F2;')
+g.rule('bltr', 'rRR__I', 'if (R0 < R1) JUMP(IMM);')