summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-01-09 06:54:41 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-01-09 06:54:41 -0800
commitcff7c12b0ba0b76e4bf3d7f27f701324fad78557 (patch)
treeff0af583296d68a9cd5ebd74b70a16ceaed73cd8
parent5f13c908566bcbff86df027571bb4b96efc2f427 (diff)
downloadtxr-cff7c12b0ba0b76e4bf3d7f27f701324fad78557.tar.gz
txr-cff7c12b0ba0b76e4bf3d7f27f701324fad78557.tar.bz2
txr-cff7c12b0ba0b76e4bf3d7f27f701324fad78557.zip
asm: fix wrong level check in operand parsing.
* share/txr/stdlib/asm.tl (parse-compound-operand): The index of a (v <lev> <index>) operand must be compard to the maximum index constant, not to the maximum level constant. This bug will prevent compiling frames that have more than 64 variables, which is a serious limitation from 1024.
-rw-r--r--share/txr/stdlib/asm.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/asm.tl b/share/txr/stdlib/asm.tl
index d07d05d3..d3c0454c 100644
--- a/share/txr/stdlib/asm.tl
+++ b/share/txr/stdlib/asm.tl
@@ -252,7 +252,7 @@
(d (+ arg %lev-size%)))))
((sym arg1 arg2)
(when (and (<= 0 arg1 %max-v-lev%)
- (<= 0 arg2 %max-lev%))
+ (<= 0 arg2 %max-lev-idx%))
(caseq sym
(v (+ (* (ssucc arg1) %lev-size%) arg2)))))))