2005-04-17 05:20:36 +07:00
|
|
|
/*
|
2007-09-17 23:11:07 +07:00
|
|
|
* Copyright (C) 2004, 2007 Maciej W. Rozycki
|
2005-04-17 05:20:36 +07:00
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
#ifndef _ASM_COMPILER_H
|
|
|
|
#define _ASM_COMPILER_H
|
|
|
|
|
|
|
|
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
2008-05-01 21:28:53 +07:00
|
|
|
#define GCC_IMM_ASM() "n"
|
2005-04-17 05:20:36 +07:00
|
|
|
#define GCC_REG_ACCUM "$0"
|
|
|
|
#else
|
2008-05-01 21:28:53 +07:00
|
|
|
#define GCC_IMM_ASM() "rn"
|
2005-04-17 05:20:36 +07:00
|
|
|
#define GCC_REG_ACCUM "accum"
|
|
|
|
#endif
|
|
|
|
|
2014-12-19 19:04:46 +07:00
|
|
|
#ifdef CONFIG_CPU_MIPSR6
|
|
|
|
/* All MIPS R6 toolchains support the ZC constrain */
|
|
|
|
#define GCC_OFF_SMALL_ASM() "ZC"
|
|
|
|
#else
|
2014-11-16 05:08:48 +07:00
|
|
|
#ifndef CONFIG_CPU_MICROMIPS
|
2015-01-26 19:44:11 +07:00
|
|
|
#define GCC_OFF_SMALL_ASM() "R"
|
2014-11-16 05:08:48 +07:00
|
|
|
#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)
|
2015-01-26 19:44:11 +07:00
|
|
|
#define GCC_OFF_SMALL_ASM() "ZC"
|
2014-11-16 05:08:48 +07:00
|
|
|
#else
|
|
|
|
#error "microMIPS compilation unsupported with GCC older than 4.9"
|
2014-12-19 19:04:46 +07:00
|
|
|
#endif /* CONFIG_CPU_MICROMIPS */
|
|
|
|
#endif /* CONFIG_CPU_MIPSR6 */
|
2014-11-16 05:08:48 +07:00
|
|
|
|
2014-11-18 22:02:32 +07:00
|
|
|
#ifdef CONFIG_CPU_MIPSR6
|
|
|
|
#define MIPS_ISA_LEVEL "mips64r6"
|
|
|
|
#define MIPS_ISA_ARCH_LEVEL MIPS_ISA_LEVEL
|
|
|
|
#define MIPS_ISA_LEVEL_RAW mips64r6
|
|
|
|
#define MIPS_ISA_ARCH_LEVEL_RAW MIPS_ISA_LEVEL_RAW
|
|
|
|
#else
|
|
|
|
/* MIPS64 is a superset of MIPS32 */
|
|
|
|
#define MIPS_ISA_LEVEL "mips64r2"
|
|
|
|
#define MIPS_ISA_ARCH_LEVEL "arch=r4000"
|
|
|
|
#define MIPS_ISA_LEVEL_RAW mips64r2
|
|
|
|
#define MIPS_ISA_ARCH_LEVEL_RAW MIPS_ISA_LEVEL_RAW
|
|
|
|
#endif /* CONFIG_CPU_MIPSR6 */
|
|
|
|
|
2005-04-17 05:20:36 +07:00
|
|
|
#endif /* _ASM_COMPILER_H */
|