Commit 6701ca2d authored by Leonid Yegoshin's avatar Leonid Yegoshin Committed by Ralf Baechle

MIPS: Declare MSA MI10 instruction formats

Declare a struct describing the MSA MI10 instruction format used for ld &
st instructions, for use by subsequent patches.
Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-kernel@vger.kernel.org
Cc: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/10571/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent b620c972
...@@ -26,7 +26,7 @@ enum major_op { ...@@ -26,7 +26,7 @@ enum major_op {
cop0_op, cop1_op, cop2_op, cop1x_op, cop0_op, cop1_op, cop2_op, cop1x_op,
beql_op, bnel_op, blezl_op, bgtzl_op, beql_op, bnel_op, blezl_op, bgtzl_op,
daddi_op, cbcond1_op = daddi_op, daddiu_op, ldl_op, ldr_op, daddi_op, cbcond1_op = daddi_op, daddiu_op, ldl_op, ldr_op,
spec2_op, jalx_op, mdmx_op, spec3_op, spec2_op, jalx_op, mdmx_op, msa_op = mdmx_op, spec3_op,
lb_op, lh_op, lwl_op, lw_op, lb_op, lh_op, lwl_op, lw_op,
lbu_op, lhu_op, lwr_op, lwu_op, lbu_op, lhu_op, lwr_op, lwu_op,
sb_op, sh_op, swl_op, sw_op, sb_op, sh_op, swl_op, sw_op,
...@@ -220,6 +220,24 @@ enum bshfl_func { ...@@ -220,6 +220,24 @@ enum bshfl_func {
seh_op = 0x18, seh_op = 0x18,
}; };
/*
* func field for MSA MI10 format.
*/
enum msa_mi10_func {
msa_ld_op = 8,
msa_st_op = 9,
};
/*
* MSA 2 bit format fields.
*/
enum msa_2b_fmt {
msa_fmt_b = 0,
msa_fmt_h = 1,
msa_fmt_w = 2,
msa_fmt_d = 3,
};
/* /*
* (microMIPS) Major opcodes. * (microMIPS) Major opcodes.
*/ */
...@@ -611,6 +629,16 @@ struct v_format { /* MDMX vector format */ ...@@ -611,6 +629,16 @@ struct v_format { /* MDMX vector format */
;))))))) ;)))))))
}; };
struct msa_mi10_format { /* MSA MI10 */
__BITFIELD_FIELD(unsigned int opcode : 6,
__BITFIELD_FIELD(signed int s10 : 10,
__BITFIELD_FIELD(unsigned int rs : 5,
__BITFIELD_FIELD(unsigned int wd : 5,
__BITFIELD_FIELD(unsigned int func : 4,
__BITFIELD_FIELD(unsigned int df : 2,
;))))))
};
struct spec3_format { /* SPEC3 */ struct spec3_format { /* SPEC3 */
__BITFIELD_FIELD(unsigned int opcode:6, __BITFIELD_FIELD(unsigned int opcode:6,
__BITFIELD_FIELD(unsigned int rs:5, __BITFIELD_FIELD(unsigned int rs:5,
...@@ -888,6 +916,7 @@ union mips_instruction { ...@@ -888,6 +916,7 @@ union mips_instruction {
struct p_format p_format; struct p_format p_format;
struct f_format f_format; struct f_format f_format;
struct ma_format ma_format; struct ma_format ma_format;
struct msa_mi10_format msa_mi10_format;
struct b_format b_format; struct b_format b_format;
struct ps_format ps_format; struct ps_format ps_format;
struct v_format v_format; struct v_format v_format;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment