Skip to content

Commit bef581b

Browse files
Markos Chandrasralfbaechle
authored andcommitted
MIPS: uasm: Add sllv uasm instruction
It will be used later on by bpf-jit [ralf@linux-mips.org: Fixed conflict with 49e9529 [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>
1 parent 7aa86e5 commit bef581b

5 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎arch/mips/include/asm/uasm.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ Ip_u2s3u1(_sc);
140140
Ip_u2s3u1(_scd);
141141
Ip_u2s3u1(_sd);
142142
Ip_u2u1u3(_sll);
143+
Ip_u3u2u1(_sllv);
143144
Ip_u2u1u3(_sra);
144145
Ip_u2u1u3(_srl);
145146
Ip_u3u1u2(_subu);

‎arch/mips/include/uapi/asm/inst.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ enum mm_32i_minor_op {
248248
enum mm_32a_minor_op {
249249
mm_sll32_op = 0x000,
250250
mm_ins_op = 0x00c,
251+
mm_sllv32_op = 0x010,
251252
mm_ext_op = 0x02c,
252253
mm_pool32axf_op = 0x03c,
253254
mm_srl32_op = 0x040,

‎arch/mips/mm/uasm-micromips.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ static struct insn insn_table_MM[] = {
9494
{ insn_scd, 0, 0 },
9595
{ insn_sd, 0, 0 },
9696
{ 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 },
9798
{ insn_sra, M(mm_pool32a_op, 0, 0, 0, 0, mm_sra_op), RT | RS | RD },
9899
{ insn_srl, M(mm_pool32a_op, 0, 0, 0, 0, mm_srl32_op), RT | RS | RD },
99100
{ insn_rotr, M(mm_pool32a_op, 0, 0, 0, 0, mm_rotr_op), RT | RS | RD },

‎arch/mips/mm/uasm-mips.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ static struct insn insn_table[] = {
103103
{ insn_sc, M(sc_op, 0, 0, 0, 0, 0), RS | RT | SIMM },
104104
{ insn_sd, M(sd_op, 0, 0, 0, 0, 0), RS | RT | SIMM },
105105
{ 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 },
106107
{ insn_sra, M(spec_op, 0, 0, 0, 0, sra_op), RT | RD | RE },
107108
{ insn_srl, M(spec_op, 0, 0, 0, 0, srl_op), RT | RD | RE },
108109
{ insn_subu, M(spec_op, 0, 0, 0, 0, subu_op), RS | RT | RD },

‎arch/mips/mm/uasm.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ enum opcode {
5252
insn_ext, insn_ins, insn_j, insn_jal, insn_jalr, insn_jr, insn_ld,
5353
insn_ldx, insn_ll, insn_lld, insn_lui, insn_lw, insn_lwx, insn_mfc0,
5454
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,
56-
insn_sync, insn_syscall, insn_tlbp, insn_tlbr, insn_tlbwi, insn_tlbwr,
57-
insn_wait, insn_xor, insn_xori, insn_yield,
55+
insn_scd, insn_sd, insn_sll, insn_sllv, insn_sra, insn_srl, insn_subu,
56+
insn_sw, insn_sync, insn_syscall, insn_tlbp, insn_tlbr, insn_tlbwi,
57+
insn_tlbwr, insn_wait, insn_xor, insn_xori, insn_yield,
5858
};
5959

6060
struct insn {
@@ -280,6 +280,7 @@ I_u2s3u1(_sc)
280280
I_u2s3u1(_scd)
281281
I_u2s3u1(_sd)
282282
I_u2u1u3(_sll)
283+
I_u3u2u1(_sllv)
283284
I_u2u1u3(_sra)
284285
I_u2u1u3(_srl)
285286
I_u2u1u3(_rotr)

0 commit comments

Comments
 (0)