From owner-p4-projects@FreeBSD.ORG Fri Apr 4 21:22:01 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 503CB37B401; Fri, 4 Apr 2003 21:22:01 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D727237B404 for ; Fri, 4 Apr 2003 21:22:00 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 274B543FAF for ; Fri, 4 Apr 2003 21:22:00 -0800 (PST) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h355Lx0U014729 for ; Fri, 4 Apr 2003 21:21:59 -0800 (PST) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h355Lx1W014726 for perforce@freebsd.org; Fri, 4 Apr 2003 21:21:59 -0800 (PST) Date: Fri, 4 Apr 2003 21:21:59 -0800 (PST) Message-Id: <200304050521.h355Lx1W014726@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 28174 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2003 05:22:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=28174 Change 28174 by peter@peter_overcee on 2003/04/04 21:21:26 convert copyout to x86-64 Affected files ... .. //depot/projects/hammer/sys/x86_64/x86_64/support.s#9 edit Differences ... ==== //depot/projects/hammer/sys/x86_64/x86_64/support.s#9 (text+ko) ==== @@ -65,14 +65,14 @@ * copyout(from_kernel, to_user, len) - MP SAFE */ ENTRY(copyout) - movl PCPU(CURPCB),%eax - movl $copyout_fault,PCB_ONFAULT(%eax) - pushl %esi - pushl %edi - pushl %ebx - movl 16(%esp),%esi - movl 20(%esp),%edi - movl 24(%esp),%ebx + movq PCPU(CURPCB),%rax + movq $copyout_fault,PCB_ONFAULT(%rax) + pushq %rsi + pushq %rdi + pushq %rbx + movq 32(%rsp),%rsi + movq 40(%rsp),%rdi + movq 48(%rsp),%rbx testl %ebx,%ebx /* anything to do? */ jz done_copyout @@ -86,8 +86,8 @@ /* * First, prevent address wrapping. */ - movl %edi,%eax - addl %ebx,%eax + movq %rdi,%rax + addq %rbx,%rax jc copyout_fault /* * XXX STOP USING VM_MAXUSER_ADDRESS. @@ -95,38 +95,38 @@ * looks like there is an off by one error, and of course it caused an off * by one error in several places. */ - cmpl $VM_MAXUSER_ADDRESS,%eax + cmpq $VM_MAXUSER_ADDRESS,%rax ja copyout_fault - /* bcopy(%esi, %edi, %ebx) */ - movl %ebx,%ecx + /* bcopy(%rsi, %rdi, %rbx) */ + movq %rbx,%rcx - shrl $2,%ecx + shrq $3,%rcx cld rep - movsl + movsq movb %bl,%cl - andb $3,%cl + andb $7,%cl rep movsb done_copyout: - popl %ebx - popl %edi - popl %esi - xorl %eax,%eax - movl PCPU(CURPCB),%edx - movl %eax,PCB_ONFAULT(%edx) + popq %rbx + popq %rdi + popq %rsi + xorq %rax,%rax + movq PCPU(CURPCB),%rdx + movq %rax,PCB_ONFAULT(%rdx) ret ALIGN_TEXT copyout_fault: - popl %ebx - popl %edi - popl %esi - movl PCPU(CURPCB),%edx - movl $0,PCB_ONFAULT(%edx) - movl $EFAULT,%eax + popq %rbx + popq %rdi + popq %rsi + movq PCPU(CURPCB),%rdx + movq $0,PCB_ONFAULT(%rdx) + movq $EFAULT,%rax ret /*