Changeset 4989


Ignore:
Timestamp:
Aug 22, 2006, 12:45:53 AM (18 years ago)
Author:
Gary Byers
Message:

Use CROSS-CREATE-X86-FUNCTION if not compiling natively.

Fix X862-FIXUP-FWD-REFS if not native function on x86.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/compiler/X86/x862.lisp

    r4880 r4989  
    596596                     (x862-lap-process-regsave-info frag-list regsave-label regsave-mask regsave-addr)
    597597                     (setf (afunc-lfun afunc)
    598                            (#+x86-target
    599                             create-x86-function
    600                             #-x86-target
    601                             cross-create-x86-function
    602                             fname
    603                             frag-list
    604                             *x862-constant-alist*
    605                             bits
    606                             debug-info)))
     598                           #+x86-target
     599                           (if (eq *host-backend* *target-backend*)
     600                             (create-x86-function fname frag-list *x862-constant-alist* bits debug-info)
     601                             (cross-create-x86-function fname frag-list *x862-constant-alist* bits debug-info))
     602                           #-x86-target
     603                           (cross-create-x86-function fname frag-list *x862-constant-alist* bits debug-info)))
    607604                   (x862-digest-symbols))))
    608605          (backend-remove-labels))))
     
    620617  (let ((fwd-refs (afunc-fwd-refs afunc)))
    621618    (when fwd-refs
    622       (let* ((v (function-to-function-vector (afunc-lfun afunc)))
     619      (let* ((native-x8664-functions #-x8664-target nil
     620                                     #+x8664-target (eq *target-backend*
     621                                                        *host-backend*))
     622             (v (if native-x8664-functions
     623                  (function-to-function-vector (afunc-lfun afunc))
     624                  (afunc-lfun afunc)))
    623625             (vlen (uvsize v)))
    624626        (declare (fixnum vlen))
    625627        (dolist (ref fwd-refs)
    626628          (let* ((ref-fun (afunc-lfun ref)))
    627             (do* ((i #+x8664-target (%function-code-words
    628                                      (%function-vector-to-function v))
    629                      #-x8664-target 1
     629            (do* ((i (if native-x8664-functions
     630                       (%function-code-words
     631                        (%function-vector-to-function v))
     632                       1)
    630633                     (1+ i)))
    631634                 ((= i vlen))
Note: See TracChangeset for help on using the changeset viewer.