Changeset 5523


Ignore:
Timestamp:
Nov 8, 2006, 11:38:13 AM (18 years ago)
Author:
Gary Byers
Message:

parse-foreign-record-fields: conformance to poweropen structure layout
rules should be an attribute of the FTD, not done via read-time
conditionalization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lib/foreign-types.lisp

    r5486 r5523  
    981981  (declare (type foreign-record-type result)
    982982           (type list fields))
    983   (let ((total-bits 0)
    984         (overall-alignment 1)
    985         (parsed-fields nil)
    986         #+poweropen-target
    987         (first-field-p t)
    988         (alt-alignment (foreign-record-type-alt-align result)))
     983  (let* ((total-bits 0)
     984         (overall-alignment 1)
     985         (parsed-fields nil)
     986         (first-field-p t)
     987         (alt-alignment (foreign-record-type-alt-align result))
     988         (attributes (ftd-attributes *target-ftd*))
     989         (poweropen-alignment (getf attributes :poweropen-alignment)))
     990         
    989991    (dolist (field fields)
    990992      (destructuring-bind (var type &optional bits) field
     
    995997               (alignment (if alt-alignment
    996998                            (min natural-alignment alt-alignment)
    997                             #+poweropen-target
    998                             (if first-field-p
    999                               (progn
    1000                                 (setq first-field-p nil)
    1001                                 natural-alignment)
    1002                               (min 32 natural-alignment))
    1003                             #-poweropen-target
    1004                             natural-alignment))
     999                            (if poweropen-alignment
     1000                              (if first-field-p
     1001                                (progn
     1002                                  (setq first-field-p nil)
     1003                                  natural-alignment)
     1004                                (min 32 natural-alignment))
     1005                              natural-alignment)))
    10051006               (parsed-field
    10061007                (make-foreign-record-field :type field-type
Note: See TracChangeset for help on using the changeset viewer.