提交 fa998ebb 编写于 作者: M Markos Chandras

MIPS: asm: cmpxchg: Update ISA constraints for MIPS R6 support

MIPS R6 changed the opcodes for LL/SC instructions so we need to set
the correct ISA.

Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>
Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
上级 123e4b3b
...@@ -39,11 +39,11 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) ...@@ -39,11 +39,11 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val)
do { do {
__asm__ __volatile__( __asm__ __volatile__(
" .set arch=r4000 \n" " .set "MIPS_ISA_ARCH_LEVEL" \n"
" ll %0, %3 # xchg_u32 \n" " ll %0, %3 # xchg_u32 \n"
" .set mips0 \n" " .set mips0 \n"
" move %2, %z4 \n" " move %2, %z4 \n"
" .set arch=r4000 \n" " .set "MIPS_ISA_ARCH_LEVEL" \n"
" sc %2, %1 \n" " sc %2, %1 \n"
" .set mips0 \n" " .set mips0 \n"
: "=&r" (retval), "=" GCC_OFF_SMALL_ASM() (*m), : "=&r" (retval), "=" GCC_OFF_SMALL_ASM() (*m),
...@@ -90,7 +90,7 @@ static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val) ...@@ -90,7 +90,7 @@ static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val)
do { do {
__asm__ __volatile__( __asm__ __volatile__(
" .set arch=r4000 \n" " .set "MIPS_ISA_ARCH_LEVEL" \n"
" lld %0, %3 # xchg_u64 \n" " lld %0, %3 # xchg_u64 \n"
" move %2, %z4 \n" " move %2, %z4 \n"
" scd %2, %1 \n" " scd %2, %1 \n"
...@@ -165,12 +165,12 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz ...@@ -165,12 +165,12 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
__asm__ __volatile__( \ __asm__ __volatile__( \
" .set push \n" \ " .set push \n" \
" .set noat \n" \ " .set noat \n" \
" .set arch=r4000 \n" \ " .set "MIPS_ISA_ARCH_LEVEL" \n" \
"1: " ld " %0, %2 # __cmpxchg_asm \n" \ "1: " ld " %0, %2 # __cmpxchg_asm \n" \
" bne %0, %z3, 2f \n" \ " bne %0, %z3, 2f \n" \
" .set mips0 \n" \ " .set mips0 \n" \
" move $1, %z4 \n" \ " move $1, %z4 \n" \
" .set arch=r4000 \n" \ " .set "MIPS_ISA_ARCH_LEVEL" \n" \
" " st " $1, %1 \n" \ " " st " $1, %1 \n" \
" beqz $1, 1b \n" \ " beqz $1, 1b \n" \
" .set pop \n" \ " .set pop \n" \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册