Skip to content

Commit f31318f

Browse files
Markos Chandrasralfbaechle
authored andcommitted
MIPS: uasm: Add srlv uasm instruction
It will be used later on by bpf-jit [ralf@linux-mips.org: Fixed conflict due to other preceeding conflicts.] Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/6726/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent bef581b commit f31318f

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
@@ -143,6 +143,7 @@ Ip_u2u1u3(_sll);
143143
Ip_u3u2u1(_sllv);
144144
Ip_u2u1u3(_sra);
145145
Ip_u2u1u3(_srl);
146+
Ip_u3u2u1(_srlv);
146147
Ip_u3u1u2(_subu);
147148
Ip_u2s3u1(_sw);
148149
Ip_u1(_sync);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ enum mm_32a_minor_op {
253253
mm_pool32axf_op = 0x03c,
254254
mm_srl32_op = 0x040,
255255
mm_sra_op = 0x080,
256+
mm_srlv32_op = 0x090,
256257
mm_rotr_op = 0x0c0,
257258
mm_lwxs_op = 0x118,
258259
mm_addu32_op = 0x150,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ static struct insn insn_table_MM[] = {
9797
{ insn_sllv, M(mm_pool32a_op, 0, 0, 0, 0, mm_sllv32_op), RT | RS | RD },
9898
{ insn_sra, M(mm_pool32a_op, 0, 0, 0, 0, mm_sra_op), RT | RS | RD },
9999
{ insn_srl, M(mm_pool32a_op, 0, 0, 0, 0, mm_srl32_op), RT | RS | RD },
100+
{ insn_srlv, M(mm_pool32a_op, 0, 0, 0, 0, mm_srlv32_op), RT | RS | RD },
100101
{ insn_rotr, M(mm_pool32a_op, 0, 0, 0, 0, mm_rotr_op), RT | RS | RD },
101102
{ insn_subu, M(mm_pool32a_op, 0, 0, 0, 0, mm_subu32_op), RT | RS | RD },
102103
{ insn_sw, M(mm_sw32_op, 0, 0, 0, 0, 0), RT | RS | SIMM },

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ static struct insn insn_table[] = {
106106
{ insn_sllv, M(spec_op, 0, 0, 0, 0, sllv_op), RS | RT | RD },
107107
{ insn_sra, M(spec_op, 0, 0, 0, 0, sra_op), RT | RD | RE },
108108
{ insn_srl, M(spec_op, 0, 0, 0, 0, srl_op), RT | RD | RE },
109+
{ insn_srlv, M(spec_op, 0, 0, 0, 0, srlv_op), RS | RT | RD },
109110
{ insn_subu, M(spec_op, 0, 0, 0, 0, subu_op), RS | RT | RD },
110111
{ insn_sw, M(sw_op, 0, 0, 0, 0, 0), RS | RT | SIMM },
111112
{ insn_sync, M(spec_op, 0, 0, 0, 0, sync_op), RE },

‎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_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,
55+
insn_scd, insn_sd, insn_sll, insn_sllv, insn_sra, insn_srl, insn_srlv,
56+
insn_subu, insn_sw, insn_sync, insn_syscall, insn_tlbp, insn_tlbr,
57+
insn_tlbwi, insn_tlbwr, insn_wait, insn_xor, insn_xori, insn_yield,
5858
};
5959

6060
struct insn {
@@ -283,6 +283,7 @@ I_u2u1u3(_sll)
283283
I_u3u2u1(_sllv)
284284
I_u2u1u3(_sra)
285285
I_u2u1u3(_srl)
286+
I_u3u2u1(_srlv)
286287
I_u2u1u3(_rotr)
287288
I_u3u1u2(_subu)
288289
I_u2s3u1(_sw)

0 commit comments

Comments
 (0)