PERFORCE change 31046 for review
Marcel Moolenaar
marcel at FreeBSD.org
Mon May 12 20:20:35 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=31046
Change 31046 by marcel at marcel_nfs on 2003/05/12 20:19:31
I don't know what I've been drinking or smoking, but using
a stacked register while switching the register stack can
only be bad news. So, use r14/r15 instead of r31/r32. We
could continue to use r31 of course, but r15 pairs better
with r14 than r31 does. This significantly improves the
stability under high load.
While here, define savectx(x) as swapctx(x,NULL) instead of
as savectx__(x). The latter was implemented as swapctx()
anyway.
Affected files ...
.. //depot/projects/ia64_epc/sys/ia64/ia64/context.s#17 edit
.. //depot/projects/ia64_epc/sys/ia64/include/pcb.h#9 edit
Differences ...
==== //depot/projects/ia64_epc/sys/ia64/ia64/context.s#17 (text+ko) ====
@@ -50,7 +50,7 @@
{ .mmi
ld8 r17=[r30],16 // rp
ld8 r18=[r31],16 // pr
- add r32=SIZEOF_SPECIAL,r32
+ add r14=SIZEOF_SPECIAL,r32
;;
}
{ .mmi
@@ -66,7 +66,7 @@
;;
}
{ .mmi
- ld8 r17=[r32],8 // unat (after)
+ ld8 r17=[r14],8 // unat (after)
mov ar.bspstore=r20
mov ar.pfs=r19
;;
@@ -74,18 +74,18 @@
{ .mmi
mov ar.unat=r17
mov ar.rnat=r21
- add r31=8,r32
+ add r15=8,r14
;;
}
{ .mmi
- ld8.fill r4=[r32],16 // r4
- ld8.fill r5=[r31],16 // r5
+ ld8.fill r4=[r14],16 // r4
+ ld8.fill r5=[r15],16 // r5
nop 0
;;
}
{ .mmi
- ld8.fill r6=[r32],16 // r6
- ld8.fill r7=[r31],16 // r7
+ ld8.fill r6=[r14],16 // r6
+ ld8.fill r7=[r15],16 // r7
nop 1
;;
}
@@ -95,86 +95,76 @@
nop 2
}
{ .mmi
- ld8 r17=[r32],16 // b1
- ld8 r18=[r31],16 // b2
+ ld8 r17=[r14],16 // b1
+ ld8 r18=[r15],16 // b2
nop 3
;;
}
{ .mmi
- ld8 r19=[r32],16 // b3
- ld8 r20=[r31],16 // b4
+ ld8 r19=[r14],16 // b3
+ ld8 r20=[r15],16 // b4
mov b1=r17
;;
}
{ .mmi
- ld8 r16=[r32],24 // b5
- ld8 r17=[r31],32 // lc
+ ld8 r16=[r14],24 // b5
+ ld8 r17=[r15],32 // lc
mov b2=r18
;;
}
{ .mmi
- ldf.fill f2=[r32],32
- ldf.fill f3=[r31],32
+ ldf.fill f2=[r14],32
+ ldf.fill f3=[r15],32
mov b3=r19
;;
}
{ .mmi
- ldf.fill f4=[r32],32
- ldf.fill f5=[r31],32
+ ldf.fill f4=[r14],32
+ ldf.fill f5=[r15],32
mov b4=r20
;;
}
{ .mmi
- ldf.fill f16=[r32],32
- ldf.fill f17=[r31],32
+ ldf.fill f16=[r14],32
+ ldf.fill f17=[r15],32
mov b5=r16
;;
}
{ .mmi
- ldf.fill f18=[r32],32
- ldf.fill f19=[r31],32
+ ldf.fill f18=[r14],32
+ ldf.fill f19=[r15],32
mov ar.lc=r17
;;
}
- ldf.fill f20=[r32],32
- ldf.fill f21=[r31],32
+ ldf.fill f20=[r14],32
+ ldf.fill f21=[r15],32
;;
- ldf.fill f22=[r32],32
- ldf.fill f23=[r31],32
+ ldf.fill f22=[r14],32
+ ldf.fill f23=[r15],32
;;
- ldf.fill f24=[r32],32
- ldf.fill f25=[r31],32
+ ldf.fill f24=[r14],32
+ ldf.fill f25=[r15],32
;;
- ldf.fill f26=[r32],32
- ldf.fill f27=[r31],32
+ ldf.fill f26=[r14],32
+ ldf.fill f27=[r15],32
;;
{ .mmi
- ldf.fill f28=[r32],32
- ldf.fill f29=[r31],32
+ ldf.fill f28=[r14],32
+ ldf.fill f29=[r15],32
add r8=1,r0
;;
}
{ .mmb
- ldf.fill f30=[r32]
- ldf.fill f31=[r31]
+ ldf.fill f30=[r14]
+ ldf.fill f31=[r15]
br.ret.sptk rp
;;
}
END(restorectx)
/*
- * void savectx__(struct pcb *)
* void swapctx(struct pcb *old, struct pcb *new)
*/
-
-ENTRY(savectx__,1)
-{ .mib
- alloc r16=ar.pfs,1,1,0,0
- add r33=0,r0
- nop 0
- ;;
-}
- /* FALLTHROUGH */
ENTRY(swapctx, 2)
{ .mmi
==== //depot/projects/ia64_epc/sys/ia64/include/pcb.h#9 (text+ko) ====
@@ -59,10 +59,9 @@
#ifdef _KERNEL
-#define savectx savectx__
+#define savectx(p) swapctx(p, NULL)
void restorectx(struct pcb *) __dead2;
-int savectx(struct pcb *);
-void swapctx(struct pcb *old, struct pcb *new);
+int swapctx(struct pcb *old, struct pcb *new);
#if IA32
void ia32_restorectx(struct pcb *);
More information about the p4-projects
mailing list