Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Apr 2005 14:28:59 GMT
From:      David Xu <davidxu@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 76008 for review
Message-ID:  <200504261428.j3QESx6d010465@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=76008

Change 76008 by davidxu@davidxu_tiger on 2005/04/26 14:28:17

	Eliminate a branch.

Affected files ...

.. //depot/projects/davidxu_thread/src/sys/i386/i386/sysenter.s#2 edit

Differences ...

==== //depot/projects/davidxu_thread/src/sys/i386/i386/sysenter.s#2 (text+ko) ====

@@ -28,7 +28,7 @@
 	MEXITCOUNT
 	movl    PCPU(CURPCB),%eax
 	testl	$PCB_FULLCTX,PCB_FLAGS(%eax)
-	jnz	2f
+	jnz	1f
 	/*
 	 * Check for ASTs atomically with returning.  Disabling CPU
 	 * interrupts provides sufficient locking even in the SMP case,
@@ -37,10 +37,7 @@
 	cli
 	movl	PCPU(CURTHREAD),%eax
 	testl	$TDF_ASTPENDING | TDF_NEEDRESCHED,TD_FLAGS(%eax)
-	jz	1f
-	sti
-	jmp	2f
-1:
+	jnz	1f
 	.globl	sysenter_popl_fs
 sysenter_popl_fs:
 	popl	%fs
@@ -68,6 +65,8 @@
 #endif
 	sysexit
 
-2:      /* Requested full context restore, use doreti for that */
+1: 
+	/* Requested full context restore, use doreti for that */
+	sti
 	andq    $~PCB_FULLCTX,PCB_FLAGS(%rax)
 	jmp     doreti



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504261428.j3QESx6d010465>