[cmucl-cvs] [git] CMU Common Lisp branch master updated. snapshot-2012-07-3-g99020b3

Raymond Toy rtoy at common-lisp.net
Tue Jul 17 04:54:54 UTC 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".

The branch, master has been updated
       via  99020b36cd96dae59ba3638d01c69d18ee9edcd1 (commit)
      from  f9f78a47c59d5cbe762a8a571b66b788b27e45ff (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 99020b36cd96dae59ba3638d01c69d18ee9edcd1
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Mon Jul 16 19:43:14 2012 -0700

    Clean up not-inline-allocation.
    
    src/lisp/x86-assem.S:
    o Remove the (now) unused alloc_to_<reg> functions.
    
    src/compiler/x86/macros.lisp:
    o Simplify the not-inline-allocation to use the same routines as
      inline allocation.

diff --git a/src/compiler/x86/macros.lisp b/src/compiler/x86/macros.lisp
index 9d955f4..21b68e4 100644
--- a/src/compiler/x86/macros.lisp
+++ b/src/compiler/x86/macros.lisp
@@ -183,31 +183,20 @@
 (defun not-inline-allocation (alloc-tn size)
   ;; C call to allocate via dispatch routines. Each destination has a
   ;; special entry point. The size may be a register or a constant.
-  (ecase (tn-offset alloc-tn)
+  (load-size alloc-tn alloc-tn size)
+  (case (tn-offset alloc-tn)
     (#.eax-offset
-     (load-size alloc-tn eax-tn size)
-     (inst call (make-fixup (extern-alien-name "alloc_to_eax")
+     (inst call (make-fixup (extern-alien-name #-sse2 "alloc_overflow_x87"
+					       #+sse2 "alloc_overflow_sse2")
 			    :foreign)))
-    (#.ecx-offset
-     (load-size alloc-tn ecx-tn size)
-     (inst call (make-fixup (extern-alien-name "alloc_to_ecx")
-			    :foreign)))
-    (#.edx-offset
-     (load-size alloc-tn edx-tn size)
-     (inst call (make-fixup (extern-alien-name "alloc_to_edx")
-			    :foreign)))
-    (#.ebx-offset
-     (load-size alloc-tn ebx-tn size)
-     (inst call (make-fixup (extern-alien-name "alloc_to_ebx") 
-			    :foreign)))
-    (#.esi-offset
-     (load-size alloc-tn esi-tn size)
-     (inst call (make-fixup (extern-alien-name "alloc_to_esi")
-			    :foreign)))
-    (#.edi-offset
-     (load-size alloc-tn edi-tn size)
-     (inst call (make-fixup (extern-alien-name "alloc_to_edi")
-			    :foreign))))
+    (t
+     (inst push eax-tn)			; Save any value in eax
+     (inst mov eax-tn alloc-tn)
+     (inst call (make-fixup (extern-alien-name #-sse2 "alloc_overflow_x87"
+					       #+sse2 "alloc_overflow_sse2")
+			    :foreign))
+     (inst mov alloc-tn eax-tn)	  ; Save allocated address in alloc-tn
+     (inst pop eax-tn)))
   (values))
 
 ;;;
diff --git a/src/lisp/x86-assem.S b/src/lisp/x86-assem.S
index 46640fa..9583e84 100644
--- a/src/lisp/x86-assem.S
+++ b/src/lisp/x86-assem.S
@@ -459,101 +459,6 @@ ENDFUNC(fastcopy16)
 
 
 /*
-   Allocate bytes and return the start of the allocated space
-   in the specified destination register.
-
-   In the general case the size will be in the destination register.
-
-   All registers must be preserved except the destination.
-   The C conventions will preserve ebx, esi, edi, and ebp.
-   So only eax, ecx, and edx need special care here. */
-		
-FUNCDEF(alloc_to_eax)
-	STACK_PROLOGUE(12)
-	movl	%ecx, 8(%esp)	# Save ecx and edx as C could destroy them.
-	movl	%edx, 4(%esp)
-	movl	%eax, (%esp)	# Push the size
-	call	GNAME(alloc)
-	movl	4(%esp), %edx	# Restore ecx and edx.
-	movl	8(%esp), %ecx
-	STACK_EPILOGUE
-	ret
-ENDFUNC(alloc_to_eax)
-
-FUNCDEF(alloc_to_ecx)
-	STACK_PROLOGUE(12)
-	movl	%eax, 8(%esp)	# Save eax and edx as C could destroy them.
-	movl	%edx, 4(%esp)
-	movl	%ecx, (%esp)	# Push the size
-	call	GNAME(alloc)
-	movl	%eax,%ecx	# setup the destination.
-	movl	4(%esp), %edx	# Restore eax and edx.
-	movl	8(%esp), %eax
-	STACK_EPILOGUE
-	ret
-ENDFUNC(alloc_to_ecx)
-
-FUNCDEF(alloc_to_edx)
-	STACK_PROLOGUE(12)
-	movl	%eax, 8(%esp)	# Save eax and ecx as C could destroy them.
-	movl	%ecx, 4(%esp)
-	movl	%edx, (%esp)	# Push the size
-	call	GNAME(alloc)
-	movl	%eax,%edx	# setup the destination.
-	movl	4(%esp), %ecx	# Restore eax and ecx.
-	movl	8(%esp), %eax
-	STACK_EPILOGUE
-	ret
-ENDFUNC(alloc_to_edx)
-
-FUNCDEF(alloc_to_ebx)
-	STACK_PROLOGUE(16)
-	movl	%eax, 12(%esp)	# Save eax, ecx, and edx as C could destroy them.
-	movl	%ecx, 8(%esp)
-	movl	%edx, 4(%esp)
-	movl	%ebx, (%esp)	# Push the size
-	call	GNAME(alloc)
-	movl	%eax,%ebx	# setup the destination.
-	movl	4(%esp), %edx	# Restore eax, ecx and edx.
-	movl	8(%esp), %ecx
-	movl	12(%esp), %eax
-	STACK_EPILOGUE
-	ret
-ENDFUNC(alloc_to_ebx)
-
-FUNCDEF(alloc_to_esi)
-	STACK_PROLOGUE(16)
-	movl	%eax, 12(%esp)	# Save eax, ecx, and edx as C could destroy them.
-	movl	%ecx, 8(%esp)
-	movl	%edx, 4(%esp)
-	movl	%esi, (%esp)	# Push the size
-	call	GNAME(alloc)
-	movl	%eax,%esi	# setup the destination.
-	movl	4(%esp), %edx	# Restore eax, ecx and edx.
-	movl	8(%esp), %ecx
-	movl	12(%esp), %eax
-	STACK_EPILOGUE
-	ret
-ENDFUNC(alloc_to_esi)
-
-FUNCDEF(alloc_to_edi)
-	STACK_PROLOGUE(16)
-	movl	%eax, 12(%esp)	# Save eax, ecx, and edx as C could destroy them.
-	movl	%ecx, 8(%esp)
-	movl	%edx, 4(%esp)
-	movl	%edi, (%esp)	# Push the size
-	call	GNAME(alloc)
-	movl	%eax,%edi	# setup the destination.
-	movl	4(%esp), %edx	# Restore eax, ecx and edx.
-	movl	8(%esp), %ecx
-	movl	12(%esp), %eax
-	STACK_EPILOGUE
-	ret
-ENDFUNC(alloc_to_edi)
-
-#ifdef GENCGC
-
-/*
  * alloc_overflow_x87 and alloc_overflow_sse2 must not be called from
  * C because it doesn't follow C conventions.
  *
@@ -595,8 +500,6 @@ FUNCDEF(alloc_overflow_sse2)
 	ret
 ENDFUNC(alloc_overflow_sse2)	
 		
-#endif /* GENCGC */
-
 #ifdef LINKAGE_TABLE
 
 /* Call into C code to resolve a linkage entry.  The initial code in the 

-----------------------------------------------------------------------

Summary of changes:
 src/compiler/x86/macros.lisp |   35 +++++----------
 src/lisp/x86-assem.S         |   97 ------------------------------------------
 2 files changed, 12 insertions(+), 120 deletions(-)


hooks/post-receive
-- 
CMU Common Lisp




More information about the cmucl-cvs mailing list