summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-10-18 04:26:27 -0600
committerAlejandro Soto <alejandro@34project.org>2022-10-18 04:26:27 -0600
commit52f1f2f94bddfb1e73d2c094cfd693916750a467 (patch)
treeb77f926c15de410183d033f52756eecedb23389c
parent3a89a79518454e2fc85f38135869dbacf6ac38d2 (diff)
Add sim test: mult
-rw-r--r--tb/sim/mult.c4
-rw-r--r--tb/sim/mult.py7
2 files changed, 11 insertions, 0 deletions
diff --git a/tb/sim/mult.c b/tb/sim/mult.c
new file mode 100644
index 0000000..531a824
--- /dev/null
+++ b/tb/sim/mult.c
@@ -0,0 +1,4 @@
+int reset(int a, int b, int c)
+{
+ return a * b + c;
+}
diff --git a/tb/sim/mult.py b/tb/sim/mult.py
new file mode 100644
index 0000000..70e7490
--- /dev/null
+++ b/tb/sim/mult.py
@@ -0,0 +1,7 @@
+def init():
+ init_reg(r0, -10)
+ init_reg(r1, 23)
+ init_reg(r2, -1234)
+
+def final():
+ assert_reg(r0, -10 * 23 - 1234)