Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375203
b: refs/heads/master
c: cf6d905
h: refs/heads/master
i:
  375201: 28ff33d
  375199: f8b31db
v: v3
  • Loading branch information
Steven J. Hill authored and Ralf Baechle committed May 9, 2013
1 parent 77ee131 commit 556ec81
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8fe4bb98e42945ddf2c0d47cec647ef76909e812
refs/heads/master: cf6d905828c2c75ebe8c818901e71e09ffe6f629
18 changes: 16 additions & 2 deletions trunk/arch/mips/include/asm/uasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 */
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/mips/mm/uasm-mips.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <asm/inst.h>
#include <asm/elf.h>
#include <asm/bugs.h>
#define UASM_ISA _UASM_ISA_CLASSIC
#include <asm/uasm.h>

#define RS_MASK 0x1f
Expand All @@ -38,6 +39,14 @@
| (e) << RE_SH \
| (f) << FUNC_SH)

/* Define these when we are not the ISA the kernel is being compiled with. */
#ifdef CONFIG_CPU_MICROMIPS
#define CL_uasm_i_b(buf, off) ISAOPC(_beq)(buf, 0, 0, off)
#define CL_uasm_i_beqz(buf, rs, off) ISAOPC(_beq)(buf, rs, 0, off)
#define CL_uasm_i_beqzl(buf, rs, off) ISAOPC(_beql)(buf, rs, 0, off)
#define CL_uasm_i_bnez(buf, rs, off) ISAOPC(_bne)(buf, rs, 0, off)
#endif

#include "uasm.c"

static struct insn insn_table[] __uasminitdata = {
Expand Down

0 comments on commit 556ec81

Please sign in to comment.