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
commit4eae6de1c83aaaf76494e75dbed76170d47e9e52 (patch)
tree8934bf45281d29baadd0254b221e8098389770cc
parent851a46fd4b6ed9b65bfd33eef9f2fd759ac25c82 (diff)
downloadtxr-4eae6de1c83aaaf76494e75dbed76170d47e9e52.tar.gz
txr-4eae6de1c83aaaf76494e75dbed76170d47e9e52.tar.bz2
txr-4eae6de1c83aaaf76494e75dbed76170d47e9e52.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))