Changeset 5750
- Timestamp:
- Jan 20, 2007, 6:24:53 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/compiler/PPC/PPC64/ppc64-arch.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/compiler/PPC/PPC64/ppc64-arch.lisp
r5724 r5750 977 977 ,@body))) 978 978 979 #+darwinppc-target 980 #+notyet 981 (defun struct-from-regbuf (type-name structptr regbuf) 982 (let* ((type (ccl::%foreign-type-or-record type-name))) 983 (unless (typep type 'ccl::foreign-record-type) 984 (error "Not a structure type : ~s" type-name)) 985 (let* ((bits (ccl::ensure-foreign-type-bits type))) 986 (ccl::collect ((forms)) 987 (cond ((= bits 128) ;(and (eql day 'tuesday) ...) 988 (forms `(setf (ccl::%%get-signed-longlong ,structptr 0) 989 (ccl::%%get-signed-longlong ,regbuf 0) 990 (ccl::%%get-signed-longlong ,structptr 8) 991 (ccl::%%get-signed-longlong ,regbuf 8)))) 992 (t 993 (let* ((gpr-offset 0) 994 (fpr-offset (* 8 8)) 995 (bit-offset 0) 996 (fields (ccl::foreign-record-type-fields type))) 997 (ccl::collect ((bit-offset) 998 (field-width)) 999 (flet ((next-gpr-offset () 1000 (prog1 gpr-offset 1001 (incf gpr-offset 8))) 1002 (next-fpr-offset () 1003 (prog1 fpr-offset 1004 (incf gpr-offset 8) 1005 (incf fptr-offset 8)))) 1006 (flet ((assign-field (f) 1007 (let* ((field-type (ccl::foreign-record-field-type field)))))) 1008 (dolist (field fields) 1009 1010 ))))))))))) 979 1011 980 1012 981 (provide "PPC64-ARCH")
Note:
See TracChangeset
for help on using the changeset viewer.
