Index: /branches/ia32/compiler/X86/x86-lap.lisp
===================================================================
--- /branches/ia32/compiler/X86/x86-lap.lisp	(revision 7880)
+++ /branches/ia32/compiler/X86/x86-lap.lisp	(revision 7881)
@@ -1413,5 +1413,5 @@
           constants-vector)))))
 
-#+x86-target
+#+x8664-target
 (defun create-x86-function (name frag-list constants bits debug-info)
   (unless name (setq bits (logior bits (ash -1 $lfbits-noname-bit))))
@@ -1498,6 +1498,7 @@
          (instruction (x86::make-x86-instruction))
          (frag-list (make-frag-list)))
+    (make-x86-lap-label entry-code-tag)
+    (make-x86-lap-label srt-tag)
     (make-x86-lap-label end-code-tag)
-    (make-x86-lap-label entry-code-tag)
     ;; count of 32-bit words between header and function boundary
     ;; marker, inclusive.
@@ -1542,5 +1543,9 @@
 	    (incf srt-index 4)))))
     (show-frag-bytes frag-list)
-    (cross-create-x86-function name frag-list *x86-lap-constants* *x86-lap-lfun-bits* nil)))
+    (funcall #-x8632-target #'cross-create-x86-function
+             #+x8632-target (if (eq *target-backend* *host-backend*)
+			      #'create-x86-function
+			      #'cross-create-x86-function)
+             name frag-list *x86-lap-constants* *x86-lap-lfun-bits* nil)))
 
 (defmacro defx86lapfunction (&environment env name arglist &body body
@@ -1554,5 +1559,5 @@
      (eval-when (:compile-toplevel)
        (note-function-info ',name t ,env))
-     #-x86-target
+     #-x8664-target
      (progn
        (eval-when (:load-toplevel)
@@ -1560,5 +1565,5 @@
        (eval-when (:execute)
          (%define-x86-lap-function ',name '((let ,arglist ,@body)))))
-     #+x86-target	; just shorthand for defun
+     #+x8664-target	; just shorthand for defun
      (%defun (nfunction ,name (lambda (&lap 0) (x86-lap-function ,name ,arglist ,@body))) ,doc)))
 
@@ -1573,4 +1578,5 @@
      (eval-when (:compile-toplevel)
        (note-function-info ',name t ,env))
+     #-x8632-target
      (progn
        (eval-when (:load-toplevel)
@@ -1578,3 +1584,4 @@
        (eval-when (:execute)
          (%define-x8632-lap-function ',name '((let ,arglist ,@body)))))
-     ))
+     #+x8632-target
+     (%defun (nfunction ,name (lambda (&lap 0) (x86-lap-function ,name ,arglist ,@body))) ,doc)))
