Changeset 104764 in vbox for trunk/src/VBox/ValidationKit/bootsectors
- Timestamp:
- May 23, 2024 8:01:39 AM (8 months ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-4-template.mac
r104736 r104764 158 158 EMIT_INSTR_PLUS_ICEBP_C64 addpd, XMM8, FSxBX 159 159 160 ; 161 ;; [v]addps 162 ; 163 EMIT_INSTR_PLUS_ICEBP addps, XMM1, XMM2 164 EMIT_INSTR_PLUS_ICEBP addps, XMM1, FSxBX 165 EMIT_INSTR_PLUS_ICEBP_C64 addps, XMM8, XMM9 166 EMIT_INSTR_PLUS_ICEBP_C64 addps, XMM8, FSxBX 167 160 168 %endif ; BS3_INSTANTIATING_CMN 161 169 -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-4.c32
r104763 r104764 55 55 /** Maximum length for the names of all SIMD FP exception flags combined. */ 56 56 #define BS3_FP_XCPT_NAMES_MAXLEN sizeof(" IE DE ZE OE UE PE ") 57 58 /* 59 * Single-precision (32 bits) floating-point defines. 60 */ 61 /** The max exponent value for a single-precision floating-point normal. */ 62 #define BS3_FP32_EXP_NORMAL_MAX 254 63 /** The min exponent value for a single-precision floating-point normal. */ 64 #define BS3_FP32_EXP_NORMAL_MIN 0 65 /** The max fraction value for a single-precision floating-point normal. */ 66 #define BS3_FP32_FRACTION_NORMAL_MAX 0x7fffff 67 /** The min fraction value for a single-precision floating-point normal. */ 68 #define BS3_FP32_FRACTION_NORMAL_MIN 0 69 70 #define BS3_FP32_NORMAL_MAX(a_Sign) RTFLOAT32U_INIT_C(a_Sign, BS3_FP32_FRACTION_NORMAL_MAX, BS3_FP32_EXP_NORMAL_MAX) 71 #define BS3_FP32_NORMAL_MIN(a_Sign) RTFLOAT32U_INIT_C(a_Sign, BS3_FP32_FRACTION_NORMAL_MIN, BS3_FP32_EXP_NORMAL_MIN) 72 #define BS3_FP32_ZERO(a_Sign) RTFLOAT32U_INIT_ZERO(a_Sign) 73 #define BS3_FP32_VAL(a_Sign, a_Frac, a_Exp) RTFLOAT32U_INIT_C(a_Sign, a_Frac, a_Exp) 74 #define BS3_FP32_INF(a_Sign) RTFLOAT32U_INIT_INF(a_Sign) 75 #define BS3_FP32_QNAN(a_Sign) RTFLOAT32U_INIT_QNAN(a_Sign) 76 #define BS3_FP32_SNAN(a_Sign) RTFLOAT32U_INIT_SNAN(a_Sign) 77 78 /* 79 * Single-precision floating normals. 80 * Fraction - 23 bits, all usable. 81 * Exponent - 8 bits, least significant bit MBZ. 82 */ 83 #define BS3_FP32_NORMAL_VAL_1(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x5fcabd, 0xbc) 84 #define BS3_FP32_NORMAL_VAL_2(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x7e117a, 0x7e) 85 #define BS3_FP32_NORMAL_VAL_3(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x5b5b5b, 0x9a) 86 87 /* 88 * Double-precision (64 bits) floating-point defines. 89 */ 57 90 /** The max exponent value for a double-precision floating-point normal. */ 58 91 #define BS3_FP64_EXP_NORMAL_MAX 2046 … … 73 106 74 107 /* 75 * 64-bitfloating normals.108 * Double-precision floating normals. 76 109 * Fraction - 52 bits, all usable. 77 110 * Exponent - 11 bits, least significant bit MBZ. … … 1200 1233 bs3CpuInstrXFreeExtCtxs(pExtCtx, pExtCtxOut); 1201 1234 return 0; 1235 } 1236 1237 1238 /* 1239 * [V]ADDPS. 1240 */ 1241 BS3_DECL_FAR(uint8_t) bs3CpuInstrX_v_addps(uint8_t bMode) 1242 { 1243 static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = 1244 { 1245 /* 0*/{ { /*src2 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1246 { /*src1 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1247 { /* => */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1248 /*mask */ X86_MXCSR_XCPT_MASK, 1249 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1250 /*flags */ 0 }, 1251 /* 1*/{ { /*src2 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1252 { /*src1 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1253 { /* => */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0) } }, 1254 /*mask */ ~X86_MXCSR_XCPT_MASK, 1255 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1256 /*flags */ 0 }, 1257 /* 2*/{ { /*src2 */ { BS3_FP32_INF(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0)} }, 1258 { /*src1 */ { BS3_FP32_INF(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0)} }, 1259 { /* => */ { BS3_FP32_INF(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0)} }, 1260 /*mask */ ~X86_MXCSR_IM, 1261 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1262 /*flags */ X86_MXCSR_IE }, 1263 /* 3*/{ { /*src2 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_INF(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0)} }, 1264 { /*src1 */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_INF(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0)} }, 1265 { /* => */ { BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_QNAN(1), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0), BS3_FP32_ZERO(0)} }, 1266 /*mask */ X86_MXCSR_XCPT_MASK, 1267 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1268 /*flags */ X86_MXCSR_IE }, 1269 }; 1270 1271 static BS3CPUINSTR4_TEST1_T const s_aTests16[] = 1272 { 1273 { bs3CpuInstrX_addps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues }, 1274 { bs3CpuInstrX_addps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues }, 1275 }; 1276 static BS3CPUINSTR4_TEST1_T const s_aTests32[] = 1277 { 1278 { bs3CpuInstrX_addps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues }, 1279 { bs3CpuInstrX_addps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues }, 1280 }; 1281 static BS3CPUINSTR4_TEST1_T const s_aTests64[] = 1282 { 1283 { bs3CpuInstrX_addps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues }, 1284 { bs3CpuInstrX_addps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues }, 1285 { bs3CpuInstrX_addps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues }, 1286 { bs3CpuInstrX_addps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 8, 8, 255, RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues }, 1287 }; 1288 1289 static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); 1290 unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); 1291 return bs3CpuInstrX_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, 1292 g_aXcptConfig1, RT_ELEMENTS(g_aXcptConfig1)); 1202 1293 } 1203 1294 … … 1316 1407 #endif 1317 1408 #if defined(ALL_TESTS) 1409 { "[v]addps", bs3CpuInstrX_v_addps, 0 }, 1318 1410 { "[v]addpd", bs3CpuInstrX_v_addpd, 0 }, 1319 1411 #endif
Note:
See TracChangeset
for help on using the changeset viewer.