PERFORCE change 28177 for review
Peter Wemm
peter at FreeBSD.org
Fri Apr 4 21:38:23 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=28177
Change 28177 by peter at peter_overcee on 2003/04/04 21:37:23
convert su*, nuke bcmp for a C version (todo)
Affected files ...
.. //depot/projects/hammer/sys/x86_64/x86_64/support.s#12 edit
Differences ...
==== //depot/projects/hammer/sys/x86_64/x86_64/support.s#12 (text+ko) ====
@@ -283,18 +283,18 @@
* Write a byte (word, longword) to user memory
*/
ENTRY(suword)
- movl PCPU(CURPCB),%ecx
- movl $fusufault,PCB_ONFAULT(%ecx)
- movl 4(%esp),%edx
+ movq PCPU(CURPCB),%rcx
+ movq $fusufault,PCB_ONFAULT(%rcx)
+ movq 8(%rsp),%edx
- cmpl $VM_MAXUSER_ADDRESS-4,%edx /* verify address validity */
+ cmpq $VM_MAXUSER_ADDRESS-4,%rdx /* verify address validity */
ja fusufault
- movl 8(%esp),%eax
- movl %eax,(%edx)
- xorl %eax,%eax
- movl PCPU(CURPCB),%ecx
- movl %eax,PCB_ONFAULT(%ecx)
+ movl 16(%rsp),%rax
+ movl %eax,(%rdx)
+ xorq %rax,%rax
+ movq PCPU(CURPCB),%rcx
+ movq %rax,PCB_ONFAULT(%rcx)
ret
ENTRY(suword32)
@@ -304,36 +304,36 @@
* suword16 - MP SAFE
*/
ENTRY(suword16)
- movl PCPU(CURPCB),%ecx
- movl $fusufault,PCB_ONFAULT(%ecx)
- movl 4(%esp),%edx
+ movq PCPU(CURPCB),%rcx
+ movq $fusufault,PCB_ONFAULT(%rcx)
+ movq 8(%rsp),%rdx
- cmpl $VM_MAXUSER_ADDRESS-2,%edx /* verify address validity */
+ cmpq $VM_MAXUSER_ADDRESS-2,%rdx /* verify address validity */
ja fusufault
- movw 8(%esp),%ax
- movw %ax,(%edx)
- xorl %eax,%eax
- movl PCPU(CURPCB),%ecx /* restore trashed register */
- movl %eax,PCB_ONFAULT(%ecx)
+ movw 16(%rsp),%ax
+ movw %ax,(%rdx)
+ xorq %rax,%rax
+ movq PCPU(CURPCB),%rcx /* restore trashed register */
+ movq %rax,PCB_ONFAULT(%rcx)
ret
/*
* subyte - MP SAFE
*/
ENTRY(subyte)
- movl PCPU(CURPCB),%ecx
- movl $fusufault,PCB_ONFAULT(%ecx)
- movl 4(%esp),%edx
+ movq PCPU(CURPCB),%rcx
+ movq $fusufault,PCB_ONFAULT(%rcx)
+ movq 8(%rsp),%rdx
- cmpl $VM_MAXUSER_ADDRESS-1,%edx /* verify address validity */
+ cmpq $VM_MAXUSER_ADDRESS-1,%rdx /* verify address validity */
ja fusufault
- movb 8(%esp),%al
- movb %al,(%edx)
- xorl %eax,%eax
- movl PCPU(CURPCB),%ecx /* restore trashed register */
- movl %eax,PCB_ONFAULT(%ecx)
+ movb 18(%rsp),%al
+ movb %al,(%rdx)
+ xorq %rax,%rax
+ movq PCPU(CURPCB),%rcx /* restore trashed register */
+ movq %rax,PCB_ONFAULT(%rcx)
ret
/*
@@ -450,34 +450,6 @@
popl %esi
ret
-ENTRY(bcmp)
- pushl %edi
- pushl %esi
- movl 12(%esp),%edi
- movl 16(%esp),%esi
- movl 20(%esp),%edx
- xorl %eax,%eax
-
- movl %edx,%ecx
- shrl $2,%ecx
- cld /* compare forwards */
- repe
- cmpsl
- jne 1f
-
- movl %edx,%ecx
- andl $3,%ecx
- repe
- cmpsb
- je 2f
-1:
- incl %eax
-2:
- popl %esi
- popl %edi
- ret
-
-
/*
* Handling of special 386 registers and descriptor tables etc
*/
More information about the p4-projects
mailing list