From 9bd2a1da83da21a8dea916d1916386058340ea33 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 19 Mar 2018 21:55:06 -0700 Subject: 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*. --- share/txr/stdlib/asm.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.2.3