Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Remove static branch prediction hints. They pessimi...



details:   https://anonhg.NetBSD.org/src/rev/250f32991667
branches:  trunk
changeset: 763384:250f32991667
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Mar 18 15:18:16 2011 +0000

description:
Remove static branch prediction hints. They pessimize code for all CPUs
but Pentium IV. Discussed with ad@ and dsl@

diffstat:

 sys/arch/amd64/amd64/spl.S    |   8 ++++----
 sys/arch/amd64/amd64/vector.S |   4 ++--
 sys/arch/i386/i386/locore.S   |   6 +++---
 sys/arch/i386/i386/spl.S      |  10 +++++-----
 sys/arch/i386/i386/vector.S   |   6 +++---
 5 files changed, 17 insertions(+), 17 deletions(-)

diffs (138 lines):

diff -r 147627355d82 -r 250f32991667 sys/arch/amd64/amd64/spl.S
--- a/sys/arch/amd64/amd64/spl.S        Fri Mar 18 15:13:54 2011 +0000
+++ b/sys/arch/amd64/amd64/spl.S        Fri Mar 18 15:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spl.S,v 1.23 2009/11/27 03:23:04 rmind Exp $   */
+/*     $NetBSD: spl.S,v 1.24 2011/03/18 15:18:16 joerg Exp $   */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -229,7 +229,7 @@
        movl    CPUVAR(ILEVEL),%edx
        movq    %rbx,%r8
        cmpl    %edx,%edi                       /* new level is lower? */
-       jae,pn  1f
+       jae     1f
 0:
        movl    CPUVAR(IPENDING),%eax
        movl    %edi,%ecx
@@ -239,9 +239,9 @@
         * On the P4 this jump is cheaper than patching in junk
         * using cmov.  Is cmpxchg expensive if it fails?
         */
-       jnz,pn  2f
+       jnz     2f
        cmpxchg8b CPUVAR(ISTATE)                /* swap in new ilevel */
-       jnz,pn  0b
+       jnz     0b
 1:
        movq    %r8,%rbx
        ret
diff -r 147627355d82 -r 250f32991667 sys/arch/amd64/amd64/vector.S
--- a/sys/arch/amd64/amd64/vector.S     Fri Mar 18 15:13:54 2011 +0000
+++ b/sys/arch/amd64/amd64/vector.S     Fri Mar 18 15:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vector.S,v 1.36 2011/01/12 23:12:11 joerg Exp $        */
+/*     $NetBSD: vector.S,v 1.37 2011/03/18 15:18:16 joerg Exp $        */
 
 /*-
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -579,7 +579,7 @@
        movq    _C_LABEL(pmap_mbox)+MB_GLOBAL, %rdi
        movl    $0, _C_LABEL(local_apic)+LAPIC_EOI
        cmpq    $-1, %rax
-       je,pn   3f
+       je      3f
 1:
        /* Invalidate a single page or a range of pages. */
        invlpg  (%rax)
diff -r 147627355d82 -r 250f32991667 sys/arch/i386/i386/locore.S
--- a/sys/arch/i386/i386/locore.S       Fri Mar 18 15:13:54 2011 +0000
+++ b/sys/arch/i386/i386/locore.S       Fri Mar 18 15:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.94 2010/12/20 00:25:35 matt Exp $ */
+/*     $NetBSD: locore.S,v 1.95 2011/03/18 15:18:16 joerg Exp $        */
 
 /*
  * Copyright-o-rama!
@@ -129,7 +129,7 @@
  */
 
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.94 2010/12/20 00:25:35 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.95 2011/03/18 15:18:16 joerg Exp $");
 
 #include "opt_compat_oldboot.h"
 #include "opt_ddb.h"
@@ -1023,7 +1023,7 @@
        /* Switch I/O bitmap */
        movl    PCB_IOMAP(%ebx),%eax
        orl     %eax,%eax
-       jnz,pn  .Lcopy_iobitmap
+       jnz     .Lcopy_iobitmap
        movl    $(IOMAP_INVALOFF << 16),CPUVAR(IOBASE)
 .Liobitmap_done:
 
diff -r 147627355d82 -r 250f32991667 sys/arch/i386/i386/spl.S
--- a/sys/arch/i386/i386/spl.S  Fri Mar 18 15:13:54 2011 +0000
+++ b/sys/arch/i386/i386/spl.S  Fri Mar 18 15:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spl.S,v 1.35 2009/11/27 03:23:10 rmind Exp $   */
+/*     $NetBSD: spl.S,v 1.36 2011/03/18 15:18:16 joerg Exp $   */
 
 /*
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: spl.S,v 1.35 2009/11/27 03:23:10 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spl.S,v 1.36 2011/03/18 15:18:16 joerg Exp $");
 
 #include "opt_vm86.h"
 #include "opt_ddb.h"
@@ -123,14 +123,14 @@
        movl    CPUVAR(ILEVEL),%edx
        cmpl    %edx,%ecx                       /* new level is lower? */
        pushl   %ebx
-       jae,pn  1f
+       jae     1f
 0:
        movl    CPUVAR(IPENDING),%eax
        testl   %eax,CPUVAR(IUNMASK)(,%ecx,4)   /* deferred interrupts? */
        movl    %eax,%ebx
-       jnz,pn  2f
+       jnz     2f
        cmpxchg8b CPUVAR(ISTATE)                /* swap in new ilevel */
-       jnz,pn  0b
+       jnz     0b
 1:
        popl    %ebx
        ret
diff -r 147627355d82 -r 250f32991667 sys/arch/i386/i386/vector.S
--- a/sys/arch/i386/i386/vector.S       Fri Mar 18 15:13:54 2011 +0000
+++ b/sys/arch/i386/i386/vector.S       Fri Mar 18 15:18:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vector.S,v 1.56 2011/01/12 23:12:12 joerg Exp $        */
+/*     $NetBSD: vector.S,v 1.57 2011/03/18 15:18:16 joerg Exp $        */
 
 /*
  * Copyright 2002 (c) Wasabi Systems, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: vector.S,v 1.56 2011/01/12 23:12:12 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vector.S,v 1.57 2011/03/18 15:18:16 joerg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -280,7 +280,7 @@
        movl    %ss:_C_LABEL(pmap_mbox)+MB_GLOBAL, %ebx
        movl    $0, %ss:_C_LABEL(local_apic)+LAPIC_EOI
        cmpl    $-1, %eax
-       je,pn   3f
+       je      3f
 1:
        /* Invalidate a single page or a range of pages. */
        invlpg  %ss:(%eax)



Home | Main Index | Thread Index | Old Index