diff options
Diffstat (limited to 'arch/mips/include/asm/compiler.h')
| -rw-r--r-- | arch/mips/include/asm/compiler.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/arch/mips/include/asm/compiler.h b/arch/mips/include/asm/compiler.h index c73815e0123a..e081a265f422 100644 --- a/arch/mips/include/asm/compiler.h +++ b/arch/mips/include/asm/compiler.h | |||
| @@ -16,12 +16,30 @@ | |||
| 16 | #define GCC_REG_ACCUM "accum" | 16 | #define GCC_REG_ACCUM "accum" |
| 17 | #endif | 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 | #ifndef CONFIG_CPU_MICROMIPS | 23 | #ifndef CONFIG_CPU_MICROMIPS |
| 20 | #define GCC_OFF12_ASM() "R" | 24 | #define GCC_OFF_SMALL_ASM() "R" |
| 21 | #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) | 25 | #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) |
| 22 | #define GCC_OFF12_ASM() "ZC" | 26 | #define GCC_OFF_SMALL_ASM() "ZC" |
| 23 | #else | 27 | #else |
| 24 | #error "microMIPS compilation unsupported with GCC older than 4.9" | 28 | #error "microMIPS compilation unsupported with GCC older than 4.9" |
| 25 | #endif | 29 | #endif /* CONFIG_CPU_MICROMIPS */ |
| 30 | #endif /* CONFIG_CPU_MIPSR6 */ | ||
| 31 | |||
| 32 | #ifdef CONFIG_CPU_MIPSR6 | ||
| 33 | #define MIPS_ISA_LEVEL "mips64r6" | ||
| 34 | #define MIPS_ISA_ARCH_LEVEL MIPS_ISA_LEVEL | ||
| 35 | #define MIPS_ISA_LEVEL_RAW mips64r6 | ||
| 36 | #define MIPS_ISA_ARCH_LEVEL_RAW MIPS_ISA_LEVEL_RAW | ||
| 37 | #else | ||
| 38 | /* MIPS64 is a superset of MIPS32 */ | ||
| 39 | #define MIPS_ISA_LEVEL "mips64r2" | ||
| 40 | #define MIPS_ISA_ARCH_LEVEL "arch=r4000" | ||
| 41 | #define MIPS_ISA_LEVEL_RAW mips64r2 | ||
| 42 | #define MIPS_ISA_ARCH_LEVEL_RAW MIPS_ISA_LEVEL_RAW | ||
| 43 | #endif /* CONFIG_CPU_MIPSR6 */ | ||
| 26 | 44 | ||
| 27 | #endif /* _ASM_COMPILER_H */ | 45 | #endif /* _ASM_COMPILER_H */ |
