aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/uasm-mips.c
diff options
context:
space:
mode:
authorSteven J. Hill <Steven.Hill@imgtec.com>2013-03-25 13:03:41 -0400
committerRalf Baechle <ralf@linux-mips.org>2013-05-09 11:55:18 -0400
commitcf6d905828c2c75ebe8c818901e71e09ffe6f629 (patch)
treed2656af812415c8d0cb63d0fb1ea45c12ec9c1ed /arch/mips/mm/uasm-mips.c
parent8fe4bb98e42945ddf2c0d47cec647ef76909e812 (diff)
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/mm/uasm-mips.c')
-rw-r--r--arch/mips/mm/uasm-mips.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/mips/mm/uasm-mips.c b/arch/mips/mm/uasm-mips.c
index e78e74dc3aea..5fcdd8fe3e83 100644
--- a/arch/mips/mm/uasm-mips.c
+++ b/arch/mips/mm/uasm-mips.c
@@ -20,6 +20,7 @@
20#include <asm/inst.h> 20#include <asm/inst.h>
21#include <asm/elf.h> 21#include <asm/elf.h>
22#include <asm/bugs.h> 22#include <asm/bugs.h>
23#define UASM_ISA _UASM_ISA_CLASSIC
23#include <asm/uasm.h> 24#include <asm/uasm.h>
24 25
25#define RS_MASK 0x1f 26#define RS_MASK 0x1f
@@ -38,6 +39,14 @@
38 | (e) << RE_SH \ 39 | (e) << RE_SH \
39 | (f) << FUNC_SH) 40 | (f) << FUNC_SH)
40 41
42/* Define these when we are not the ISA the kernel is being compiled with. */
43#ifdef CONFIG_CPU_MICROMIPS
44#define CL_uasm_i_b(buf, off) ISAOPC(_beq)(buf, 0, 0, off)
45#define CL_uasm_i_beqz(buf, rs, off) ISAOPC(_beq)(buf, rs, 0, off)
46#define CL_uasm_i_beqzl(buf, rs, off) ISAOPC(_beql)(buf, rs, 0, off)
47#define CL_uasm_i_bnez(buf, rs, off) ISAOPC(_bne)(buf, rs, 0, off)
48#endif
49
41#include "uasm.c" 50#include "uasm.c"
42 51
43static struct insn insn_table[] __uasminitdata = { 52static struct insn insn_table[] __uasminitdata = {