Skip to content

Commit

Permalink
Always use sync if mips3 or later or not using O32 ABI. (A little red…
Browse files Browse the repository at this point in the history
…undant

since not using O32 means you are using mips3 or later.)
  • Loading branch information
matt committed Jun 23, 2015
1 parent 46e54ba commit 672acfb
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions common/lib/libc/arch/mips/atomic/membar_ops.S
@@ -1,4 +1,4 @@
/* $NetBSD: membar_ops.S,v 1.7 2015/06/22 06:06:02 matt Exp $ */
/* $NetBSD: membar_ops.S,v 1.8 2015/06/23 20:56:17 matt Exp $ */

/*-
* Copyright (c) 2006, 2007 The NetBSD Foundation, Inc.
Expand Down Expand Up @@ -31,33 +31,19 @@

#include "atomic_op_asm.h"

#if defined(_KERNEL) && !defined(_RUMPKERNEL)

#ifdef _KERNEL_OPT
#include "opt_cputype.h"
#include "opt_lockdebug.h"
#include "opt_multiprocessor.h"
#endif

#include "assym.h"

#if (MIPS_HAS_LLSC != 0 && defined(MULTIPROCESSOR)) || !defined(__mips_o32)
#define SYNC sync
#endif
#elif !defined(__mips_o32)
#define SYNC sync
// If we are on building for MIPS III or later, put in SYNCs
#if __mips >= 3 || !defined(__mips_o32)
# define SYNC sync
#else
# define SYNC nop
#endif

.text
.set noreorder

LEAF(_membar_sync)
j ra
#ifdef SYNC
SYNC
#else
nop
#endif
END(_membar_sync)

#ifdef __OCTEON__
Expand Down

0 comments on commit 672acfb

Please sign in to comment.