summaryrefslogtreecommitdiffstats
path: root/arch/mips/include
diff options
context:
space:
mode:
authorSteven J. Hill <Steven.Hill@imgtec.com>2013-03-25 12:03:41 -0500
committerRalf Baechle <ralf@linux-mips.org>2013-05-09 17:55:18 +0200
commitcf6d905828c2c75ebe8c818901e71e09ffe6f629 (patch)
treed2656af812415c8d0cb63d0fb1ea45c12ec9c1ed /arch/mips/include
parent8fe4bb98e42945ddf2c0d47cec647ef76909e812 (diff)
downloadop-kernel-dev-cf6d905828c2c75ebe8c818901e71e09ffe6f629.zip
op-kernel-dev-cf6d905828c2c75ebe8c818901e71e09ffe6f629.tar.gz
MIPS: microMIPS: Fix macro naming in micro-assembler.
The macros did not properly take into account the ISA that the kernel was being compiled with. A classic MIPS kernel will have the standard 'uasm_i_##op' macro functions with 'MM_uasm_i_##op' macro functions for the microMIPS version. A pure microMIPS kernel will have the standard macros with 'CL_uasm_i_##op' macro functions for the classic version. Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Diffstat (limited to 'arch/mips/include')
-rw-r--r--arch/mips/include/asm/uasm.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h
index f924b87..370d967 100644
--- a/arch/mips/include/asm/uasm.h
+++ b/arch/mips/include/asm/uasm.h
@@ -26,15 +26,29 @@
#define _UASM_ISA_MICROMIPS 1
#ifndef UASM_ISA
+#ifdef CONFIG_CPU_MICROMIPS
+#define UASM_ISA _UASM_ISA_MICROMIPS
+#else
#define UASM_ISA _UASM_ISA_CLASSIC
#endif
+#endif
#if (UASM_ISA == _UASM_ISA_CLASSIC)
+#ifdef CONFIG_CPU_MICROMIPS
+#define ISAOPC(op) CL_uasm_i##op
+#define ISAFUNC(x) CL_##x
+#else
#define ISAOPC(op) uasm_i##op
#define ISAFUNC(x) x
+#endif
#elif (UASM_ISA == _UASM_ISA_MICROMIPS)
+#ifdef CONFIG_CPU_MICROMIPS
+#define ISAOPC(op) uasm_i##op
+#define ISAFUNC(x) x
+#else
#define ISAOPC(op) MM_uasm_i##op
#define ISAFUNC(x) MM_##x
+#endif
#else
#error Unsupported micro-assembler ISA!!!
#endif
@@ -160,9 +174,9 @@ void ISAFUNC(UASM_i_LA_mostly)(u32 **buf, unsigned int rs, long addr);
void ISAFUNC(UASM_i_LA)(u32 **buf, unsigned int rs, long addr);
#define UASM_L_LA(lb) \
-static inline void __uasminit uasm_l##lb(struct uasm_label **lab, u32 *addr) \
+static inline void __uasminit ISAFUNC(uasm_l##lb)(struct uasm_label **lab, u32 *addr) \
{ \
- uasm_build_label(lab, addr, label##lb); \
+ ISAFUNC(uasm_build_label)(lab, addr, label##lb); \
}
/* convenience macros for instructions */
OpenPOWER on IntegriCloud