Changeset 10520

Show
Ignore:
Timestamp:
08/22/08 08:55:57 (3 months ago)
Author:
gb
Message:

When a transparent union is passed by value, treat the argument as if
it were of the type of the union's first field. (Small unions might
otherwise be passed by value in one or two registers.)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/source/compiler/X86/X8664/x8664-backend.lisp

    r10180 r10520  
    404404                    (argforms arg-value-form)) 
    405405                  (let* ((ftype (parse-foreign-type arg-type-spec))) 
     406                    (when (and (typep ftype 'foreign-record-type) 
     407                             (eq (foreign-record-type-kind ftype) :transparent-union)) 
     408                      (ensure-foreign-type-bits ftype) 
     409                      (setq ftype (foreign-record-field-type 
     410                                   (car (foreign-record-type-fields ftype))) 
     411                            arg-type-spec (foreign-type-to-representation-type ftype))) 
    406412                    (if (typep ftype 'foreign-record-type) 
    407413                      (multiple-value-bind (first8 second8)