Skip to content
Snippets Groups Projects
Commit 3cce7d43 authored by rtoy's avatar rtoy
Browse files

CMUCL wasn't properly calling C varargs functions because it wasn't

copying float args to the int registers in addition to the float
regs.  This really only needs to be done for varargs functions, but we
don't have a way of indicating that right now.  So always copy.

A simple test is

(alien:alien-funcall
  (alien:extern-alien "printf"
                       (function c-call:void c-call:c-string
                       c-call:double))
  "%f" pi)

Still needs some work.

compiler/ppc/c-call.lisp:
o Make the :arg-tn method for single- and double-float return a list
  consisting of the Tn for the float register to use and the integer
  register(s) in which to save the float.


compiler/aliencomp.lisp:
o Tell the ir2-convert function for %alien-funcall how to handle the
  list of TN's that the :arg-tn method might return.  Copy the float
  value to the integer register(s) appropriately.
parent 277dded1
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment