return "Loongson-baseline";
}
- return "mips64-baseline";
+ /* MIPS64 baseline. */
+ if (VEX_MIPS_COMP_ID(hwcaps) == VEX_PRID_COMP_MIPS) {
+ return "mips64-baseline";
+ }
+
+ return "Unsupported baseline";
}
static const HChar* show_hwcaps_tilegx ( UInt hwcaps )
#define VEX_PRID_IMP_34K 0x9500
#define VEX_PRID_IMP_74K 0x9700
+/*
+ * Instead of Company Options values, bits 31:24 will be packed with
+ * additional information, such as isa level and presence of FPU unit
+ * with 32 64-bit registers.
+ */
+#define VEX_MIPS_CPU_ISA_M32R1 0x01000000
+#define VEX_MIPS_CPU_ISA_M32R2 0x02000000
+#define VEX_MIPS_CPU_ISA_M64R1 0x04000000
+#define VEX_MIPS_CPU_ISA_M64R2 0x08000000
+#define VEX_MIPS_CPU_ISA_M32R6 0x10000000
+#define VEX_MIPS_CPU_ISA_M64R6 0x20000000
/* CPU has FPU and 32 dbl. prec. FP registers */
-#define VEX_PRID_CPU_32FPR 0x00000040
-
+#define VEX_MIPS_CPU_32FPR 0x40000000
+/* Get MIPS Extended Information */
+#define VEX_MIPS_EX_INFO(x) ((x) & 0xFF000000)
/* Get MIPS Company ID from HWCAPS */
#define VEX_MIPS_COMP_ID(x) ((x) & 0x00FF0000)
/* Get MIPS Processor ID from HWCAPS */
#define VEX_MIPS_PROC_ID(x) ((x) & 0x0000FF00)
/* Get MIPS Revision from HWCAPS */
#define VEX_MIPS_REV(x) ((x) & 0x000000FF)
+/* Check if the processor has 32 64-bit FP registers */
+#define VEX_MIPS_HAS_32_64BIT_FPRS(x) (VEX_MIPS_EX_INFO(x) | VEX_MIPS_CPU_32FPR)
+/* Check if the processor supports MIPS32R2. */
+#define VEX_MIPS_CPU_HAS_MIPS32R2(x) (VEX_MIPS_EX_INFO(x) | \
+ VEX_MIPS_CPU_ISA_M32R2)
/* Check if the processor supports DSP ASE Rev 2. */
#define VEX_MIPS_PROC_DSP2(x) ((VEX_MIPS_COMP_ID(x) == VEX_PRID_COMP_MIPS) && \
(VEX_MIPS_PROC_ID(x) == VEX_PRID_IMP_74K))