hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/arch/mips/include/asm/compiler.h
....@@ -43,32 +43,25 @@
4343 #undef barrier_before_unreachable
4444 #define barrier_before_unreachable() asm volatile(".insn")
4545
46
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
47
-#define GCC_IMM_ASM() "n"
48
-#define GCC_REG_ACCUM "$0"
46
+#if !defined(CONFIG_CC_IS_GCC) || \
47
+ (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)
48
+# define GCC_OFF_SMALL_ASM() "ZC"
49
+#elif defined(CONFIG_CPU_MICROMIPS)
50
+# error "microMIPS compilation unsupported with GCC older than 4.9"
4951 #else
50
-#define GCC_IMM_ASM() "rn"
51
-#define GCC_REG_ACCUM "accum"
52
+# define GCC_OFF_SMALL_ASM() "R"
5253 #endif
53
-
54
-#ifdef CONFIG_CPU_MIPSR6
55
-/* All MIPS R6 toolchains support the ZC constrain */
56
-#define GCC_OFF_SMALL_ASM() "ZC"
57
-#else
58
-#ifndef CONFIG_CPU_MICROMIPS
59
-#define GCC_OFF_SMALL_ASM() "R"
60
-#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)
61
-#define GCC_OFF_SMALL_ASM() "ZC"
62
-#else
63
-#error "microMIPS compilation unsupported with GCC older than 4.9"
64
-#endif /* CONFIG_CPU_MICROMIPS */
65
-#endif /* CONFIG_CPU_MIPSR6 */
6654
6755 #ifdef CONFIG_CPU_MIPSR6
6856 #define MIPS_ISA_LEVEL "mips64r6"
6957 #define MIPS_ISA_ARCH_LEVEL MIPS_ISA_LEVEL
7058 #define MIPS_ISA_LEVEL_RAW mips64r6
7159 #define MIPS_ISA_ARCH_LEVEL_RAW MIPS_ISA_LEVEL_RAW
60
+#elif defined(CONFIG_CPU_MIPSR5)
61
+#define MIPS_ISA_LEVEL "mips64r5"
62
+#define MIPS_ISA_ARCH_LEVEL MIPS_ISA_LEVEL
63
+#define MIPS_ISA_LEVEL_RAW mips64r5
64
+#define MIPS_ISA_ARCH_LEVEL_RAW MIPS_ISA_LEVEL_RAW
7265 #else
7366 /* MIPS64 is a superset of MIPS32 */
7467 #define MIPS_ISA_LEVEL "mips64r2"