[parisc-linux-cvs] DIFF 2.4.22-pa10 replace bb,n/depi with nullification

Grant Grundler grundler@parisc-linux.org
Tue, 23 Sep 2003 21:23:57 -0600


On Tue, Sep 23, 2003 at 09:13:25PM -0600, Grant Grundler wrote:
> Log message:
> 2.4.22-pa10 minor improvement a la lamont
> 
> replace bb,n/depi sequence with nullification

Thanks to lamont for this minor improvement.

grant


Index: Makefile
===================================================================
RCS file: /var/cvs/linux-2.4/Makefile,v
retrieving revision 1.423
diff -u -p -r1.423 Makefile
--- Makefile	23 Sep 2003 20:15:32 -0000	1.423
+++ Makefile	24 Sep 2003 02:59:43 -0000
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 22
-EXTRAVERSION = -pa9
+EXTRAVERSION = -pa10
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
Index: arch/parisc/kernel/entry.S
===================================================================
RCS file: /var/cvs/linux-2.4/arch/parisc/kernel/entry.S,v
retrieving revision 1.101
diff -u -p -r1.101 entry.S
--- arch/parisc/kernel/entry.S	26 Aug 2003 16:35:22 -0000	1.101
+++ arch/parisc/kernel/entry.S	24 Sep 2003 02:59:43 -0000
@@ -2341,12 +2341,17 @@ syscall_restore_rfi:
 	LDREG	TASK_PT_PSW(%r1),%r2		   /* Get old PSW */
 	ldi	0x0b,%r20			   /* Create new PSW */
 	depi	-1,13,1,%r20			   /* C, Q, D, and I bits */
-	bb,>=,n	%r19,15,try_tbit		   /* PT_SINGLESTEP */
-	depi	-1,27,1,%r20			   /* R bit */
-try_tbit:
-	bb,>=,n	%r19,14,psw_setup		   /* PT_BLOCKSTEP, see ptrace.c */
-	depi	-1,7,1,%r20			   /* T bit */
-psw_setup:
+
+#define PA_SINGLESTEP_BIT	15
+#define PA_BLOCKSTEP_BIT	14
+	/* if ((%r19.PA_SINGLESTEP_BIT)) { %r20.27=1} */
+	extru,= %r19,PA_SINGLESTEP_BIT,1,%r0
+	depi	-1,27,1,%r20			/* R bit */
+
+	/* if ((%r19.PA_BLOCKSTEP_BIT)) { %r20.7=1} */
+	extru,= %r19,PA_BLOCKSTEP_BIT,1,%r0
+	depi	-1,7,1,%r20			/* T bit */
+
 	STREG	%r20,TASK_PT_PSW(%r1)
 
 	/* Always store space registers, since sr3 can be changed (e.g. fork) */