patch-2.1.111 linux/include/asm-alpha/page.h
Next file: linux/include/asm-alpha/pgtable.h
Previous file: linux/fs/proc/root.c
Back to the patch index
Back to the overall index
- Lines: 97
- Date:
Wed Jul 22 12:44:48 1998
- Orig file:
v2.1.110/linux/include/asm-alpha/page.h
- Orig date:
Mon Oct 14 01:51:59 1996
diff -u --recursive --new-file v2.1.110/linux/include/asm-alpha/page.h linux/include/asm-alpha/page.h
@@ -19,54 +19,51 @@
*/
static inline void clear_page(unsigned long page)
{
- unsigned long count;
- __asm__ __volatile__(
- ".align 4\n"
- "1:\n\t"
- "stq $31,0(%1)\n\t"
- "stq $31,8(%1)\n\t"
- "stq $31,16(%1)\n\t"
- "stq $31,24(%1)\n\t"
- "subq %0,1,%0\n\t"
- "stq $31,32(%1)\n\t"
- "stq $31,40(%1)\n\t"
- "stq $31,48(%1)\n\t"
- "stq $31,56(%1)\n\t"
- "addq $1,64,$1\n\t"
- "bne %0,1b"
- :"=r" (count),"=r" (page)
- :"0" (PAGE_SIZE/64), "1" (page));
+ unsigned long count = PAGE_SIZE/64;
+ unsigned long *ptr = (unsigned long *)page;
+
+ do {
+ ptr[0] = 0;
+ ptr[1] = 0;
+ ptr[2] = 0;
+ ptr[3] = 0;
+ count--;
+ ptr[4] = 0;
+ ptr[5] = 0;
+ ptr[6] = 0;
+ ptr[7] = 0;
+ ptr += 8;
+ } while (count);
}
-static inline void copy_page(unsigned long to, unsigned long from)
+static inline void copy_page(unsigned long _to, unsigned long _from)
{
- unsigned long count;
- __asm__ __volatile__(
- ".align 4\n"
- "1:\n\t"
- "ldq $0,0(%1)\n\t"
- "ldq $1,8(%1)\n\t"
- "ldq $2,16(%1)\n\t"
- "ldq $3,24(%1)\n\t"
- "ldq $4,32(%1)\n\t"
- "ldq $5,40(%1)\n\t"
- "ldq $6,48(%1)\n\t"
- "ldq $7,56(%1)\n\t"
- "subq %0,1,%0\n\t"
- "addq %1,64,%1\n\t"
- "stq $0,0(%2)\n\t"
- "stq $1,8(%2)\n\t"
- "stq $2,16(%2)\n\t"
- "stq $3,24(%2)\n\t"
- "stq $4,32(%2)\n\t"
- "stq $5,40(%2)\n\t"
- "stq $6,48(%2)\n\t"
- "stq $7,56(%2)\n\t"
- "addq %2,64,%2\n\t"
- "bne %0,1b"
- :"=r" (count), "=r" (from), "=r" (to)
- :"0" (PAGE_SIZE/64), "1" (from), "2" (to)
- :"$0","$1","$2","$3","$4","$5","$6","$7");
+ unsigned long count = PAGE_SIZE/64;
+ unsigned long *to = (unsigned long *)_to;
+ unsigned long *from = (unsigned long *)_from;
+
+ do {
+ unsigned long a,b,c,d,e,f,g,h;
+ a = from[0];
+ b = from[1];
+ c = from[2];
+ d = from[3];
+ e = from[4];
+ f = from[5];
+ g = from[6];
+ h = from[7];
+ count--;
+ from += 8;
+ to[0] = a;
+ to[1] = b;
+ to[2] = c;
+ to[3] = d;
+ to[4] = e;
+ to[5] = f;
+ to[6] = g;
+ to[7] = h;
+ to += 8;
+ } while (count);
}
#ifdef STRICT_MM_TYPECHECKS
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov