diff --git a/lisp/amd64-assem.S b/lisp/amd64-assem.S index 4ddf5308ff148327e993fe15fee540f46d2d1aa7..f01f1716e6fe97ea128e5378f3d369e4bf916b7a 100644 --- a/lisp/amd64-assem.S +++ b/lisp/amd64-assem.S @@ -1,6 +1,6 @@ ### amd64-assem.S -*- Mode: Asm; -*- /** - * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/amd64-assem.S,v 1.9 2004/07/27 21:07:49 cwang Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/amd64-assem.S,v 1.10 2004/07/27 22:03:53 cwang Rel $ * * Authors: Paul F. Werkowski <pw@snoopy.mv.com> * Douglas T. Crosher @@ -357,96 +357,6 @@ GNAME(do_dynamic_space_overflow_warning): #endif -#ifdef WANT_CGC -/* A copy function optimized for the Pentium and works ok on - * 486 as well. This assumes (does not check) that the input - * byte count is a multiple of 8-bytes (one lisp object). - * This code takes advantage of pairing in the Pentium as well - * as the 128-bit cache line. - */ - .global GNAME(fastcopy16) - .type GNAME(fastcopy16),@function - .align align_4byte,0x90 -GNAME(fastcopy16): -#if TOO_LAME_TO_PORT_IT_YET - pushl %ebp -#endif - movl %esp,%ebp - movl 8(%ebp), %edx # dst - movl 12(%ebp),%eax # src - movl 16(%ebp),%ecx # bytes -#if TOO_LAME_TO_PORT_IT_YET - pushl %ebx - pushl %esi - pushl %edi -#endif - movl %edx,%edi - movl %eax,%esi - sarl $3,%ecx # number 8-byte units - testl $1,%ecx # odd? - jz Lquad - movl (%esi),%eax - movl 4(%esi),%ebx - movl %eax,(%edi) - movl %ebx,4(%edi) - leal 8(%esi),%esi - leal 8(%edi),%edi -Lquad: sarl $1,%ecx # count 16-byte units - jz Lend - movl %ecx,%ebp # use ebp for loop counter - .align align_16byte,0x90 -Ltop: - movl (%edi),%eax #prefetch! MAJOR Pentium win. - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax, (%edi) - movl %ebx, 4(%edi) - movl %ecx, 8(%edi) - movl %edx,12(%edi) - leal 16(%esi),%esi - leal 16(%edi),%edi - decl %ebp - jnz Ltop # non-prefixed jump saves cycles -Lend: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - .size GNAME(fastcopy16),.-GNAME(fastcopy16) -#endif - -#ifdef GENCGC -/* Fast bzero using the FPU. The first argument is the start address - which needs to be aligned on an 8 byte boundary, the second argument - is the number of bytes which needs to be a multiple of 8 bytes and - not zero. */ - .text - .globl GNAME(i586_bzero) - .type GNAME(i586_bzero),@function - .align align_4byte,0x90 -GNAME(i586_bzero): -#if TOO_LAME_TO_PORT_IT_YET - movl 4(%esp),%edx # Load the start address - movl 8(%esp),%eax # Load the number of bytes -#endif - fldz -#if TOO_LAME_TO_PORT_IT_YET -l1: fstl 0(%edx) -#else -l1: nop -#endif - addl $8,%edx - subl $8,%eax - jnz l1 - fstp %st(0) - ret - .size GNAME(i586_bzero),.-GNAME(i586_bzero) -#endif - - /* Allocate bytes and return the start of the allocated space in the specified destination register. diff --git a/lisp/gencgc.c b/lisp/gencgc.c index 9f2e9bde9f2496e94eec31d609f09d4bc1966633..7b745e4d4aa42888aacc97118925ca365f7cc045 100644 --- a/lisp/gencgc.c +++ b/lisp/gencgc.c @@ -7,7 +7,7 @@ * * Douglas Crosher, 1996, 1997, 1998, 1999. * - * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/gencgc.c,v 1.61 2004/07/24 03:52:45 rtoy Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/gencgc.c,v 1.62 2004/07/27 22:03:53 cwang Exp $ * */ @@ -5626,8 +5626,9 @@ static void unprotect_oldspace(void) * generation. Bytes_allocated and the generation bytes_allocated * counter are updated. The number of bytes freed is returned. */ -#if defined(i386) || defined(__x86_64) +#ifdef i386 extern void i586_bzero(void *addr, int nbytes); +/* i586_bzero may be good on amd64. Eventually we should try it. */ #else #define i586_bzero(addr, nbytes) memset(addr, 0, nbytes) #endif