1.0.28.11: Fix bug 316325 (x86oid alien integer result truncation)
authorAlastair Bridgewater <lisphacker@users.sourceforge.net>
Mon, 4 May 2009 23:09:02 +0000 (23:09 +0000)
committerAlastair Bridgewater <lisphacker@users.sourceforge.net>
Mon, 4 May 2009 23:09:02 +0000 (23:09 +0000)
commite7476d980c0b4949c9416b59249d0d621c0f747d
tree75dd5b5244d9da972363479f4860a5d43b9aaa88
parent171e45b53474e025b1c82e2bd715ff4b9721f953
1.0.28.11: Fix bug 316325 (x86oid alien integer result truncation)

  Change the parameters for :alien-rep alien-type-methods to include a
"CONTEXT" parameter to indicate if the type being sought is for a
function result representation.  Ignore the new parameter on all
:alien-rep methods except for (integer :alien-rep).

  Change (integer :alien-rep) to return an integer type the full width
of a machine register when asked for the function result
representation.

  Condition out the (integer :naturalize-gen) method in
src/code/host-alieneval.lisp on x86oids (it's defined in
src/compiler/x86{,-64}/c-call.lisp).

  Change the type deriver for %alien-funcall to request the result
representation for the declared function result type.

  In src/compiler/x86{,-64}/c-call.lisp, change the (integer
:naturalize-gen) alien-type-method to do field masking of unsigned
fields when needed.

  Also in src/compiler/x86{,-64}/c-call.lisp, fix SIGN-EXTEND to not
lie to the compiler quite so badly about its argument types and add a
comment about a possible future optimization.

  Add a test to tests/alien.impure.lisp, for completeness sake.
src/code/host-alieneval.lisp
src/compiler/aliencomp.lisp
src/compiler/x86-64/c-call.lisp
src/compiler/x86/c-call.lisp
tests/alien.impure.lisp
version.lisp-expr