aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2013-01-17 10:29:27 -0500
committerRalf Baechle <ralf@linux-mips.org>2013-02-01 04:00:21 -0500
commit8fba1e588b7ed124bef42548924a6f4f95de9dba (patch)
treeb35b4aad93984c8092e3d66537c1f83c414206ed /arch
parent85dfaf0831d292aa19fa3f230a73f3081d7d7067 (diff)
MIPS: inst.h: Add MDMX and paired single instruction aka MIPS-3D formats.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/uapi/asm/inst.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/mips/include/uapi/asm/inst.h b/arch/mips/include/uapi/asm/inst.h
index 9d8651a13acc..fb77a0e01cd7 100644
--- a/arch/mips/include/uapi/asm/inst.h
+++ b/arch/mips/include/uapi/asm/inst.h
@@ -290,6 +290,27 @@ struct b_format { /* BREAK and SYSCALL */
290 ;))) 290 ;)))
291}; 291};
292 292
293struct ps_format { /* MIPS-3D / paired single format */
294 BITFIELD_FIELD(unsigned int opcode : 6,
295 BITFIELD_FIELD(unsigned int rs : 5,
296 BITFIELD_FIELD(unsigned int ft : 5,
297 BITFIELD_FIELD(unsigned int fs : 5,
298 BITFIELD_FIELD(unsigned int fd : 5,
299 BITFIELD_FIELD(unsigned int func : 6,
300 ;))))))
301};
302
303struct v_format { /* MDMX vector format */
304 BITFIELD_FIELD(unsigned int opcode : 6,
305 BITFIELD_FIELD(unsigned int sel : 4,
306 BITFIELD_FIELD(unsigned int fmt : 1,
307 BITFIELD_FIELD(unsigned int vt : 5,
308 BITFIELD_FIELD(unsigned int vs : 5,
309 BITFIELD_FIELD(unsigned int vd : 5,
310 BITFIELD_FIELD(unsigned int func : 6,
311 ;)))))))
312};
313
293union mips_instruction { 314union mips_instruction {
294 unsigned int word; 315 unsigned int word;
295 unsigned short halfword[2]; 316 unsigned short halfword[2];
@@ -303,6 +324,8 @@ union mips_instruction {
303 struct f_format f_format; 324 struct f_format f_format;
304 struct ma_format ma_format; 325 struct ma_format ma_format;
305 struct b_format b_format; 326 struct b_format b_format;
327 struct ps_format ps_format;
328 struct v_format v_format;
306}; 329};
307 330
308#endif /* _UAPI_ASM_INST_H */ 331#endif /* _UAPI_ASM_INST_H */