aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/uasm.h4
-rw-r--r--arch/mips/mm/uasm.c22
2 files changed, 25 insertions, 1 deletions
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h
index 3964b2e6c7d6..db9d449b51e5 100644
--- a/arch/mips/include/asm/uasm.h
+++ b/arch/mips/include/asm/uasm.h
@@ -223,3 +223,7 @@ void uasm_il_bne(u32 **p, struct uasm_reloc **r, unsigned int reg1,
223void uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); 223void uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
224void uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); 224void uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
225void uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); 225void uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
226void uasm_il_bbit0(u32 **p, struct uasm_reloc **r, unsigned int reg,
227 unsigned int bit, int lid);
228void uasm_il_bbit1(u32 **p, struct uasm_reloc **r, unsigned int reg,
229 unsigned int bit, int lid);
diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c
index fe041d5bb41a..636b817d3905 100644
--- a/arch/mips/mm/uasm.c
+++ b/arch/mips/mm/uasm.c
@@ -68,7 +68,7 @@ enum opcode {
68 insn_pref, insn_rfe, insn_sc, insn_scd, insn_sd, insn_sll, 68 insn_pref, insn_rfe, insn_sc, insn_scd, insn_sd, insn_sll,
69 insn_sra, insn_srl, insn_rotr, insn_subu, insn_sw, insn_tlbp, 69 insn_sra, insn_srl, insn_rotr, insn_subu, insn_sw, insn_tlbp,
70 insn_tlbr, insn_tlbwi, insn_tlbwr, insn_xor, insn_xori, 70 insn_tlbr, insn_tlbwi, insn_tlbwr, insn_xor, insn_xori,
71 insn_dins, insn_syscall 71 insn_dins, insn_syscall, insn_bbit0, insn_bbit1
72}; 72};
73 73
74struct insn { 74struct insn {
@@ -143,6 +143,8 @@ static struct insn insn_table[] __cpuinitdata = {
143 { insn_xori, M(xori_op, 0, 0, 0, 0, 0), RS | RT | UIMM }, 143 { insn_xori, M(xori_op, 0, 0, 0, 0, 0), RS | RT | UIMM },
144 { insn_dins, M(spec3_op, 0, 0, 0, 0, dins_op), RS | RT | RD | RE }, 144 { insn_dins, M(spec3_op, 0, 0, 0, 0, dins_op), RS | RT | RD | RE },
145 { insn_syscall, M(spec_op, 0, 0, 0, 0, syscall_op), SCIMM}, 145 { insn_syscall, M(spec_op, 0, 0, 0, 0, syscall_op), SCIMM},
146 { insn_bbit0, M(lwc2_op, 0, 0, 0, 0, 0), RS | RT | BIMM },
147 { insn_bbit1, M(swc2_op, 0, 0, 0, 0, 0), RS | RT | BIMM },
146 { insn_invalid, 0, 0 } 148 { insn_invalid, 0, 0 }
147}; 149};
148 150
@@ -411,6 +413,8 @@ I_u3u1u2(_xor)
411I_u2u1u3(_xori) 413I_u2u1u3(_xori)
412I_u2u1msbu3(_dins); 414I_u2u1msbu3(_dins);
413I_u1(_syscall); 415I_u1(_syscall);
416I_u1u2s3(_bbit0);
417I_u1u2s3(_bbit1);
414 418
415/* Handle labels. */ 419/* Handle labels. */
416void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid) 420void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid)
@@ -620,3 +624,19 @@ uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid)
620 uasm_r_mips_pc16(r, *p, lid); 624 uasm_r_mips_pc16(r, *p, lid);
621 uasm_i_bgez(p, reg, 0); 625 uasm_i_bgez(p, reg, 0);
622} 626}
627
628void __cpuinit
629uasm_il_bbit0(u32 **p, struct uasm_reloc **r, unsigned int reg,
630 unsigned int bit, int lid)
631{
632 uasm_r_mips_pc16(r, *p, lid);
633 uasm_i_bbit0(p, reg, bit, 0);
634}
635
636void __cpuinit
637uasm_il_bbit1(u32 **p, struct uasm_reloc **r, unsigned int reg,
638 unsigned int bit, int lid)
639{
640 uasm_r_mips_pc16(r, *p, lid);
641 uasm_i_bbit1(p, reg, bit, 0);
642}