Fix copy-more-arg on x86 and x86-64
authorPaul Khuong <pvk@pvk.ca>
Sat, 21 Sep 2013 19:11:49 +0000 (15:11 -0400)
committerPaul Khuong <pvk@pvk.ca>
Sun, 22 Sep 2013 00:29:10 +0000 (20:29 -0400)
commit20102d9bd3c62691cc2c27725ff7ffdcab54ab2b
treeeeb8cd978bf37267252f895796281c575e207ae1
parent2cfc78cdd55a4641b16e0eb7f277286e520fc959
Fix copy-more-arg on x86 and x86-64

Parsing of non-fixed (&optional, &key and &rest) arguments used to
fail when there were more fixed arguments than slots in the stack
frame. Fix this on x86oids by copying non-fixed arguments in the
correct direction, depending on whether there are more fixed args
or stack frame slots.

This bug is more visible on x86oids since 3b98d3 (Smaller stack
frames on x86oids), but may still plague other platforms.  These
platforms still have larger initial stack frame size (8 slots), so
the issue remains as hard to trigger as it's been for more than a
decade.

Reported by Jan Moringen, and reduced by Stas Boukarev.

Also add a test, marked as failing on !x86oids.
NEWS
src/compiler/x86-64/call.lisp
src/compiler/x86/call.lisp
tests/compiler.pure.lisp