On 15-May-08, at 10:47 AM, Nikodemus Siivola wrote:
> Reduced test case looks like this:
> (defun zig (frob)
> ((%zig (frob)
> (typecase frob
> (setf (sb-alien:deref (sb-alien:cast (sb-alien:sap-alien
> (unknown1) (* unsigned-char))
> (* double-float)))
> (%zig (the (values (single-float (0.0) 1.0) &optional)
> which fails, as advertised, with
> no :MOVE-ARG VOP defined to move #<SB-C:TN t1> (SC SB-VM::SINGLE-REG)
> to #<SB-C:TN t2> (SC SB-VM::ANY-REG)
> commit 389b5755b2eab960c1f4c14045a26de5dbd510c1
> Author: Nikodemus Siivola <nikodemus@...>
> Date: Thu May 15 16:10:02 2008 +0000
> 22.214.171.124: revert ANY-REG from registers for primitive type T on
> * While register sets for DESCRIPTOR-REG and ANY-REG are
> identical on
> x86 and x86-64, the compiler reasons about them a bit
> -- so the earlier change is wrong, and caused a regression.
> * Test-case to catch the regression, reduced from Elephant
> * Record the bug the earlier change tried to address as #427.
I'm not sure I agree with the fix. Most MOVE-ARG VOPs are defined to
treat ANY-REG and DESCRIPTOR-REG equivalently (character and integer
SCs). The only exceptions are SAPs and float types. The difference
isn't in the VOP itself (they all punt to the same generic MOVE-ARG
VOP for specialised SC -> boxed), but in the way it's advertised.
Attached is a patch against 126.96.36.199 that instead allows SAPs and
[complex-]foo-float to be MOVE-ARGed to ANY-REG in addition to
DESCRIPTOR-REG. The test case above seems to generate correct code.