Changeset 11555


Ignore:
Timestamp:
Dec 27, 2008, 3:57:47 AM (11 years ago)
Author:
rme
Message:

Small structs returned in registers by the Cygwin compiler, too. This
is apparently what the MS compilers do, as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/ffi-win32.lisp

    r11553 r11555  
    11(in-package "CCL")
    22
     3;;; Cygwin compiler returns small structures in registers
     4;;; (just like on Darwin, apparently).
    35(defun win32::record-type-returns-structure-as-first-arg (rtype)
    4   (x8632::record-type-returns-structure-as-first-arg rtype))
     6  (when (and rtype
     7             (not (typep rtype 'unsigned-byte))
     8             (not (member rtype *foreign-representation-type-keywords*
     9                          :test #'eq)))
     10    (let* ((ftype (if (typep rtype 'foreign-type)
     11                    rtype
     12                    (parse-foreign-type rtype)))
     13           (nbits (ensure-foreign-type-bits ftype)))
     14      (not (member nbits '(8 16 32 64))))))
    515
    616(defun win32::expand-ff-call (callform args &key (arg-coerce #'null-coerce-foreign-arg) (result-coerce #'null-coerce-foreign-result))
Note: See TracChangeset for help on using the changeset viewer.