Skip to content

Commit

Permalink
MIPS: asm: compiler: Add new macros to set ISA and arch asm annotations
Browse files Browse the repository at this point in the history
There are certain places where the code uses .set mips32 or .set mips64
or .set arch=r4000. In preparation of MIPS R6 support, and in order to
use as less #ifdefs as possible, we define new macros to set similar
annotations for MIPS R6.

Signed-off-by: Markos Chandras <[email protected]>
  • Loading branch information
Markos Chandras committed Feb 17, 2015
1 parent a168b8f commit be51369
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arch/mips/include/asm/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,17 @@
#error "microMIPS compilation unsupported with GCC older than 4.9"
#endif

#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 */

#endif /* _ASM_COMPILER_H */

0 comments on commit be51369

Please sign in to comment.