|
@@ -278,3 +278,94 @@ TABLE 5
|
|
|
#define URD_CODE 0x00e08000
|
|
|
#define NRM_CODE 0x00f08000
|
|
|
|
|
|
+/*
|
|
|
+===
|
|
|
+=== Definitions for register transfer and comparison instructions
|
|
|
+===
|
|
|
+*/
|
|
|
+
|
|
|
+#define MASK_CPRT 0x0e000010 /* register transfer opcode */
|
|
|
+#define MASK_CPRT_CODE 0x00f00000
|
|
|
+#define FLT_CODE 0x00000000
|
|
|
+#define FIX_CODE 0x00100000
|
|
|
+#define WFS_CODE 0x00200000
|
|
|
+#define RFS_CODE 0x00300000
|
|
|
+#define WFC_CODE 0x00400000
|
|
|
+#define RFC_CODE 0x00500000
|
|
|
+#define CMF_CODE 0x00900000
|
|
|
+#define CNF_CODE 0x00b00000
|
|
|
+#define CMFE_CODE 0x00d00000
|
|
|
+#define CNFE_CODE 0x00f00000
|
|
|
+
|
|
|
+/*
|
|
|
+===
|
|
|
+=== Common definitions
|
|
|
+===
|
|
|
+*/
|
|
|
+
|
|
|
+/* register masks */
|
|
|
+#define MASK_Rd 0x0000f000
|
|
|
+#define MASK_Rn 0x000f0000
|
|
|
+#define MASK_Fd 0x00007000
|
|
|
+#define MASK_Fm 0x00000007
|
|
|
+#define MASK_Fn 0x00070000
|
|
|
+
|
|
|
+/* condition code masks */
|
|
|
+#define CC_MASK 0xf0000000
|
|
|
+#define CC_NEGATIVE 0x80000000
|
|
|
+#define CC_ZERO 0x40000000
|
|
|
+#define CC_CARRY 0x20000000
|
|
|
+#define CC_OVERFLOW 0x10000000
|
|
|
+#define CC_EQ 0x00000000
|
|
|
+#define CC_NE 0x10000000
|
|
|
+#define CC_CS 0x20000000
|
|
|
+#define CC_HS CC_CS
|
|
|
+#define CC_CC 0x30000000
|
|
|
+#define CC_LO CC_CC
|
|
|
+#define CC_MI 0x40000000
|
|
|
+#define CC_PL 0x50000000
|
|
|
+#define CC_VS 0x60000000
|
|
|
+#define CC_VC 0x70000000
|
|
|
+#define CC_HI 0x80000000
|
|
|
+#define CC_LS 0x90000000
|
|
|
+#define CC_GE 0xa0000000
|
|
|
+#define CC_LT 0xb0000000
|
|
|
+#define CC_GT 0xc0000000
|
|
|
+#define CC_LE 0xd0000000
|
|
|
+#define CC_AL 0xe0000000
|
|
|
+#define CC_NV 0xf0000000
|
|
|
+
|
|
|
+/* rounding masks/values */
|
|
|
+#define MASK_ROUNDING_MODE 0x00000060
|
|
|
+#define ROUND_TO_NEAREST 0x00000000
|
|
|
+#define ROUND_TO_PLUS_INFINITY 0x00000020
|
|
|
+#define ROUND_TO_MINUS_INFINITY 0x00000040
|
|
|
+#define ROUND_TO_ZERO 0x00000060
|
|
|
+
|
|
|
+#define MASK_ROUNDING_PRECISION 0x00080080
|
|
|
+#define ROUND_SINGLE 0x00000000
|
|
|
+#define ROUND_DOUBLE 0x00000080
|
|
|
+#define ROUND_EXTENDED 0x00080000
|
|
|
+
|
|
|
+/* Get the condition code from the opcode. */
|
|
|
+#define getCondition(opcode) (opcode >> 28)
|
|
|
+
|
|
|
+/* Get the source register from the opcode. */
|
|
|
+#define getRn(opcode) ((opcode & MASK_Rn) >> 16)
|
|
|
+
|
|
|
+/* Get the destination floating point register from the opcode. */
|
|
|
+#define getFd(opcode) ((opcode & MASK_Fd) >> 12)
|
|
|
+
|
|
|
+/* Get the first source floating point register from the opcode. */
|
|
|
+#define getFn(opcode) ((opcode & MASK_Fn) >> 16)
|
|
|
+
|
|
|
+/* Get the second source floating point register from the opcode. */
|
|
|
+#define getFm(opcode) (opcode & MASK_Fm)
|
|
|
+
|
|
|
+/* Get the destination register from the opcode. */
|
|
|
+#define getRd(opcode) ((opcode & MASK_Rd) >> 12)
|
|
|
+
|
|
|
+/* Get the rounding mode from the opcode. */
|
|
|
+#define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5)
|
|
|
+
|
|
|
+#ifdef CONFIG_FPE_NWFPE_XP
|