aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2014-04-08 07:47:04 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-05-30 08:53:05 -0400
commitbef581ba1c240cda9c550d314ca70c2b8deb6e87 (patch)
tree36b983bfa294d2e6464c908109a09c9d1b7110d3
parent7aa86e5155a3c6b61c28bc37fdc4b7b25adae189 (diff)
MIPS: uasm: Add sllv uasm instruction
It will be used later on by bpf-jit [ralf@linux-mips.org: Fixed conflict with 49e9529b9d43773307b8c73bd251b71784830c3d [MIPS: uasm: add jalr instruction]. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/6725/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/include/asm/uasm.h1
-rw-r--r--arch/mips/include/uapi/asm/inst.h1
-rw-r--r--arch/mips/mm/uasm-micromips.c1
-rw-r--r--arch/mips/mm/uasm-mips.c1
-rw-r--r--arch/mips/mm/uasm.c7
5 files changed, 8 insertions, 3 deletions
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h
index fd9e50ae81c9..3001b1868a45 100644
--- a/arch/mips/include/asm/uasm.h
+++ b/arch/mips/include/asm/uasm.h
@@ -140,6 +140,7 @@ Ip_u2s3u1(_sc);
140Ip_u2s3u1(_scd); 140Ip_u2s3u1(_scd);
141Ip_u2s3u1(_sd); 141Ip_u2s3u1(_sd);
142Ip_u2u1u3(_sll); 142Ip_u2u1u3(_sll);
143Ip_u3u2u1(_sllv);
143Ip_u2u1u3(_sra); 144Ip_u2u1u3(_sra);
144Ip_u2u1u3(_srl); 145Ip_u2u1u3(_srl);
145Ip_u3u1u2(_subu); 146Ip_u3u1u2(_subu);
diff --git a/arch/mips/include/uapi/asm/inst.h b/arch/mips/include/uapi/asm/inst.h
index a1ad5516ad1f..217d696bd1d3 100644
--- a/arch/mips/include/uapi/asm/inst.h
+++ b/arch/mips/include/uapi/asm/inst.h
@@ -248,6 +248,7 @@ enum mm_32i_minor_op {
248enum mm_32a_minor_op { 248enum mm_32a_minor_op {
249 mm_sll32_op = 0x000, 249 mm_sll32_op = 0x000,
250 mm_ins_op = 0x00c, 250 mm_ins_op = 0x00c,
251 mm_sllv32_op = 0x010,
251 mm_ext_op = 0x02c, 252 mm_ext_op = 0x02c,
252 mm_pool32axf_op = 0x03c, 253 mm_pool32axf_op = 0x03c,
253 mm_srl32_op = 0x040, 254 mm_srl32_op = 0x040,
diff --git a/arch/mips/mm/uasm-micromips.c b/arch/mips/mm/uasm-micromips.c
index bcbcf4ae69b7..e0a8df070e4b 100644
--- a/arch/mips/mm/uasm-micromips.c
+++ b/arch/mips/mm/uasm-micromips.c
@@ -94,6 +94,7 @@ static struct insn insn_table_MM[] = {
94 { insn_scd, 0, 0 }, 94 { insn_scd, 0, 0 },
95 { insn_sd, 0, 0 }, 95 { insn_sd, 0, 0 },
96 { insn_sll, M(mm_pool32a_op, 0, 0, 0, 0, mm_sll32_op), RT | RS | RD }, 96 { insn_sll, M(mm_pool32a_op, 0, 0, 0, 0, mm_sll32_op), RT | RS | RD },
97 { insn_sllv, M(mm_pool32a_op, 0, 0, 0, 0, mm_sllv32_op), RT | RS | RD },
97 { insn_sra, M(mm_pool32a_op, 0, 0, 0, 0, mm_sra_op), RT | RS | RD }, 98 { insn_sra, M(mm_pool32a_op, 0, 0, 0, 0, mm_sra_op), RT | RS | RD },
98 { insn_srl, M(mm_pool32a_op, 0, 0, 0, 0, mm_srl32_op), RT | RS | RD }, 99 { insn_srl, M(mm_pool32a_op, 0, 0, 0, 0, mm_srl32_op), RT | RS | RD },
99 { insn_rotr, M(mm_pool32a_op, 0, 0, 0, 0, mm_rotr_op), RT | RS | RD }, 100 { insn_rotr, M(mm_pool32a_op, 0, 0, 0, 0, mm_rotr_op), RT | RS | RD },
diff --git a/arch/mips/mm/uasm-mips.c b/arch/mips/mm/uasm-mips.c
index 4a2fc82fcd4f..086c590c9997 100644
--- a/arch/mips/mm/uasm-mips.c
+++ b/arch/mips/mm/uasm-mips.c
@@ -103,6 +103,7 @@ static struct insn insn_table[] = {
103 { insn_sc, M(sc_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, 103 { insn_sc, M(sc_op, 0, 0, 0, 0, 0), RS | RT | SIMM },
104 { insn_sd, M(sd_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, 104 { insn_sd, M(sd_op, 0, 0, 0, 0, 0), RS | RT | SIMM },
105 { insn_sll, M(spec_op, 0, 0, 0, 0, sll_op), RT | RD | RE }, 105 { insn_sll, M(spec_op, 0, 0, 0, 0, sll_op), RT | RD | RE },
106 { insn_sllv, M(spec_op, 0, 0, 0, 0, sllv_op), RS | RT | RD },
106 { insn_sra, M(spec_op, 0, 0, 0, 0, sra_op), RT | RD | RE }, 107 { insn_sra, M(spec_op, 0, 0, 0, 0, sra_op), RT | RD | RE },
107 { insn_srl, M(spec_op, 0, 0, 0, 0, srl_op), RT | RD | RE }, 108 { insn_srl, M(spec_op, 0, 0, 0, 0, srl_op), RT | RD | RE },
108 { insn_subu, M(spec_op, 0, 0, 0, 0, subu_op), RS | RT | RD }, 109 { insn_subu, M(spec_op, 0, 0, 0, 0, subu_op), RS | RT | RD },
diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c
index 0969a52384b4..9372d8296ced 100644
--- a/arch/mips/mm/uasm.c
+++ b/arch/mips/mm/uasm.c
@@ -52,9 +52,9 @@ enum opcode {
52 insn_ext, insn_ins, insn_j, insn_jal, insn_jalr, insn_jr, insn_ld, 52 insn_ext, insn_ins, insn_j, insn_jal, insn_jalr, insn_jr, insn_ld,
53 insn_ldx, insn_ll, insn_lld, insn_lui, insn_lw, insn_lwx, insn_mfc0, 53 insn_ldx, insn_ll, insn_lld, insn_lui, insn_lw, insn_lwx, insn_mfc0,
54 insn_mtc0, insn_or, insn_ori, insn_pref, insn_rfe, insn_rotr, insn_sc, 54 insn_mtc0, insn_or, insn_ori, insn_pref, insn_rfe, insn_rotr, insn_sc,
55 insn_scd, insn_sd, insn_sll, insn_sra, insn_srl, insn_subu, insn_sw, 55 insn_scd, insn_sd, insn_sll, insn_sllv, insn_sra, insn_srl, insn_subu,
56 insn_sync, insn_syscall, insn_tlbp, insn_tlbr, insn_tlbwi, insn_tlbwr, 56 insn_sw, insn_sync, insn_syscall, insn_tlbp, insn_tlbr, insn_tlbwi,
57 insn_wait, insn_xor, insn_xori, insn_yield, 57 insn_tlbwr, insn_wait, insn_xor, insn_xori, insn_yield,
58}; 58};
59 59
60struct insn { 60struct insn {
@@ -280,6 +280,7 @@ I_u2s3u1(_sc)
280I_u2s3u1(_scd) 280I_u2s3u1(_scd)
281I_u2s3u1(_sd) 281I_u2s3u1(_sd)
282I_u2u1u3(_sll) 282I_u2u1u3(_sll)
283I_u3u2u1(_sllv)
283I_u2u1u3(_sra) 284I_u2u1u3(_sra)
284I_u2u1u3(_srl) 285I_u2u1u3(_srl)
285I_u2u1u3(_rotr) 286I_u2u1u3(_rotr)