On Tue, Mar 24, 2009 at 5:15 AM, Juho Snellman <jsnell@iki.fi> wrote:
Jean-Claude Beaudoin <jean.claude.beaudoin@gmail.com> writes:

> SBCL will fail to recover the proper return value if the returning
> function leaves some "dirty" bits in the (irrelevant?) upper part of
> the %eax register.

I believe this was fixed in

Indeed the change you point to has fixed the "signed" case and sign extension is now done properly but the "unsigned" types still have a problem, these unsigned types would need zero extension as GCC does.  Here is what I get if I run my test code with 1.0.25 on Linux/x86 (Fedora 10).
Jean-Claude@equinox> sbcl --load sbcl_widening.lisp
This is SBCL 1.0.25, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.

(foo) = 257
(bar) = 256
(baz) = -1


"foo" and "bar" should produce 1 and 0 respectively, they test the "unsigned char" case.  The value of "baz" is now ok, it is the "signed char" case.

Thank you very much for you help.

Jean-Claude Beaudoin