From owner-p4-projects@FreeBSD.ORG Fri Apr 4 21:24:04 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 138B837B404; Fri, 4 Apr 2003 21:24:04 -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 9F56D37B401 for ; Fri, 4 Apr 2003 21:24:03 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48A8C43FCB for ; Fri, 4 Apr 2003 21:24:03 -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 h355O30U014774 for ; Fri, 4 Apr 2003 21:24:03 -0800 (PST) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h355O2MR014771 for perforce@freebsd.org; Fri, 4 Apr 2003 21:24:02 -0800 (PST) Date: Fri, 4 Apr 2003 21:24:02 -0800 (PST) Message-Id: <200304050524.h355O2MR014771@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 28175 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:24:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=28175 Change 28175 by peter@peter_overcee on 2003/04/04 21:23:36 convert copyin Affected files ... .. //depot/projects/hammer/sys/x86_64/x86_64/support.s#10 edit Differences ... ==== //depot/projects/hammer/sys/x86_64/x86_64/support.s#10 (text+ko) ==== @@ -133,47 +133,47 @@ * copyin(from_user, to_kernel, len) - MP SAFE */ ENTRY(copyin) - movl PCPU(CURPCB),%eax - movl $copyin_fault,PCB_ONFAULT(%eax) - pushl %esi - pushl %edi - movl 12(%esp),%esi /* caddr_t from */ - movl 16(%esp),%edi /* caddr_t to */ - movl 20(%esp),%ecx /* size_t len */ + movq PCPU(CURPCB),%rax + movq $copyin_fault,PCB_ONFAULT(%rax) + pushq %rsi + pushq %rdi + movq 24(%rsp),%rsi /* caddr_t from */ + movq 32(%rsp),%rdi /* caddr_t to */ + movq 40(%rsp),%rcx /* size_t len */ /* * make sure address is valid */ - movl %esi,%edx - addl %ecx,%edx + movq %rsi,%rdx + addq %rcx,%rdx jc copyin_fault - cmpl $VM_MAXUSER_ADDRESS,%edx + cmpq $VM_MAXUSER_ADDRESS,%rdx ja copyin_fault movb %cl,%al - shrl $2,%ecx /* copy longword-wise */ + shrq $3,%rcx /* copy longword-wise */ cld rep - movsl + movsq movb %al,%cl - andb $3,%cl /* copy remaining bytes */ + andb $7,%cl /* copy remaining bytes */ rep movsb - popl %edi - popl %esi - xorl %eax,%eax - movl PCPU(CURPCB),%edx - movl %eax,PCB_ONFAULT(%edx) + popq %rdi + popq %rsi + xorq %rax,%rax + movq PCPU(CURPCB),%rdx + movq %rax,PCB_ONFAULT(%rdx) ret ALIGN_TEXT copyin_fault: - popl %edi - popl %esi - movl PCPU(CURPCB),%edx - movl $0,PCB_ONFAULT(%edx) - movl $EFAULT,%eax + popq %rdi + popq %rsi + movq PCPU(CURPCB),%rdx + movq $0,PCB_ONFAULT(%rdx) + movq $EFAULT,%rax ret /*