PERFORCE change 28143 for review
Peter Wemm
peter at FreeBSD.org
Fri Apr 4 19:23:14 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=28143
Change 28143 by peter at peter_overcee on 2003/04/04 19:23:00
s/l/q/ for 64 bit regs
Affected files ...
.. //depot/projects/hammer/sys/x86_64/include/asmacros.h#3 edit
.. //depot/projects/hammer/sys/x86_64/include/atomic.h#7 edit
.. //depot/projects/hammer/sys/x86_64/include/mutex.h#3 edit
.. //depot/projects/hammer/sys/x86_64/include/pcpu.h#5 edit
Differences ...
==== //depot/projects/hammer/sys/x86_64/include/asmacros.h#3 (text+ko) ====
@@ -64,10 +64,9 @@
#define NON_GPROF_RET .byte 0xc3 /* opcode for `ret' */
#ifdef LOCORE
-XXX gotta redo this to use a register
#define PCPU(member) %fs:PC_ ## member
#define PCPU_ADDR(member, reg) movq %fs:PC_PRVSPACE,reg; \
- addl $PC_ ## member,reg
+ addq $PC_ ## member,reg
#endif
#ifdef GPROF
==== //depot/projects/hammer/sys/x86_64/include/atomic.h#7 (text+ko) ====
@@ -147,7 +147,7 @@
" " __XSTRING(MPLOCKED) " "
" cmpxchgq %1,%2 ; "
" setz %%al ; "
- " movzbl %%al,%0 ; "
+ " movzbq %%al,%0 ; "
"1: "
"# atomic_cmpset_int"
: "+a" (res) /* 0 (result) %rax, XXX check */
==== //depot/projects/hammer/sys/x86_64/include/mutex.h#3 (text+ko) ====
@@ -61,7 +61,7 @@
pushq $flags ; \
pushq $lck ; \
call _mtx_lock_spin_flags ; \
- addl $0x20, %esp ; \
+ addq $0x20, %rsp ; \
#define MTX_UNLOCK_SPIN(lck) \
pushq $0 ; \
@@ -69,7 +69,7 @@
pushq $0 ; \
pushq $lck ; \
call _mtx_unlock_spin_flags ; \
- addl $0x20, %esp ; \
+ addq $0x20, %rsp ; \
#endif /* !LOCORE */
#endif /* __MACHINE_MUTEX_H */
==== //depot/projects/hammer/sys/x86_64/include/pcpu.h#5 (text+ko) ====
@@ -72,7 +72,7 @@
#define __PCPU_PTR(name) ({ \
__pcpu_type(name) *__p; \
\
- __asm __volatile("movl %%fs:%1,%0; addl %2,%0" \
+ __asm __volatile("movq %%fs:%1,%0; addq %2,%0" \
: "=r" (__p) \
: "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace))), \
"i" (__pcpu_offset(name))); \
More information about the p4-projects
mailing list