Remove static branch prediction hints. They pessimize code for all CPUs
but Pentium IV. Discussed with ad@ and dsl@
This commit is contained in:
parent
94e49d10f9
commit
8eab2cff56
|
@ -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 @@ ENTRY(cx8_spllower)
|
|||
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 @@ ENTRY(cx8_spllower)
|
|||
* 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
|
||||
|
|
|
@ -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 @@ IDTVEC(intr_lapic_tlb_bcast)
|
|||
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)
|
||||
|
|
|
@ -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 @@ ENTRY(cpu_switchto)
|
|||
/* 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:
|
||||
|
||||
|
|
|
@ -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 @@ ENTRY(cx8_spllower)
|
|||
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
|
||||
|
|
|
@ -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 @@ IDTVEC(intr_lapic_tlb_bcast)
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue