- Timestamp:
- Sep 20, 2024 10:49:43 AM (2 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
r106105 r106111 427 427 428 428 ; 429 ;; [v]divpd 430 ; 431 EMIT_INSTR_PLUS_ICEBP divpd, XMM1, XMM2 432 EMIT_INSTR_PLUS_ICEBP divpd, XMM1, FSxBX 433 EMIT_INSTR_PLUS_ICEBP_C64 divpd, XMM8, XMM9 434 EMIT_INSTR_PLUS_ICEBP_C64 divpd, XMM8, FSxBX 435 436 EMIT_INSTR_PLUS_ICEBP vdivpd, XMM1, XMM2, XMM3 437 EMIT_INSTR_PLUS_ICEBP vdivpd, XMM1, XMM2, FSxBX 438 EMIT_INSTR_PLUS_ICEBP_C64 vdivpd, XMM8, XMM9, XMM10 439 EMIT_INSTR_PLUS_ICEBP_C64 vdivpd, XMM8, XMM9, FSxBX 440 441 EMIT_INSTR_PLUS_ICEBP vdivpd, YMM1, YMM2, YMM3 442 EMIT_INSTR_PLUS_ICEBP vdivpd, YMM1, YMM2, FSxBX 443 EMIT_INSTR_PLUS_ICEBP_C64 vdivpd, YMM8, YMM9, YMM10 444 EMIT_INSTR_PLUS_ICEBP_C64 vdivpd, YMM8, YMM9, FSxBX 445 446 ; 429 447 ;; [v]divss 430 448 ; -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-4.c32
r106110 r106111 8181 8181 8182 8182 /* 8183 * [V]DIVPD. 8184 */ 8185 BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_divpd(uint8_t bMode) 8186 { 8187 static BS3CPUINSTR4_TEST1_VALUES_PD_T const s_aValues[] = 8188 { 8189 /* 8190 * Zero. 8191 */ 8192 { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, 8193 { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, 8194 { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, 8195 /*mxcsr:in */ X86_MXCSR_XCPT_MASK, 8196 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, 8197 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, 8198 /*xcpt? */ false, false }, 8199 { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, 8200 { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, 8201 { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, 8202 /*mxcsr:in */ 0, 8203 /*128:out */ X86_MXCSR_IE, 8204 /*256:out */ X86_MXCSR_IE, 8205 /*xcpt? */ true, true }, 8206 { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, 8207 { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, 8208 { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, 8209 /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, 8210 /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, 8211 /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, 8212 /*xcpt? */ true, true }, 8213 { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, 8214 { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, 8215 { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, 8216 /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, 8217 /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, 8218 /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, 8219 /*xcpt? */ true, true }, 8220 { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, 8221 { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, 8222 { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, 8223 /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, 8224 /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, 8225 /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, 8226 /*xcpt? */ true, true }, 8227 { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, 8228 { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, 8229 { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, 8230 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, 8231 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, 8232 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, 8233 /*xcpt? */ false, false }, 8234 { { /*src2 */ { FP64_NORM_V0(0), FP64_NORM_V1(1), FP64_0(0), FP64_0(1) } }, 8235 { /*src1 */ { FP64_0(0), FP64_0(0), FP64_NORM_V2(1), FP64_NORM_V3(1) } }, 8236 { /* => */ { FP64_0(0), FP64_0(1), FP64_INF(1), FP64_INF(0) } }, 8237 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, 8238 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, 8239 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_ZE, 8240 /*xcpt? */ false, false }, 8241 /* 8242 * Infinity. 8243 */ 8244 /* 7*/{ { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, 8245 { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, 8246 { /* => */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_0(0) } }, 8247 /*mxcsr:in */ 0, 8248 /*128:out */ 0, 8249 /*256:out */ 0, 8250 /*xcpt? */ false, false }, 8251 { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(1) } }, 8252 { /*src1 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, 8253 { /* => */ { FP64_INF(0), FP64_INF(1), FP64_INF(1), FP64_INF(0) } }, 8254 /*mxcsr:in */ X86_MXCSR_XCPT_MASK, 8255 /*128:out */ X86_MXCSR_XCPT_MASK, 8256 /*256:out */ X86_MXCSR_XCPT_MASK, 8257 /*xcpt? */ false, false }, 8258 { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, 8259 { /*src1 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, 8260 { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, 8261 /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, 8262 /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, 8263 /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, 8264 /*xcpt? */ true, true }, 8265 { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, 8266 { /*src1 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, 8267 { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, 8268 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, 8269 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, 8270 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, 8271 /*xcpt? */ false, false }, 8272 { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_1(1), FP64_NORM_V1(1) } }, 8273 { /*src1 */ { FP64_1(0), FP64_NORM_V0(1), FP64_INF(0), FP64_INF(1) } }, 8274 { /* => */ { FP64_0(0), FP64_0(1), FP64_INF(1), FP64_INF(0) } }, 8275 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, 8276 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, 8277 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, 8278 /*xcpt? */ false, false }, 8279 { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_1(1), FP64_NORM_V2(1) } }, 8280 { /*src1 */ { FP64_1(0), FP64_NORM_V3(1), FP64_INF(0), FP64_INF(1) } }, 8281 { /* => */ { FP64_0(0), FP64_0(1), FP64_INF(1), FP64_INF(0) } }, 8282 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, 8283 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, 8284 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, 8285 /*xcpt? */ false, false }, 8286 /* 8287 * Normals. 8288 */ 8289 /*13*/{ { /*src2 */ { FP64_V(0, 0xe66f500000000, 0x40d)/*31131.828125*/, FP64_V(0, 0xaf00000000000, 0x406)/* 215.50*/, FP64_V(1, 0x107526e749f80, 0x42b)/*-18723145413791.50*/, FP64_V(0, 0x6fee0e4bd0000, 0x420)/* 12345678999.62500*/ } }, 8290 { /*src1 */ { FP64_V(0, 0xe66f500000000, 0x40d)/*31131.828125*/, FP64_V(0, 0xfb74e1d800000, 0x41a)/*266053390.75*/, FP64_V(0, 0x549270a11c760, 0x42c)/* 46807863534478.75*/, FP64_V(0, 0x3c30944926c00, 0x424)/*169753086244.84375*/ } }, 8291 { /* => */ { FP64_1(0), FP64_V(0, 0x2d69a80000000, 0x413)/* 1234586.50*/, FP64_V(1, 0x4000000000000, 0x400)/* -2.50*/, FP64_V(0, 0xb800000000000, 0x402)/* 13.75000*/ } }, 8292 /*mxcsr:in */ X86_MXCSR_XCPT_MASK, 8293 /*128:out */ X86_MXCSR_XCPT_MASK, 8294 /*256:out */ X86_MXCSR_XCPT_MASK, 8295 /*xcpt? */ false, false }, 8296 { { /*src2 */ { FP64_NORM_MAX(1), FP64_NORM_V3(1), FP64_1(0), FP64_1(1) } }, 8297 { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_V3(1), FP64_NORM_V1(0), FP64_NORM_MIN(0) } }, 8298 { /* => */ { FP64_1(1), FP64_1(0), FP64_NORM_V1(0), FP64_NORM_MIN(1) } }, 8299 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, 8300 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, 8301 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, 8302 /*xcpt? */ false, false }, 8303 { { /*src2 */ { FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_V(1, 0x68b83b1ed4000, 0x41e)/*-3025935759.4140625*/, FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646*/, FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/ } }, 8304 { /*src1 */ { FP64_V(0, 0x4da20a80c6990, 0x42e)/*183416666481484.50*/, FP64_V(0, 0x68b83b1ed4000, 0x41f)/* 6051871518.8281250*/, FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646*/, FP64_V(0, 0x4a6a82b05f744, 0x42f)/*363296296296308.25*/ } }, 8305 { /* => */ { FP64_V(0, 0x8000000000000, 0x3fe)/* 0.75*/, FP64_V(1, 0, 0x400)/* -2.0000000*/, FP64_1(0), FP64_V(0, 0x8000000000000, 0x400)/* 3.00*/ } }, 8306 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, 8307 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, 8308 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, 8309 /*xcpt? */ false, false }, 8310 { { /*src2 */ { FP64_1(0), FP64_1(0), FP64_NORM_SAFE_INT_MIN(0), FP64_1(0) } }, 8311 { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MIN(1) } }, 8312 { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_1(0), FP64_NORM_SAFE_INT_MIN(1) } }, 8313 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, 8314 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, 8315 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, 8316 /*xcpt? */ false, false }, 8317 { { /*src2 */ { FP64_NORM_V0(0), FP64_NORM_V1(1), FP64_NORM_V2(0), FP64_NORM_V3(1) } }, 8318 { /*src1 */ { FP64_NORM_V0(0), FP64_NORM_V1(0), FP64_NORM_V2(1), FP64_NORM_V3(0) } }, 8319 { /* => */ { FP64_1(0), FP64_1(1), FP64_1(1), FP64_1(1) } }, 8320 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, 8321 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, 8322 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, 8323 /*xcpt? */ false, false }, 8324 /** @todo More Normals. */ 8325 /* 8326 * Denormals. 8327 */ 8328 /*18*/{ { /*src2 */ { FP64_DENORM_MAX(1), FP64_DENORM_MIN(0), FP64_DENORM_MIN(1), FP64_DENORM_MAX(0),} }, 8329 { /*src1 */ { FP64_0(1), FP64_DENORM_MIN(1), FP64_0(0), FP64_DENORM_MAX(0),} }, 8330 { /* => */ { FP64_0(0), FP64_1(1), FP64_0(1), FP64_1(0) } }, 8331 /*mxcsr:in */ 0, 8332 /*128:out */ X86_MXCSR_DE, 8333 /*256:out */ X86_MXCSR_DE, 8334 /*xcpt? */ true, true }, 8335 { { /*src2 */ { FP64_1(0), FP64_1(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, 8336 { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, 8337 { /* => */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(0) } }, 8338 /*mxcsr:in */ X86_MXCSR_FZ, 8339 /*128:out */ X86_MXCSR_FZ, 8340 /*256:out */ X86_MXCSR_FZ | X86_MXCSR_DE, 8341 /*xcpt? */ false, true }, 8342 { { /*src2 */ { FP64_1(0), FP64_1(1), FP64_1(0), FP64_1(0) } }, 8343 { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, 8344 { /* => */ { FP64_0(0), FP64_0(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, 8345 /*mxcsr:in */ X86_MXCSR_FZ, 8346 /*128:out */ X86_MXCSR_FZ, 8347 /*256:out */ X86_MXCSR_FZ | X86_MXCSR_DE, 8348 /*xcpt? */ false, true }, 8349 { { /*src2 */ { FP64_1(0), FP64_1(1), FP64_1(0), FP64_1(0) } }, 8350 { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, 8351 { /* => */ { FP64_0(0), FP64_0(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, 8352 /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM | 0, 8353 /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | 0, 8354 /*256:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE, 8355 /*xcpt? */ false, false }, 8356 #ifdef TODO_X86_MXCSR_UE /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 256:out */ 8357 /*--/22*/{ { /*src2 */ { FP64_1(0), FP64_1(1), FP64_1(0), FP64_1(0) } }, 8358 { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, 8359 { /* => */ { FP64_0(0), FP64_0(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, 8360 /*mxcsr:in */ X86_MXCSR_DM | 0, 8361 /*128:out */ X86_MXCSR_DM | 0, 8362 /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE, 8363 /*xcpt? */ false, true }, 8364 #endif /* TODO_X86_MXCSR_UE */ 8365 /*22/23*/{ { /*src2 */ { FP64_1(0), FP64_1(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, 8366 { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_0(0), FP64_1(1) } }, 8367 { /* => */ { FP64_0(0), FP64_0(0), FP64_QNAN(1), FP64_INF(1) } }, 8368 /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, 8369 /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, 8370 /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_IE | X86_MXCSR_ZE, 8371 /*xcpt? */ false, true }, 8372 { { /*src2 */ { FP64_1(0), FP64_1(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0),} }, 8373 { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_1(0), FP64_1(0) } }, 8374 { /* => */ { FP64_0(0), FP64_0(0), FP64_INF(0), FP64_INF(0) } }, 8375 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, 8376 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, 8377 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_ZE, 8378 /*xcpt? */ false, false }, 8379 { { /*src2 */ { FP64_DENORM_MIN(1), FP64_DENORM_MIN(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1) } }, 8380 { /*src1 */ { FP64_1(0), FP64_1(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1) } }, 8381 { /* => */ { FP64_INF(1), FP64_INF(0), FP64_QNAN(1), FP64_QNAN(1) } }, 8382 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, 8383 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_ZE, 8384 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_ZE | X86_MXCSR_IE, 8385 /*xcpt? */ false, false }, 8386 { { /*src2 */ { FP64_1(0), FP64_NORM_V1(0), FP64_DENORM_MAX(0), FP64_1(0) } }, 8387 { /*src1 */ { FP64_NORM_V0(0), FP64_NORM_V1(0), FP64_0(0), FP64_DENORM_MAX(0) } }, 8388 { /* => */ { FP64_NORM_V0(0), FP64_1(0), FP64_0(0), FP64_0(0) } }, 8389 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, 8390 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, 8391 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_DE | X86_MXCSR_UE | X86_MXCSR_PE, 8392 /*xcpt? */ false, false }, 8393 { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, 8394 { /*src1 */ { FP64_0(0), FP64_0(0), FP64_INF(1), FP64_INF(0) } }, 8395 { /* => */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1), FP64_DENORM_MIN(1) } }, 8396 /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, 8397 /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE, 8398 /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE, 8399 /*xcpt? */ true, true }, 8400 { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, 8401 { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(0) } }, 8402 { /* => */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1), FP64_DENORM_MIN(1) } }, 8403 /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, 8404 /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE, 8405 /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE, 8406 /*xcpt? */ true, true }, 8407 /* 8408 * Overflow, Precision. 8409 */ 8410 /*28|29*/{ { /*src2 */ { FP64_NORM_V3(1), FP64_1(0), FP64_NORM_MAX(0), FP64_NORM_MAX(0) } }, 8411 { /*src1 */ { FP64_NORM_V3(1), FP64_1(0), FP64_NORM_MAX(0), FP64_INF(0) } }, 8412 { /* => */ { FP64_1(0), FP64_1(0), FP64_1(0), FP64_INF(0) } }, 8413 /*mxcsr:in */ X86_MXCSR_XCPT_MASK, 8414 /*128:out */ X86_MXCSR_XCPT_MASK, 8415 /*256:out */ X86_MXCSR_XCPT_MASK, 8416 /*xcpt? */ false, false }, 8417 { { /*src2 */ { FP64_NORM_V3(1), FP64_1(1), FP64_NORM_MIN(0), FP64_NORM_MIN(0) } }, 8418 { /*src1 */ { FP64_NORM_V3(0), FP64_1(1), FP64_NORM_MIN(1), FP64_NORM_MAX(0) } }, 8419 { /* => */ { FP64_1(1), FP64_1(0), FP64_1(1), FP64_INF(0) } }, 8420 /*mxcsr:in */ X86_MXCSR_XCPT_MASK, 8421 /*128:out */ X86_MXCSR_XCPT_MASK, 8422 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_OE | X86_MXCSR_PE, 8423 /*xcpt? */ false, false }, 8424 { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_V3(1), FP64_NORM_MAX(1) } }, 8425 { /*src1 */ { FP64_NORM_MAX(0), FP64_INF(0), FP64_NORM_V3(1), FP64_NORM_MIN(0) } }, 8426 { /* => */ { FP64_1(0), FP64_INF(0), FP64_1(0), FP64_0(1) } }, 8427 /*mxcsr:in */ X86_MXCSR_XCPT_MASK, 8428 /*128:out */ X86_MXCSR_XCPT_MASK, 8429 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_UE | X86_MXCSR_PE, 8430 /*xcpt? */ false, false }, 8431 { { /*src2 */ { FP64_NORM_V3(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_V(1, 0, 0x3fe)/*-0.5*/ } }, 8432 { /*src1 */ { FP64_NORM_V3(1), FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, 8433 { /* => */ { FP64_1(1), FP64_1(0), FP64_1(1), FP64_NORM_MAX(0) } }, 8434 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, 8435 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, 8436 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE, 8437 /*xcpt? */ false, false }, 8438 { { /*src2 */ { FP64_NORM_V3(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_V(1, 0, 0x3fe)/*-0.5*/ } }, 8439 { /*src1 */ { FP64_NORM_V3(1), FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, 8440 { /* => */ { FP64_1(1), FP64_1(0), FP64_1(1), FP64_NORM_MAX(0) } }, 8441 /*mxcsr:in */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, 8442 /*128:out */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, 8443 /*256:out */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE, 8444 /*xcpt? */ false, true }, 8445 { { /*src2 */ { FP64_NORM_V3(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_V(1, 0, 0x3fe)/*-0.5*/ } }, 8446 { /*src1 */ { FP64_NORM_V3(1), FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, 8447 { /* => */ { FP64_1(1), FP64_1(0), FP64_1(1), FP64_NORM_MAX(0) } }, 8448 /*mxcsr:in */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ, 8449 /*128:out */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ, 8450 /*256:out */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ | X86_MXCSR_OE, 8451 /*xcpt? */ false, true }, 8452 { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MIN(1), FP64_NORM_MAX(0) } }, 8453 { /*src1 */ { FP64_INF(0), FP64_0(0), FP64_V(0, FP64_FRAC_NORM_MAX, RTFLOAT64U_EXP_BIAS + 1), FP64_INF(0) } }, 8454 { /* => */ { FP64_INF(0), FP64_0(1), FP64_NORM_MAX(1), FP64_INF(0) } }, 8455 /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM, 8456 /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM, 8457 /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM, 8458 /*xcpt? */ false, false }, 8459 { { /*src2 */ { FP64_NORM_V3(0), FP64_1(1), FP64_V(1, 0, 0x3fe)/*-0.5*/, FP64_NORM_MIN(0) } }, 8460 { /*src1 */ { FP64_NORM_V3(0), FP64_NORM_V2(0), FP64_NORM_MAX(0), FP64_V(1, FP64_FRAC_NORM_MAX, RTFLOAT64U_EXP_BIAS + 1) } }, 8461 { /* => */ { FP64_1(0), FP64_NORM_V2(1), FP64_NORM_MAX(1), FP64_NORM_MAX(1) } }, 8462 /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM) | X86_MXCSR_RC_ZERO, 8463 /*128:out */ X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM) | X86_MXCSR_RC_ZERO, 8464 /*256:out */ X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM) | X86_MXCSR_RC_ZERO | X86_MXCSR_OE, 8465 /*xcpt? */ false, true }, 8466 { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_MAX(0), FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MIN(0) } }, 8467 { /*src1 */ { FP64_V(0, FP64_FRAC_NORM_MAX, FP64_FRAC_BITS + 1), FP64_NORM_MAX(1), FP64_V(0, FP64_FRAC_NORM_MAX - 1, 0x468), FP64_V(0, FP64_FRAC_NORM_MAX, 0x035) } }, 8468 { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_1(1), FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_NORM_SAFE_INT_MAX(0) } }, 8469 /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, 8470 /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, 8471 /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_PE, 8472 /*xcpt? */ false, false }, 8473 { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_MAX(0), FP64_V(0, 0x8000000000000, 0x400)/*3.0*/, FP64_1(1) } }, 8474 { /*src1 */ { FP64_V(0, FP64_FRAC_NORM_MAX, FP64_FRAC_BITS + 1), FP64_INF(1), FP64_1(1), FP64_1(0) } }, 8475 { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_INF(1), FP64_V(1, 0x5555555555556, 0x3fd)/*1/3*/, FP64_1(1) } }, 8476 /*mxcsr:in */ X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, 8477 /*128:out */ X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, 8478 /*256:out */ X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_PE, 8479 /*xcpt? */ false, false }, 8480 /* 8481 * Invalids. 8482 */ 8483 /*38|39*/ FP64_TABLE_D1_PD_INVALIDS 8484 /** @todo Underflow, Precision; Rounding; FZ etc. */ 8485 }; 8486 8487 #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues 8488 static BS3CPUINSTR4_TEST1_T const s_aTests16[] = 8489 { 8490 { bs3CpuInstr4_divpd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, 8491 { bs3CpuInstr4_divpd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, 8492 8493 { bs3CpuInstr4_vdivpd_XMM1_XMM2_XMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, 8494 { bs3CpuInstr4_vdivpd_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, 8495 8496 { bs3CpuInstr4_vdivpd_YMM1_YMM2_YMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, 8497 { bs3CpuInstr4_vdivpd_YMM1_YMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, 8498 }; 8499 static BS3CPUINSTR4_TEST1_T const s_aTests32[] = 8500 { 8501 { bs3CpuInstr4_divpd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, 8502 { bs3CpuInstr4_divpd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, 8503 8504 { bs3CpuInstr4_vdivpd_XMM1_XMM2_XMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, 8505 { bs3CpuInstr4_vdivpd_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, 8506 8507 { bs3CpuInstr4_vdivpd_YMM1_YMM2_YMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, 8508 { bs3CpuInstr4_vdivpd_YMM1_YMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, 8509 }; 8510 static BS3CPUINSTR4_TEST1_T const s_aTests64[] = 8511 { 8512 { bs3CpuInstr4_divpd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, 8513 { bs3CpuInstr4_divpd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, 8514 8515 { bs3CpuInstr4_vdivpd_XMM1_XMM2_XMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, 8516 { bs3CpuInstr4_vdivpd_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, 8517 8518 { bs3CpuInstr4_vdivpd_YMM1_YMM2_YMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, 8519 { bs3CpuInstr4_vdivpd_YMM1_YMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, 8520 8521 { bs3CpuInstr4_divpd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE2, 8, 8, 9, PASS_s_aValues }, 8522 { bs3CpuInstr4_divpd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 8, 8, 255, PASS_s_aValues }, 8523 8524 { bs3CpuInstr4_vdivpd_XMM8_XMM9_XMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, 8525 { bs3CpuInstr4_vdivpd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, 8526 { bs3CpuInstr4_vdivpd_YMM8_YMM9_YMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, 8527 { bs3CpuInstr4_vdivpd_YMM8_YMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, 8528 }; 8529 #undef PASS_s_aValues 8530 8531 static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); 8532 unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); 8533 return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, 8534 g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); 8535 } 8536 8537 8538 /* 8183 8539 * [V]DIVSS. 8184 8540 */ … … 11259 11615 { "[v]mulsd", bs3CpuInstr4_v_mulsd, 0 }, 11260 11616 { "[v]divps", bs3CpuInstr4_v_divps, 0 }, 11617 { "[v]divpd", bs3CpuInstr4_v_divpd, 0 }, 11261 11618 { "[v]divss", bs3CpuInstr4_v_divss, 0 }, 11262 11619 { "[v]divsd", bs3CpuInstr4_v_divsd, 0 },
Note:
See TracChangeset
for help on using the changeset viewer.