summaryrefslogtreecommitdiffstats
path: root/tpu.c
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-07-25 01:59:25 +0200
committerLouis Burda <quent.burda@gmail.com>2023-07-25 01:59:25 +0200
commite32b439cfe7ca72098b2ebe9e1e93f97b7c10ada (patch)
tree3b7f06a2f897dd786b5ff2d01fa13d57057d33da /tpu.c
parent40d8eb449ed072b47bfbe953a191708f761c53a0 (diff)
downloadtis100-e32b439cfe7ca72098b2ebe9e1e93f97b7c10ada.tar.gz
tis100-e32b439cfe7ca72098b2ebe9e1e93f97b7c10ada.zip
Add inotify-based interactive file reload and fix asm parsing
Diffstat (limited to 'tpu.c')
-rw-r--r--tpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tpu.c b/tpu.c
index 269476f..a221349 100644
--- a/tpu.c
+++ b/tpu.c
@@ -262,13 +262,13 @@ tpu_set_inst(struct tpu *tpu, uint8_t pc, enum tpu_inst_type inst_type,
inst = &tpu->insts[pc];
inst->type = inst_type;
- if (op2 > 0) {
+ if (op2 >= 0) {
inst->ops[1].type = (enum tpu_inst_op_type) op2;
inst->ops[1].lit = op2_lit;
inst->ops[0].type = (enum tpu_inst_op_type) op1;
inst->ops[0].lit = op1_lit;
inst->opcnt = 2;
- } else if (op1 > 0) {
+ } else if (op1 >= 0) {
inst->ops[0].type = (enum tpu_inst_op_type) op1;
inst->ops[0].lit = op1_lit;
inst->opcnt = 1;