Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Use the new "ZC" constraint for MIPS R6

GCC versions supporting MIPS R6 use the ZC constraint to enforce a
9-bit offset for MIPS R6. We will use that for all MIPS R6 LL/SC
instructions.

Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>

+6 -1
+6 -1
arch/mips/include/asm/compiler.h
··· 16 16 #define GCC_REG_ACCUM "accum" 17 17 #endif 18 18 19 + #ifdef CONFIG_CPU_MIPSR6 20 + /* All MIPS R6 toolchains support the ZC constrain */ 21 + #define GCC_OFF_SMALL_ASM() "ZC" 22 + #else 19 23 #ifndef CONFIG_CPU_MICROMIPS 20 24 #define GCC_OFF_SMALL_ASM() "R" 21 25 #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) 22 26 #define GCC_OFF_SMALL_ASM() "ZC" 23 27 #else 24 28 #error "microMIPS compilation unsupported with GCC older than 4.9" 25 - #endif 29 + #endif /* CONFIG_CPU_MICROMIPS */ 30 + #endif /* CONFIG_CPU_MIPSR6 */ 26 31 27 32 #ifdef CONFIG_CPU_MIPSR6 28 33 #define MIPS_ISA_LEVEL "mips64r6"