summaryrefslogtreecommitdiffstats
path: root/asm.c
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-07-25 02:52:33 +0200
committerLouis Burda <quent.burda@gmail.com>2023-07-25 02:52:33 +0200
commitc1e767700fc14fbe385a9a8d9ad0cfa4d5315c35 (patch)
tree41a8b648e48ca58f9edb67ebeda5cd82a0519f6a /asm.c
parentd07257c9e92e8697915aaf40070c6228a5855104 (diff)
downloadtis100-c1e767700fc14fbe385a9a8d9ad0cfa4d5315c35.tar.gz
tis100-c1e767700fc14fbe385a9a8d9ad0cfa4d5315c35.zip
Add label support to curses source view
Diffstat (limited to 'asm.c')
-rw-r--r--asm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/asm.c b/asm.c
index cd18747..9de05c7 100644
--- a/asm.c
+++ b/asm.c
@@ -266,7 +266,7 @@ tpu_validate(struct tpu *tpu)
for (i = 0; i < TPU_MAX_INST; i++) {
if (tpu->insts[i].ops[0].type == OP_LABEL) {
- dst = label_map_get(&tpu->labels,
+ dst = label_map_get(&tpu->label_map,
tpu->insts[i].ops[0].val.label);
if (dst == TPU_MAX_INST)
die("load: tpu X%lu Y%lu, label '%s' not defined",
@@ -394,9 +394,9 @@ tis_load(struct tis *tis, const char *filepath)
tok_next_in(&tokenizer, TOK_NL, -1);
break;
case TOK_LABEL:
- if (!label_map_add(&tpu->labels,
+ if (!label_map_add(&tpu->label_map,
tokenizer.tokstr, tpu->inst_cnt))
- die("load: line %lu, duplicate label",
+ die("load: line %lu, duplicate label (pos)",
tokenizer.lineno);
break;
case TOK_NL: