summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-19 21:55:06 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-19 21:55:06 -0700
commit9bd2a1da83da21a8dea916d1916386058340ea33 (patch)
tree8934bf45281d29baadd0254b221e8098389770cc
parentefe9d7029d8187bfaff8332ad4452e9bd64f654e (diff)
downloadtxr-9bd2a1da83da21a8dea916d1916386058340ea33.tar.gz
txr-9bd2a1da83da21a8dea916d1916386058340ea33.tar.bz2
txr-9bd2a1da83da21a8dea916d1916386058340ea33.zip
vm: variadic arg closures bug 3/3.
* share/txr/stdlib/asm.tl (op-close asm): Fix argument count check being incorrect in the variadic argument case, causing the assembler to blow up on a correct (close ...) instruction. The integer indicating the number of fixed args is one *less* than the number of arguments given to the instruction not one *more*.
-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 02221341..0efcecb7 100644
--- a/share/txr/stdlib/asm.tl
+++ b/share/txr/stdlib/asm.tl
@@ -636,7 +636,7 @@
asm.(put-insn me.code (ash dst -16) (logtrunc dst 16))
asm.(put-pair (logior (ash (if vari 1 0) 8) frsize) reg)
asm.(put-pair req fix)
- (unless (eq fix (+ (len regs) (if vari 1 0)))
+ (unless (eql fix (- (len regs) (if vari 1 0)))
me.(synerr "wrong number of registers"))
(while regs
(let ((x (pop regs))