PERFORCE change 28176 for review
Peter Wemm
peter at FreeBSD.org
Fri Apr 4 21:32:17 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=28176
Change 28176 by peter at peter_overcee on 2003/04/04 21:32:09
convert fu*
Affected files ...
.. //depot/projects/hammer/sys/x86_64/x86_64/support.s#11 edit
Differences ...
==== //depot/projects/hammer/sys/x86_64/x86_64/support.s#11 (text+ko) ====
@@ -180,16 +180,16 @@
* casuptr. Compare and set user pointer. Returns -1 or the current value.
*/
ENTRY(casuptr)
- movl PCPU(CURPCB),%ecx
- movl $fusufault,PCB_ONFAULT(%ecx)
- movl 4(%esp),%edx /* dst */
- movl 8(%esp),%eax /* old */
- movl 12(%esp),%ecx /* new */
+ movq PCPU(CURPCB),%rcx
+ movq $fusufault,PCB_ONFAULT(%rcx)
+ movq 8(%esp),%rdx /* dst */
+ movq 16(%esp),%rax /* old */
+ movq 24(%esp),%rcx /* new */
- cmpl $VM_MAXUSER_ADDRESS-4,%edx /* verify address is valid */
+ cmpq $VM_MAXUSER_ADDRESS-4,%rdx /* verify address is valid */
ja fusufault
- cmpxchgl %ecx, (%edx)
+ cmpxchgq %rcx, (%rdx)
/*
* The old value is in %eax. If the store succeeded it will be the
@@ -197,9 +197,9 @@
* be the current value.
*/
- movl PCPU(CURPCB),%ecx
- movl $fusufault,PCB_ONFAULT(%ecx)
- movl $0,PCB_ONFAULT(%ecx)
+ movq PCPU(CURPCB),%rcx
+ movq $fusufault,PCB_ONFAULT(%rcx)
+ movq $0,PCB_ONFAULT(%rcx)
ret
/*
@@ -208,15 +208,17 @@
* Fetch a byte (sword, word) from user memory
*/
ENTRY(fuword)
- movl PCPU(CURPCB),%ecx
- movl $fusufault,PCB_ONFAULT(%ecx)
- movl 4(%esp),%edx /* from */
+ movq PCPU(CURPCB),%rcx
+ movq $fusufault,PCB_ONFAULT(%rcx)
+ movq 8(%rsp),%edx /* from */
- cmpl $VM_MAXUSER_ADDRESS-4,%edx /* verify address is valid */
+ cmpq $VM_MAXUSER_ADDRESS-4,%edx /* verify address is valid */
ja fusufault
- movl (%edx),%eax
- movl $0,PCB_ONFAULT(%ecx)
+# XXX use the 64 extend
+ xorq %rax, %rax
+ movl (%rdx),%eax
+ movq $0,PCB_ONFAULT(%rcx)
ret
ENTRY(fuword32)
@@ -230,45 +232,49 @@
*/
ALTENTRY(suswintr)
ENTRY(fuswintr)
- movl $-1,%eax
+ movq $-1,%rax
ret
/*
* fuword16 - MP SAFE
*/
ENTRY(fuword16)
- 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
+ cmpq $VM_MAXUSER_ADDRESS-2,%rdx
ja fusufault
- movzwl (%edx),%eax
- movl $0,PCB_ONFAULT(%ecx)
+# XXX use the 64 extend
+ xorq %rax, %rax
+ movzwl (%rdx),%eax
+ movq $0,PCB_ONFAULT(%rcx)
ret
/*
* fubyte - MP SAFE
*/
ENTRY(fubyte)
- 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-1,%edx
+ cmpq $VM_MAXUSER_ADDRESS-1,%rdx
ja fusufault
- movzbl (%edx),%eax
- movl $0,PCB_ONFAULT(%ecx)
+# XXX use the 64 extend
+ xorq %rax, %rax
+ movzbl (%rdx),%eax
+ movl $0,PCB_ONFAULT(%rcx)
ret
ALIGN_TEXT
fusufault:
- movl PCPU(CURPCB),%ecx
- xorl %eax,%eax
- movl %eax,PCB_ONFAULT(%ecx)
- decl %eax
+ movq PCPU(CURPCB),%rcx
+ xorq %rax,%rax
+ movq %rax,PCB_ONFAULT(%rcx)
+ decq %rax
ret
/*
More information about the p4-projects
mailing list