From owner-freebsd-hackers Sat Dec 23 20:46:44 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id UAA25235 for hackers-outgoing; Sat, 23 Dec 1995 20:46:44 -0800 (PST) Received: from Aspen.Woc.Atinc.COM ([198.138.38.205]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id UAA25083 for ; Sat, 23 Dec 1995 20:45:14 -0800 (PST) Received: (from jmb@localhost) by Aspen.Woc.Atinc.COM (8.6.12/8.6.9) id XAA23980; Sat, 23 Dec 1995 23:43:37 -0500 Date: Sat, 23 Dec 1995 23:43:35 -0500 (EST) From: "Jonathan M. Bresler" X-Sender: jmb@Aspen.Woc.Atinc.COM To: Torbjorn Granlund cc: michael butler , Torbjorn Granlund , freebsd-hackers@freebsd.org Subject: Re: Pentium bcopy 486DX-66 results In-Reply-To: <199512240224.DAA26871@insanus.matematik.su.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org Precedence: bulk On Sun, 24 Dec 1995, Torbjorn Granlund wrote: > > I don't have any 486 systems, so I cannot tell for sure. Here is a simple > test program that you can use for timing tests: here are results using 2.1.0-RELEASE, a 486dx-66 with an asus sp3g motherboard and write-back cache discipline. Aspen:[45] ./a.out copy 8259 memcpy 8582 the results vary with the number of times in succession that i run the program ;) Once Twice Thrice 4th 5th 6th 7th copy 8259 6730 6709 6708 6706 6736 6695 memcpy 8582 7363 7605 7491 6667 6863 7819 i had to change the comment sytle on several lines to satisfy gas "GNU assembler version 1.92.3, FreeBSD $Revision: 1.4 $" the original produced: copy.s.orig: Assembler messages: copy.s.orig:13: Warning: Missing operand value assumed absolute 0. copy.s.orig:13: Error: Relocation error. Absolute 0 assumed. copy.s.orig:13: Error: Ignoring junk 'zero' after expression copy.s.orig:13: Error: Unimplemented segment type 0 in parse_operand copy.s.orig:17: Warning: Missing operand value assumed absolute 0. copy.s.orig:17: Error: Relocation error. Absolute 0 assumed. copy.s.orig:17: Error: Bad Absolute Expression, absolute 0 assumed. copy.s.orig:17: Error: Rest of line ignored. First ignored character is `0'. copy.s.orig:19: Error: Rest of line ignored. First ignored character is `*'. copy.s.orig:20: Error: no such opcode prefix ('nop') copy.s.orig:24: Warning: Missing operand value assumed absolute 0. copy.s.orig:24: Error: Relocation error. Absolute 0 assumed. copy.s.orig:24: Error: Ignoring junk 'words pairwise*/' after expression copy.s.orig:24: Error: Unimplemented segment type 131080 in parse_operand here is the diff -c2 (just changed '/*' to '#' on lines 13, 17, 24) *** copy.s.orig Sat Dec 23 23:25:25 1995 --- copy.s Sat Dec 23 23:33:59 1995 *************** *** 11,26 **** shrl $3,%ecx /* count for unrolled loop */ ! jz Lend /* if zero, skip unrolled loop */ movl (%edi),%eax /* Fetch destination cache line */ ! .align 2,0x90 /* supply 0x90 for broken assemblers */ ! Loop: movl 28(%edi),%eax /* allocate cache line for destination ! */ ! nop /* we want these two insn to pair! */ movl (%esi),%eax /* read words pairwise */ movl 4(%esi),%edx ! movl %eax,(%edi) /* store words pairwise */ movl %edx,4(%edi) --- 11,25 ---- shrl $3,%ecx /* count for unrolled loop */ ! jz Lend # if zero, skip unrolled loop */ movl (%edi),%eax /* Fetch destination cache line */ ! .align 2,0x90 # supply 0x90 for broken assemblers */ ! Loop: movl 28(%edi),%eax /* allocate cache line for destination */ ! nop # we want these two insn to pair! */ movl (%esi),%eax /* read words pairwise */ movl 4(%esi),%edx ! movl %eax,(%edi) # store words pairwise */ movl %edx,4(%edi) Jonathan M. Bresler FreeBSD Postmaster jmb@FreeBSD.ORG play go. ride bike. hack FreeBSD.--ah the good life i am moving to a new job. PLEASE USE: jmb@FreeBSD.ORG