Allow larger immediate values in fixnum arithmetic on x86-64.
authorLutz Euler <lutz.euler@freenet.de>
Mon, 23 Apr 2012 20:11:05 +0000 (22:11 +0200)
committerLutz Euler <lutz.euler@freenet.de>
Mon, 23 Apr 2012 20:11:05 +0000 (22:11 +0200)
commitbf69a011740c082566642b2335a9968b441cadec
treee03f5636694a66c7b452d3f8657b21f4c1ded2f2
parentcf99421496d43693774e361d33c7c7496a693d6c
Allow larger immediate values in fixnum arithmetic on x86-64.

Arithmetic on tagged fixnums currently assembles only constant fixnums
of type (SIGNED-BYTE 29) as immediate arguments to the machine
instructions. When N-FIXNUM-TAG-BITS is less than 3 a larger range of
fixnums could be treated this way. This is desirable as it avoids the
costs of the alternative, namely to put the value into the constant
pool.

So change this type to (SIGNED-BYTE (- 32 N-FIXNUM-TAG-BITS)).

Extend an existing test to cover constants in this range, too.

Many thanks to Paul Khuong for help in finding a name for the type.
src/compiler/x86-64/arith.lisp
tests/arith.pure.lisp