Commit ef85d057 authored by Paul Burton's avatar Paul Burton

MIPS: Use compact branch for LL/SC loops on MIPSr6+

When targeting MIPSr6 or higher make use of a compact branch in LL/SC
loops, preventing the insertion of a delay slot nop that only serves to
waste space.
Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: linux-kernel@vger.kernel.org
parent 878f75c7
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#ifndef __ASM_LLSC_H #ifndef __ASM_LLSC_H
#define __ASM_LLSC_H #define __ASM_LLSC_H
#include <asm/isa-rev.h>
#if _MIPS_SZLONG == 32 #if _MIPS_SZLONG == 32
#define SZLONG_LOG 5 #define SZLONG_LOG 5
#define SZLONG_MASK 31UL #define SZLONG_MASK 31UL
...@@ -32,6 +34,8 @@ ...@@ -32,6 +34,8 @@
*/ */
#if R10000_LLSC_WAR #if R10000_LLSC_WAR
# define __SC_BEQZ "beqzl " # define __SC_BEQZ "beqzl "
#elif MIPS_ISA_REV >= 6
# define __SC_BEQZ "beqzc "
#else #else
# define __SC_BEQZ "beqz " # define __SC_BEQZ "beqz "
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment