aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2013-12-23 22:51:39 -0500
committerPaul Burton <paul.burton@imgtec.com>2014-05-28 11:20:25 -0400
commit8dee5901b20c5c95278aa3a462eb82826ff98b37 (patch)
tree730b16bd3a644db8117394c024c2783f8a042c1b /arch/mips
parentf263839ab59a7f4beb74fc9a7ce0234b62ab2b52 (diff)
MIPS: uasm: add a label variant of beq
This patch allows for use of the beq instruction with labels from uasm, much as bne & others already do. It will be used by a subsequent patch. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/uasm.h2
-rw-r--r--arch/mips/mm/uasm.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h
index c33a9564fb41..d1275a287770 100644
--- a/arch/mips/include/asm/uasm.h
+++ b/arch/mips/include/asm/uasm.h
@@ -264,6 +264,8 @@ void uasm_il_bbit0(u32 **p, struct uasm_reloc **r, unsigned int reg,
264 unsigned int bit, int lid); 264 unsigned int bit, int lid);
265void uasm_il_bbit1(u32 **p, struct uasm_reloc **r, unsigned int reg, 265void uasm_il_bbit1(u32 **p, struct uasm_reloc **r, unsigned int reg,
266 unsigned int bit, int lid); 266 unsigned int bit, int lid);
267void uasm_il_beq(u32 **p, struct uasm_reloc **r, unsigned int r1,
268 unsigned int r2, int lid);
267void uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); 269void uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
268void uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); 270void uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
269void uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); 271void uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c
index b9d14b6c7f58..ae18b823e414 100644
--- a/arch/mips/mm/uasm.c
+++ b/arch/mips/mm/uasm.c
@@ -469,6 +469,14 @@ void ISAFUNC(uasm_il_b)(u32 **p, struct uasm_reloc **r, int lid)
469} 469}
470UASM_EXPORT_SYMBOL(ISAFUNC(uasm_il_b)); 470UASM_EXPORT_SYMBOL(ISAFUNC(uasm_il_b));
471 471
472void ISAFUNC(uasm_il_beq)(u32 **p, struct uasm_reloc **r, unsigned int r1,
473 unsigned int r2, int lid)
474{
475 uasm_r_mips_pc16(r, *p, lid);
476 ISAFUNC(uasm_i_beq)(p, r1, r2, 0);
477}
478UASM_EXPORT_SYMBOL(ISAFUNC(uasm_il_beq));
479
472void ISAFUNC(uasm_il_beqz)(u32 **p, struct uasm_reloc **r, unsigned int reg, 480void ISAFUNC(uasm_il_beqz)(u32 **p, struct uasm_reloc **r, unsigned int reg,
473 int lid) 481 int lid)
474{ 482{