diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-08-11 19:51:21 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-08-11 19:51:21 -0400 |
commit | 036eaa24cf573c69982ba18dd427de68f6eeba2a (patch) | |
tree | 1a54a554fae6457b29433d509416a922e3d48f46 /arch | |
parent | f997e224fc30361fe683c6b5d0ba39718043ca8d (diff) | |
download | musl-036eaa24cf573c69982ba18dd427de68f6eeba2a.tar.gz musl-036eaa24cf573c69982ba18dd427de68f6eeba2a.tar.xz musl-036eaa24cf573c69982ba18dd427de68f6eeba2a.zip |
avoid need for -march=mips2 to compile mips atomic.h asm
linux guarantees ll/sc are always available. on mips1, they will be emulated by the kernel. thus they are part of the linux mips1 abi and safe to use.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/atomic.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/atomic.h b/arch/mips/atomic.h index a09f98df..f3478ef2 100644 --- a/arch/mips/atomic.h +++ b/arch/mips/atomic.h @@ -27,6 +27,7 @@ static inline int a_cas(volatile int *p, int t, int s) int dummy; __asm__ __volatile__( ".set push\n" + ".set mips2\n" ".set noreorder\n" "1: ll %0, 0(%2)\n" " bne %0, %3, 1f\n" @@ -56,6 +57,7 @@ static inline int a_swap(volatile int *x, int v) int old, dummy; __asm__ __volatile__( ".set push\n" + ".set mips2\n" ".set noreorder\n" "1: ll %0, 0(%2)\n" " addu %1, %3, $0\n" @@ -73,6 +75,7 @@ static inline int a_fetch_add(volatile int *x, int v) int old, dummy; __asm__ __volatile__( ".set push\n" + ".set mips2\n" ".set noreorder\n" "1: ll %0, 0(%2)\n" " addu %1, %0, %3\n" @@ -90,6 +93,7 @@ static inline void a_inc(volatile int *x) int dummy; __asm__ __volatile__( ".set push\n" + ".set mips2\n" ".set noreorder\n" "1: ll %0, 0(%1)\n" " addu %0, %0, 1\n" @@ -106,6 +110,7 @@ static inline void a_dec(volatile int *x) int dummy; __asm__ __volatile__( ".set push\n" + ".set mips2\n" ".set noreorder\n" "1: ll %0, 0(%1)\n" " subu %0, %0, 1\n" @@ -122,6 +127,7 @@ static inline void a_store(volatile int *p, int x) int dummy; __asm__ __volatile__( ".set push\n" + ".set mips2\n" ".set noreorder\n" "1: ll %0, 0(%1)\n" " addu %0, %2, $0\n" @@ -147,6 +153,7 @@ static inline void a_and(volatile int *p, int v) int dummy; __asm__ __volatile__( ".set push\n" + ".set mips2\n" ".set noreorder\n" "1: ll %0, 0(%1)\n" " and %0, %0, %2\n" @@ -163,6 +170,7 @@ static inline void a_or(volatile int *p, int v) int dummy; __asm__ __volatile__( ".set push\n" + ".set mips2\n" ".set noreorder\n" "1: ll %0, 0(%1)\n" " or %0, %0, %2\n" |