projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e8ef868
)
MIPS: uasm: Add wsbh uasm instruction
author
Markos Chandras
<markos.chandras@imgtec.com>
Tue, 8 Apr 2014 11:47:11 +0000
(12:47 +0100)
committer
Ralf Baechle
<ralf@linux-mips.org>
Fri, 30 May 2014 13:54:38 +0000
(15:54 +0200)
It will be used later on by bpf-jit
[ralf@linux-mips.org: Resolved conflict.]
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/6732/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/uasm.h
patch
|
blob
|
history
arch/mips/include/uapi/asm/inst.h
patch
|
blob
|
history
arch/mips/mm/uasm-micromips.c
patch
|
blob
|
history
arch/mips/mm/uasm-mips.c
patch
|
blob
|
history
arch/mips/mm/uasm.c
patch
|
blob
|
history
diff --git
a/arch/mips/include/asm/uasm.h
b/arch/mips/include/asm/uasm.h
index 090f7503e421c960ceeb97dc84438eeb7049585c..d754ddc496d04ff1a7e095cc0227c6f0ad315b31 100644
(file)
--- a/
arch/mips/include/asm/uasm.h
+++ b/
arch/mips/include/asm/uasm.h
@@
-157,6
+157,7
@@
Ip_0(_tlbr);
Ip_0(_tlbwi);
Ip_0(_tlbwr);
Ip_u1(_wait);
Ip_0(_tlbwi);
Ip_0(_tlbwr);
Ip_u1(_wait);
+Ip_u2u1(_wsbh);
Ip_u3u1u2(_xor);
Ip_u2u1u3(_xori);
Ip_u2u1(_yield);
Ip_u3u1u2(_xor);
Ip_u2u1u3(_xori);
Ip_u2u1(_yield);
diff --git
a/arch/mips/include/uapi/asm/inst.h
b/arch/mips/include/uapi/asm/inst.h
index c78d235f86ee47f7b84521277dc2963accd26098..aa37373bfd6443d15743859e81d35461ec3fee5a 100644
(file)
--- a/
arch/mips/include/uapi/asm/inst.h
+++ b/
arch/mips/include/uapi/asm/inst.h
@@
-205,6
+205,16
@@
enum lx_func {
lbx_op = 0x16,
};
lbx_op = 0x16,
};
+/*
+ * BSHFL opcodes
+ */
+enum bshfl_func {
+ wsbh_op = 0x2,
+ dshd_op = 0x5,
+ seb_op = 0x10,
+ seh_op = 0x18,
+};
+
/*
* (microMIPS) Major opcodes.
*/
/*
* (microMIPS) Major opcodes.
*/
@@
-258,6
+268,7
@@
enum mm_32a_minor_op {
mm_lwxs_op = 0x118,
mm_addu32_op = 0x150,
mm_subu32_op = 0x1d0,
mm_lwxs_op = 0x118,
mm_addu32_op = 0x150,
mm_subu32_op = 0x1d0,
+ mm_wsbh_op = 0x1ec,
mm_and_op = 0x250,
mm_or32_op = 0x290,
mm_xor32_op = 0x310,
mm_and_op = 0x250,
mm_or32_op = 0x290,
mm_xor32_op = 0x310,
diff --git
a/arch/mips/mm/uasm-micromips.c
b/arch/mips/mm/uasm-micromips.c
index 260ca1b265047e59d661a934225fa077da185899..071a4c1c2024b843816e5fe53517f4ba528c64f8 100644
(file)
--- a/
arch/mips/mm/uasm-micromips.c
+++ b/
arch/mips/mm/uasm-micromips.c
@@
-112,6
+112,7
@@
static struct insn insn_table_MM[] = {
{ insn_tlbwi, M(mm_pool32a_op, 0, 0, 0, mm_tlbwi_op, mm_pool32axf_op), 0 },
{ insn_tlbwr, M(mm_pool32a_op, 0, 0, 0, mm_tlbwr_op, mm_pool32axf_op), 0 },
{ insn_wait, M(mm_pool32a_op, 0, 0, 0, mm_wait_op, mm_pool32axf_op), SCIMM },
{ insn_tlbwi, M(mm_pool32a_op, 0, 0, 0, mm_tlbwi_op, mm_pool32axf_op), 0 },
{ insn_tlbwr, M(mm_pool32a_op, 0, 0, 0, mm_tlbwr_op, mm_pool32axf_op), 0 },
{ insn_wait, M(mm_pool32a_op, 0, 0, 0, mm_wait_op, mm_pool32axf_op), SCIMM },
+ { insn_wsbh, M(mm_pool32a_op, 0, 0, 0, mm_wsbh_op, mm_pool32axf_op), RT | RS },
{ insn_xor, M(mm_pool32a_op, 0, 0, 0, 0, mm_xor32_op), RT | RS | RD },
{ insn_xori, M(mm_xori32_op, 0, 0, 0, 0, 0), RT | RS | UIMM },
{ insn_dins, 0, 0 },
{ insn_xor, M(mm_pool32a_op, 0, 0, 0, 0, mm_xor32_op), RT | RS | RD },
{ insn_xori, M(mm_xori32_op, 0, 0, 0, 0, 0), RT | RS | UIMM },
{ insn_dins, 0, 0 },
diff --git
a/arch/mips/mm/uasm-mips.c
b/arch/mips/mm/uasm-mips.c
index ad1701c4727d3e0c4bbee702aab6d3c173384e62..c50d3b4b55a7cfc3b50223b5e1f09d994f2b38bc 100644
(file)
--- a/
arch/mips/mm/uasm-mips.c
+++ b/
arch/mips/mm/uasm-mips.c
@@
-120,6
+120,7
@@
static struct insn insn_table[] = {
{ insn_tlbwi, M(cop0_op, cop_op, 0, 0, 0, tlbwi_op), 0 },
{ insn_tlbwr, M(cop0_op, cop_op, 0, 0, 0, tlbwr_op), 0 },
{ insn_wait, M(cop0_op, cop_op, 0, 0, 0, wait_op), SCIMM },
{ insn_tlbwi, M(cop0_op, cop_op, 0, 0, 0, tlbwi_op), 0 },
{ insn_tlbwr, M(cop0_op, cop_op, 0, 0, 0, tlbwr_op), 0 },
{ insn_wait, M(cop0_op, cop_op, 0, 0, 0, wait_op), SCIMM },
+ { insn_wsbh, M(spec3_op, 0, 0, 0, wsbh_op, bshfl_op), RT | RD },
{ insn_xori, M(xori_op, 0, 0, 0, 0, 0), RS | RT | UIMM },
{ insn_xor, M(spec_op, 0, 0, 0, 0, xor_op), RS | RT | RD },
{ insn_yield, M(spec3_op, 0, 0, 0, 0, yield_op), RS | RD },
{ insn_xori, M(xori_op, 0, 0, 0, 0, 0), RS | RT | UIMM },
{ insn_xor, M(spec_op, 0, 0, 0, 0, xor_op), RS | RT | RD },
{ insn_yield, M(spec3_op, 0, 0, 0, 0, yield_op), RS | RD },
diff --git
a/arch/mips/mm/uasm.c
b/arch/mips/mm/uasm.c
index e0738fa514bc5857ba570619a3a69e677920778e..678e41a57892848809c3240439d3b414d5888866 100644
(file)
--- a/
arch/mips/mm/uasm.c
+++ b/
arch/mips/mm/uasm.c
@@
-55,7
+55,7
@@
enum opcode {
insn_rotr, insn_sc, insn_scd, insn_sd, insn_sll, insn_sllv, insn_sltiu,
insn_sltu, insn_sra, insn_srl, insn_srlv, insn_subu, insn_sw, insn_sync,
insn_syscall, insn_tlbp, insn_tlbr, insn_tlbwi, insn_tlbwr, insn_wait,
insn_rotr, insn_sc, insn_scd, insn_sd, insn_sll, insn_sllv, insn_sltiu,
insn_sltu, insn_sra, insn_srl, insn_srlv, insn_subu, insn_sw, insn_sync,
insn_syscall, insn_tlbp, insn_tlbr, insn_tlbwi, insn_tlbwr, insn_wait,
- insn_xor, insn_xori, insn_yield,
+ insn_
wsbh, insn_
xor, insn_xori, insn_yield,
};
struct insn {
};
struct insn {
@@
-298,6
+298,7
@@
I_0(_tlbr)
I_0(_tlbwi)
I_0(_tlbwr)
I_u1(_wait);
I_0(_tlbwi)
I_0(_tlbwr)
I_u1(_wait);
+I_u2u1(_wsbh)
I_u3u1u2(_xor)
I_u2u1u3(_xori)
I_u2u1(_yield)
I_u3u1u2(_xor)
I_u2u1u3(_xori)
I_u2u1(_yield)