/* $Id: bs3-cpu-instr-4.c32 106284 2024-10-10 10:30:19Z vboxsync $ */ /** @file * BS3Kit - bs3-cpu-instr-4 - SSE, AVX FPU instructions, C code template. */ /* * Copyright (C) 2024 Oracle and/or its affiliates. * * This file is part of VirtualBox base platform packages, as * available from https://www.virtualbox.org. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, in version 3 of the * License. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * * The contents of this file may alternatively be used under the terms * of the Common Development and Distribution License Version 1.0 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included * in the VirtualBox distribution, in which case the provisions of the * CDDL are applicable instead of those of the GPL. * * You may elect to license modified versions of this file under the * terms and conditions of either the GPL or the CDDL or both. * * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 */ /********************************************************************************************************************************* * Header Files * *********************************************************************************************************************************/ #include #include "bs3-cpu-instr-4-asm-auto.h" #include #include /********************************************************************************************************************************* * Defined Constants And Macros * *********************************************************************************************************************************/ /** Converts an execution mode (BS3_MODE_XXX) into an index into an array * initialized by BS3CPUINSTR4_TEST1_MODES_INIT etc. */ #define BS3CPUINSTR4_TEST_MODES_INDEX(a_bMode) (BS3_MODE_IS_16BIT_CODE(bMode) ? 0 : BS3_MODE_IS_32BIT_CODE(bMode) ? 1 : 2) /** Maximum length for the names of all SIMD FP exception flags combined. */ #define FP_XCPT_FLAGS_NAMES_MAXLEN sizeof(" IE DE ZE OE UE PE ") /** Maximum length for the names of all SIMD FP exception masks combined. */ #define FP_XCPT_MASKS_NAMES_MAXLEN sizeof(" IE DE ZE OE UE PE ") /** Maximum length for the names of all SIMD FP exception other bits combined. */ #define FP_XCPT_OTHERS_NAMES_MAXLEN sizeof(" DAZ FZ MM RC=NEAREST ") /* * Single-precision (32 bits) floating-point defines. */ /** The max exponent value for a single-precision floating-point normal. */ #define FP32_EXP_NORM_MAX 254 /** The min exponent value for a single-precision floating-point normal. */ #define FP32_EXP_NORM_MIN 1 /** The max fraction value for a single-precision floating-point normal. */ #define FP32_FRAC_NORM_MAX 0x7fffff /** The min fraction value for a single-precision floating-point normal. */ #define FP32_FRAC_NORM_MIN 0 /** The exponent bias for the single-precision floating-point format. */ #define FP32_EXP_BIAS RTFLOAT32U_EXP_BIAS /** Fraction width (in bits) for the single-precision floating-point format. */ #define FP32_FRAC_BITS RTFLOAT32U_FRACTION_BITS /** The max exponent value for a single-precision floating-point integer without * losing precision. */ #define FP32_EXP_SAFE_INT_MAX FP32_EXP_BIAS + FP32_FRAC_BITS /** The min exponent value for a single-precision floating-point integer without * losing precision. */ #define FP32_EXP_SAFE_INT_MIN 1 /** The max fraction value for a single-precision floating-point denormal. */ #define FP32_FRAC_DENORM_MAX 0x7fffff /** The min fraction value for a single-precision floating-point denormal. */ #define FP32_FRAC_DENORM_MIN 1 /** The max fraction value for a single-precision floating-point signalling NAN. */ #define FP32_FRAC_SNAN_MAX 0x3fffff /** The min fraction value for a single-precision floating-point signalling NAN. */ #define FP32_FRAC_SNAN_MIN 1 /** The max fraction value for a single-precision floating-point quiet NAN. */ #define FP32_FRAC_QNAN_MAX 0x7fffff /** The min fraction value for a single-precision floating-point quiet NAN. */ #define FP32_FRAC_QNAN_MIN 0x400000 #define FP32_NORM_MAX(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_NORM_MAX, FP32_EXP_NORM_MAX) #define FP32_NORM_MIN(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_NORM_MIN, FP32_EXP_NORM_MIN) #define FP32_DENORM_MAX(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_DENORM_MAX, 0) #define FP32_DENORM_MIN(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_DENORM_MIN, 0) #define FP32_0(a_Sign) RTFLOAT32U_INIT_ZERO(a_Sign) #define FP32_1(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0, RTFLOAT32U_EXP_BIAS) #define FP32_2(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0, RTFLOAT32U_EXP_BIAS + 1) #define FP32_V(a_Sign, a_Frac, a_Exp) RTFLOAT32U_INIT_C(a_Sign, a_Frac, a_Exp) #define FP32_INF(a_Sign) RTFLOAT32U_INIT_INF(a_Sign) #define FP32_QNAN(a_Sign) RTFLOAT32U_INIT_QNAN(a_Sign) #define FP32_QNAN_V(a_Sign, a_Val) RTFLOAT32U_INIT_QNAN_EX(a_Sign, a_Val) #define FP32_QNAN_MAX(a_Sign) RTFLOAT32U_INIT_QNAN_EX(a_Sign, FP32_FRAC_QNAN_MAX) #define FP32_SNAN(a_Sign) RTFLOAT32U_INIT_SNAN(a_Sign) #define FP32_SNAN_V(a_Sign, a_Val) RTFLOAT32U_INIT_SNAN_EX(a_Sign, a_Val) #define FP32_SNAN_MAX(a_Sign) RTFLOAT32U_INIT_SNAN_EX(a_Sign, FP32_FRAC_SNAN_MAX) /** @todo Move this to iprt/types.h after renaming it to RTFLOAT32U_MAKE? */ #ifdef RT_BIG_ENDIAN # define FP32_MAKE(a_Sign, a_Frac, a_Exp) (((a_Exp) << 1) | ((a_Frac) << 9) | (a_Sign)) #else # define FP32_MAKE(a_Sign, a_Frac, a_Exp) (((a_Sign) << 31) | ((a_Exp) << 23) | (a_Frac)) #endif /* * Single-precision floating normals (non-zero, non-maximum) * Fraction - 23 bits, all usable. * Exponent - 8 bits (greater than 0 and less than 254) */ #define FP32_FRAC_V0 0x401ac0 #define FP32_FRAC_V1 0x5fcabd #define FP32_FRAC_V2 0x7e117a #define FP32_FRAC_V3 0x5b5b5b #define FP32_FRAC_V4 0x1e0f1f #define FP32_FRAC_V5 0x012345 #define FP32_FRAC_V6 0x330b3b #define FP32_FRAC_V7 0x7fffff #define FP32_EXP_V0 0x01 #define FP32_EXP_V1 0xaf #define FP32_EXP_V2 0x7d #define FP32_EXP_V3 0xfd #define FP32_EXP_V4 0xbc #define FP32_EXP_V5 0xd1 #define FP32_EXP_V6 0x3c #define FP32_EXP_V7 0x51 AssertCompile(FP32_EXP_V0 > 0 && FP32_EXP_V0 < FP32_EXP_NORM_MAX); AssertCompile(FP32_EXP_V1 > 0 && FP32_EXP_V1 < FP32_EXP_NORM_MAX); AssertCompile(FP32_EXP_V2 > 0 && FP32_EXP_V2 < FP32_EXP_NORM_MAX); AssertCompile(FP32_EXP_V3 > 0 && FP32_EXP_V3 < FP32_EXP_NORM_MAX); AssertCompile(FP32_EXP_V4 > 0 && FP32_EXP_V4 < FP32_EXP_NORM_MAX); AssertCompile(FP32_EXP_V5 > 0 && FP32_EXP_V5 < FP32_EXP_NORM_MAX); AssertCompile(FP32_EXP_V6 > 0 && FP32_EXP_V6 < FP32_EXP_NORM_MAX); AssertCompile(FP32_EXP_V7 > 0 && FP32_EXP_V7 < FP32_EXP_NORM_MAX); AssertCompile(FP32_FRAC_V0 <= FP32_FRAC_NORM_MAX); AssertCompile(FP32_FRAC_V1 <= FP32_FRAC_NORM_MAX); AssertCompile(FP32_FRAC_V2 <= FP32_FRAC_NORM_MAX); AssertCompile(FP32_FRAC_V3 <= FP32_FRAC_NORM_MAX); AssertCompile(FP32_FRAC_V4 <= FP32_FRAC_NORM_MAX); AssertCompile(FP32_FRAC_V5 <= FP32_FRAC_NORM_MAX); AssertCompile(FP32_FRAC_V6 <= FP32_FRAC_NORM_MAX); AssertCompile(FP32_FRAC_V7 <= FP32_FRAC_NORM_MAX); #define FP32_NORM_V0(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_V0, FP32_EXP_V0) #define FP32_NORM_V1(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_V1, FP32_EXP_V1) #define FP32_NORM_V2(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_V2, FP32_EXP_V2) #define FP32_NORM_V3(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_V3, FP32_EXP_V3) #define FP32_NORM_V4(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_V4, FP32_EXP_V4) #define FP32_NORM_V5(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_V5, FP32_EXP_V5) #define FP32_NORM_V6(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_V6, FP32_EXP_V6) #define FP32_NORM_V7(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_V7, FP32_EXP_V7) AssertCompile(FP32_MAKE(0, FP32_FRAC_V0, FP32_EXP_V0) != FP32_MAKE(0, 0, 0)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V1, FP32_EXP_V1) != FP32_MAKE(0, 0, 0)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V2, FP32_EXP_V2) != FP32_MAKE(0, 0, 0)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V3, FP32_EXP_V3) != FP32_MAKE(0, 0, 0)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V4, FP32_EXP_V4) != FP32_MAKE(0, 0, 0)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V5, FP32_EXP_V5) != FP32_MAKE(0, 0, 0)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V6, FP32_EXP_V6) != FP32_MAKE(0, 0, 0)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V7, FP32_EXP_V7) != FP32_MAKE(0, 0, 0)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V0, FP32_EXP_V0) != FP32_MAKE(0, 0, RTFLOAT32U_EXP_BIAS)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V1, FP32_EXP_V1) != FP32_MAKE(0, 0, RTFLOAT32U_EXP_BIAS)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V2, FP32_EXP_V2) != FP32_MAKE(0, 0, RTFLOAT32U_EXP_BIAS)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V3, FP32_EXP_V3) != FP32_MAKE(0, 0, RTFLOAT32U_EXP_BIAS)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V4, FP32_EXP_V4) != FP32_MAKE(0, 0, RTFLOAT32U_EXP_BIAS)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V5, FP32_EXP_V5) != FP32_MAKE(0, 0, RTFLOAT32U_EXP_BIAS)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V6, FP32_EXP_V6) != FP32_MAKE(0, 0, RTFLOAT32U_EXP_BIAS)); AssertCompile(FP32_MAKE(0, FP32_FRAC_V7, FP32_EXP_V7) != FP32_MAKE(0, 0, RTFLOAT32U_EXP_BIAS)); /* The maximum integer value (all 23 + 1 implied bit of the fraction part set) without losing precision. */ #define FP32_NORM_SAFE_INT_MAX(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_NORM_MAX, FP32_EXP_SAFE_INT_MAX) /* The minimum integer value without losing precision. */ #define FP32_NORM_SAFE_INT_MIN(a_Sign) RTFLOAT32U_INIT_C(a_Sign, FP32_FRAC_NORM_MIN, FP32_EXP_SAFE_INT_MIN) /* * Single-precision floating-point denormals. */ #define FP32_DENORM_V0(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x7fffff, 0) #define FP32_DENORM_V1(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x701010, 0) #define FP32_DENORM_V2(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x6fefbb, 0) #define FP32_DENORM_V3(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x5b5b2e, 0) #define FP32_DENORM_V4(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x10c01a, 0) #define FP32_DENORM_V5(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x000fff, 0) #define FP32_DENORM_V6(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x700b02, 0) #define FP32_DENORM_V7(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x000001, 0) /* * Single-precision floating-point invalids. * The range must be valid for both QNAN and SNANs (see compile time assertions below). */ #define FP32_FRAC_INV_V0 0x3fffff #define FP32_FRAC_INV_V1 0x21301c #define FP32_FRAC_INV_V2 0x3c0de0 #define FP32_FRAC_INV_V3 0x110110 #define FP32_FRAC_INV_V4 0x0f0f0f #define FP32_FRAC_INV_V5 0x10f0f0 #define FP32_FRAC_INV_V6 0x3ebebe #define FP32_FRAC_INV_V7 0x000001 AssertCompile(FP32_FRAC_INV_V0 <= FP32_FRAC_SNAN_MAX && FP32_FRAC_INV_V0 >= FP32_FRAC_SNAN_MIN); AssertCompile(FP32_FRAC_INV_V1 <= FP32_FRAC_SNAN_MAX && FP32_FRAC_INV_V1 >= FP32_FRAC_SNAN_MIN); AssertCompile(FP32_FRAC_INV_V2 <= FP32_FRAC_SNAN_MAX && FP32_FRAC_INV_V2 >= FP32_FRAC_SNAN_MIN); AssertCompile(FP32_FRAC_INV_V3 <= FP32_FRAC_SNAN_MAX && FP32_FRAC_INV_V3 >= FP32_FRAC_SNAN_MIN); AssertCompile(FP32_FRAC_INV_V4 <= FP32_FRAC_SNAN_MAX && FP32_FRAC_INV_V4 >= FP32_FRAC_SNAN_MIN); AssertCompile(FP32_FRAC_INV_V5 <= FP32_FRAC_SNAN_MAX && FP32_FRAC_INV_V5 >= FP32_FRAC_SNAN_MIN); AssertCompile(FP32_FRAC_INV_V6 <= FP32_FRAC_SNAN_MAX && FP32_FRAC_INV_V6 >= FP32_FRAC_SNAN_MIN); AssertCompile(FP32_FRAC_INV_V7 <= FP32_FRAC_SNAN_MAX && FP32_FRAC_INV_V7 >= FP32_FRAC_SNAN_MIN); /* Single-precision floating-point signalling NANs (SNAN). */ #define FP32_SNAN_V0(a_Sign) RTFLOAT32U_INIT_SNAN_EX(a_Sign, FP32_FRAC_INV_V0) #define FP32_SNAN_V1(a_Sign) RTFLOAT32U_INIT_SNAN_EX(a_Sign, FP32_FRAC_INV_V1) #define FP32_SNAN_V2(a_Sign) RTFLOAT32U_INIT_SNAN_EX(a_Sign, FP32_FRAC_INV_V2) #define FP32_SNAN_V3(a_Sign) RTFLOAT32U_INIT_SNAN_EX(a_Sign, FP32_FRAC_INV_V3) #define FP32_SNAN_V4(a_Sign) RTFLOAT32U_INIT_SNAN_EX(a_Sign, FP32_FRAC_INV_V4) #define FP32_SNAN_V5(a_Sign) RTFLOAT32U_INIT_SNAN_EX(a_Sign, FP32_FRAC_INV_V5) #define FP32_SNAN_V6(a_Sign) RTFLOAT32U_INIT_SNAN_EX(a_Sign, FP32_FRAC_INV_V6) #define FP32_SNAN_V7(a_Sign) RTFLOAT32U_INIT_SNAN_EX(a_Sign, FP32_FRAC_INV_V7) /* Single-precision floating-point quiet NANs (QNAN). */ #define FP32_QNAN_V0(a_Sign) RTFLOAT32U_INIT_QNAN_EX(a_Sign, FP32_FRAC_INV_V0) #define FP32_QNAN_V1(a_Sign) RTFLOAT32U_INIT_QNAN_EX(a_Sign, FP32_FRAC_INV_V1) #define FP32_QNAN_V2(a_Sign) RTFLOAT32U_INIT_QNAN_EX(a_Sign, FP32_FRAC_INV_V2) #define FP32_QNAN_V3(a_Sign) RTFLOAT32U_INIT_QNAN_EX(a_Sign, FP32_FRAC_INV_V3) #define FP32_QNAN_V4(a_Sign) RTFLOAT32U_INIT_QNAN_EX(a_Sign, FP32_FRAC_INV_V4) #define FP32_QNAN_V5(a_Sign) RTFLOAT32U_INIT_QNAN_EX(a_Sign, FP32_FRAC_INV_V5) #define FP32_QNAN_V6(a_Sign) RTFLOAT32U_INIT_QNAN_EX(a_Sign, FP32_FRAC_INV_V6) #define FP32_QNAN_V7(a_Sign) RTFLOAT32U_INIT_QNAN_EX(a_Sign, FP32_FRAC_INV_V7) /* * Single-precision random values (incl. potentially invalid values). * We don't care what the exact values are as these are meant to populate * unmodified parts of operands and be compared bitwise. */ #define FP32_RAND_V0(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x7bacda, 0x55) #define FP32_RAND_V1(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x7010f0, 0xc0) #define FP32_RAND_V2(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x4ffcbe, 0xf1) #define FP32_RAND_V3(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x2fd7c8, 0x1f) #define FP32_RAND_V4(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x5b5b5b, 0x09) #define FP32_RAND_V5(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x3d2d1d, 0x99) #define FP32_RAND_V6(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x123456, 0x5e) #define FP32_RAND_V7(a_Sign) RTFLOAT32U_INIT_C(a_Sign, 0x05432f, 0xd7) /* * Zeroes and a set of seven random single-precision floating-point values primarily * intended to be used for for unused arguments in scalar instructions. */ #define FP32_0_x7(a_Sign) FP32_0(a_Sign), FP32_0(a_Sign), FP32_0(a_Sign), \ FP32_0(a_Sign), FP32_0(a_Sign), FP32_0(a_Sign), \ FP32_0(a_Sign) #define FP32_RAND_x7_V0 FP32_RAND_V0(0), FP32_RAND_V1(1), FP32_RAND_V2(0), \ FP32_RAND_V3(0), FP32_NORM_V1(1), FP32_RAND_V5(1), \ FP32_RAND_V6(0) #define FP32_RAND_x7_V1 FP32_RAND_V7(0), FP32_RAND_V6(0), FP32_RAND_V5(1), \ FP32_RAND_V4(1), FP32_QNAN(0), FP32_RAND_V2(1), \ FP32_NORM_V0(1) #define FP32_RAND_x7_V2 FP32_RAND_V1(0), FP32_RAND_V7(1), FP32_RAND_V6(1), \ FP32_RAND_V2(1), FP32_RAND_V3(1), FP32_RAND_V4(0), \ FP32_INF(0) #define FP32_RAND_x7_V3 FP32_RAND_V6(1), FP32_QNAN(0), FP32_RAND_V2(1), \ FP32_1(1), FP32_RAND_V1(0), FP32_INF(1), \ FP32_RAND_V5(0) #define FP32_RAND_x7_V4 FP32_RAND_V4(1), FP32_RAND_V6(0), FP32_RAND_V0(0), \ FP32_RAND_V2(1), FP32_RAND_V1(0), FP32_1(1), \ FP32_SNAN_MAX(1) #define FP32_RAND_x7_V5 FP32_RAND_V5(1), FP32_RAND_V4(1), FP32_QNAN_MAX(1), \ FP32_QNAN_MAX(1), FP32_RAND_V1(0), FP32_RAND_V2(0), \ FP32_RAND_V6(0) #define FP32_RAND_x7_V6 FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V6(1), \ FP32_RAND_V2(0), FP32_QNAN(1), FP32_QNAN_V(1, 0), \ FP32_SNAN(1) #define FP32_RAND_x7_V7 FP32_RAND_V7(0), FP32_RAND_V1(1), FP32_RAND_V2(0), \ FP32_RAND_V6(1), FP32_QNAN_V(0, 1), FP32_RAND_V2(1), \ FP32_NORM_SAFE_INT_MAX(1) /* * Double-precision (64 bits) floating-point defines. */ /** The max exponent value for a double-precision floating-point normal. */ #define FP64_EXP_NORM_MAX 2046 /** The min exponent value for a double-precision floating-point normal. */ #define FP64_EXP_NORM_MIN 1 /** The max fraction value for a double-precision floating-point normal. */ #define FP64_FRAC_NORM_MAX 0xfffffffffffff /** The min fraction value for a double-precision floating-point normal. */ #define FP64_FRAC_NORM_MIN 0 /** The exponent bias for the double-precision floating-point format. */ #define FP64_EXP_BIAS RTFLOAT64U_EXP_BIAS /** Fraction width (in bits) for the double-precision floating-point format. */ #define FP64_FRAC_BITS RTFLOAT64U_FRACTION_BITS /** The max exponent value for a double-precision floating-point integer without * losing precision. */ #define FP64_EXP_SAFE_INT_MAX FP64_EXP_BIAS + FP64_FRAC_BITS /** The min exponent value for a double-precision floating-point integer without * losing precision. */ #define FP64_EXP_SAFE_INT_MIN 1 /** The max fraction value for a double-precision floating-point denormal. */ #define FP64_FRAC_DENORM_MAX 0xfffffffffffff /** The min fraction value for a double-precision floating-point denormal. */ #define FP64_FRAC_DENORM_MIN 1 /** The max fraction value for a single-precision floating-point signalling NAN. */ #define FP64_FRAC_SNAN_MAX 0x7ffffffffffff /** The min fraction value for a single-precision floating-point signalling NAN. */ #define FP64_FRAC_SNAN_MIN 1 /** The max fraction value for a single-precision floating-point quiet NAN. */ #define FP64_FRAC_QNAN_MAX 0xfffffffffffff /** The min fraction value for a single-precision floating-point quiet NAN. */ #define FP64_FRAC_QNAN_MIN 0x8000000000000 #define FP64_NORM_MAX(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_NORM_MAX, FP64_EXP_NORM_MAX) #define FP64_NORM_MIN(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_NORM_MIN, FP64_EXP_NORM_MIN) #define FP64_0(a_Sign) RTFLOAT64U_INIT_ZERO(a_Sign) #define FP64_1(a_Sign) RTFLOAT64U_INIT_C(a_Sign, 0, RTFLOAT64U_EXP_BIAS) #define FP64_2(a_Sign) RTFLOAT64U_INIT_C(a_Sign, 0, RTFLOAT64U_EXP_BIAS + 1) #define FP64_V(a_Sign, a_Frac, a_Exp) RTFLOAT64U_INIT_C(a_Sign, a_Frac, a_Exp) #define FP64_INF(a_Sign) RTFLOAT64U_INIT_INF(a_Sign) #define FP64_QNAN(a_Sign) RTFLOAT64U_INIT_QNAN(a_Sign) #define FP64_QNAN_V(a_Sign, a_Val) RTFLOAT64U_INIT_QNAN_EX(a_Sign, a_Val) #define FP64_QNAN_MAX(a_Sign) RTFLOAT64U_INIT_QNAN_EX(a_Sign, FP64_FRAC_QNAN_MAX) #define FP64_SNAN(a_Sign) RTFLOAT64U_INIT_SNAN(a_Sign) #define FP64_SNAN_V(a_Sign, a_Val) RTFLOAT64U_INIT_SNAN_EX(a_Sign, a_Val) #define FP64_SNAN_MAX(a_Sign) RTFLOAT64U_INIT_SNAN_EX(a_Sign, FP64_FRAC_SNAN_MAX) /** @todo Move this to iprt/types.h after renaming it to RTFLOAT64U_MAKE? */ #ifdef RT_BIG_ENDIAN # define FP64_MAKE(a_Sign, a_Frac, a_Exp) ((UINT64_C(a_Exp) << 1) | (UINT64_C(a_Frac) << 12) | UINT64_C(a_Sign)) #else # define FP64_MAKE(a_Sign, a_Frac, a_Exp) (((uint64_t)(a_Sign) << 63) | ((uint64_t)(a_Exp) << 52) | (uint64_t)(a_Frac)) #endif /* * Double-precision random values (incl. potentially invalid values). * We don't care what the exact values are as these are meant to populate * unmodified parts of operands and be compared bitwise. */ #define FP64_RAND_V0(a_Sign) RTFLOAT64U_INIT_C(a_Sign, 0xab07eb7bcebce, 0x777) #define FP64_RAND_V1(a_Sign) RTFLOAT64U_INIT_C(a_Sign, 0x2fa17e10b3c7c, 0x6b6) #define FP64_RAND_V2(a_Sign) RTFLOAT64U_INIT_C(a_Sign, 0xceb1703cbe310, 0x100) #define FP64_RAND_V3(a_Sign) RTFLOAT64U_INIT_C(a_Sign, 0x7134abcdef10f, 0x70f) /* * Double-precision floating-point normals (non-zero, non-maximum) * Fraction - 52 bits, all usable. * Exponent - 11 bits (greater than 0 and less than 2046) */ #define FP64_FRAC_V0 0xacc01adec0de5 #define FP64_FRAC_V1 0xf10a7ab1ec01a #define FP64_FRAC_V2 0xca5cadea1b1ed #define FP64_FRAC_V3 0xb5b5b5b5b5b5b #define FP64_EXP_V0 0x001 #define FP64_EXP_V1 0x62d #define FP64_EXP_V2 0x7fd #define FP64_EXP_V3 0x481 AssertCompile(FP64_EXP_V0 > 0 && FP64_EXP_V0 < FP64_EXP_NORM_MAX); AssertCompile(FP64_EXP_V1 > 0 && FP64_EXP_V1 < FP64_EXP_NORM_MAX); AssertCompile(FP64_EXP_V2 > 0 && FP64_EXP_V2 < FP64_EXP_NORM_MAX); AssertCompile(FP64_EXP_V3 > 0 && FP64_EXP_V3 < FP64_EXP_NORM_MAX); AssertCompile(FP64_FRAC_V0 < FP64_FRAC_NORM_MAX); AssertCompile(FP64_FRAC_V1 < FP64_FRAC_NORM_MAX); AssertCompile(FP64_FRAC_V2 < FP64_FRAC_NORM_MAX); AssertCompile(FP64_FRAC_V3 < FP64_FRAC_NORM_MAX); #define FP64_NORM_V0(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_V0, FP64_EXP_V0) #define FP64_NORM_V1(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_V1, FP64_EXP_V1) #define FP64_NORM_V2(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_V2, FP64_EXP_V2) #define FP64_NORM_V3(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_V3, FP64_EXP_V3) AssertCompile(FP64_MAKE(0, FP64_FRAC_V0, FP64_EXP_V0) != FP64_MAKE(0, 0, 0)); AssertCompile(FP64_MAKE(0, FP64_FRAC_V1, FP64_EXP_V1) != FP64_MAKE(0, 0, 0)); AssertCompile(FP64_MAKE(0, FP64_FRAC_V2, FP64_EXP_V2) != FP64_MAKE(0, 0, 0)); AssertCompile(FP64_MAKE(0, FP64_FRAC_V3, FP64_EXP_V3) != FP64_MAKE(0, 0, 0)); AssertCompile(FP64_MAKE(0, FP64_FRAC_V0, FP64_EXP_V0) != FP64_MAKE(0, 0, RTFLOAT64U_EXP_BIAS)); AssertCompile(FP64_MAKE(0, FP64_FRAC_V1, FP64_EXP_V1) != FP64_MAKE(0, 0, RTFLOAT64U_EXP_BIAS)); AssertCompile(FP64_MAKE(0, FP64_FRAC_V2, FP64_EXP_V2) != FP64_MAKE(0, 0, RTFLOAT64U_EXP_BIAS)); AssertCompile(FP64_MAKE(0, FP64_FRAC_V3, FP64_EXP_V3) != FP64_MAKE(0, 0, RTFLOAT64U_EXP_BIAS)); /* The maximum integer value (all 52 + 1 implied bit of the fraction part set) without losing precision. */ #define FP64_NORM_SAFE_INT_MAX(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_NORM_MAX, FP64_EXP_SAFE_INT_MAX) /* The minimum integer value without losing precision. */ #define FP64_NORM_SAFE_INT_MIN(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_NORM_MIN, FP64_EXP_SAFE_INT_MIN) /* * Double-precision floating-point denormals. */ /** The maximum denormal value. */ #define FP64_DENORM_MAX(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_DENORM_MAX, 0) /** The maximum denormal value. */ #define FP64_DENORM_MIN(a_Sign) RTFLOAT64U_INIT_C(a_Sign, FP64_FRAC_DENORM_MIN, 0) /* * Double-precision floating-point invalids. * The range must be valid for both QNAN and SNANs (see compile time assertions below). */ #define FP64_FRAC_INV_V0 0x7ffffffffffff #define FP64_FRAC_INV_V1 0x3ca5cadecab1e #define FP64_FRAC_INV_V2 0x10adedb0771e5 #define FP64_FRAC_INV_V3 0x0000000000001 AssertCompile(FP64_FRAC_INV_V0 < FP64_FRAC_QNAN_MIN && FP64_FRAC_INV_V0 >= FP64_FRAC_SNAN_MIN); AssertCompile(FP64_FRAC_INV_V1 < FP64_FRAC_QNAN_MIN && FP64_FRAC_INV_V1 >= FP64_FRAC_SNAN_MIN); AssertCompile(FP64_FRAC_INV_V2 < FP64_FRAC_QNAN_MIN && FP64_FRAC_INV_V2 >= FP64_FRAC_SNAN_MIN); AssertCompile(FP64_FRAC_INV_V3 < FP64_FRAC_QNAN_MIN && FP64_FRAC_INV_V3 >= FP64_FRAC_SNAN_MIN); /* Double-precision floating-point signalling NANs (SNAN). */ #define FP64_SNAN_V0(a_Sign) RTFLOAT64U_INIT_SNAN_EX(a_Sign, FP64_FRAC_INV_V0) #define FP64_SNAN_V1(a_Sign) RTFLOAT64U_INIT_SNAN_EX(a_Sign, FP64_FRAC_INV_V1) #define FP64_SNAN_V2(a_Sign) RTFLOAT64U_INIT_SNAN_EX(a_Sign, FP64_FRAC_INV_V2) #define FP64_SNAN_V3(a_Sign) RTFLOAT64U_INIT_SNAN_EX(a_Sign, FP64_FRAC_INV_V3) /* Double-precision floating-point quiet NANs (QNAN). */ #define FP64_QNAN_V0(a_Sign) RTFLOAT64U_INIT_QNAN_EX(a_Sign, FP64_FRAC_INV_V0) #define FP64_QNAN_V1(a_Sign) RTFLOAT64U_INIT_QNAN_EX(a_Sign, FP64_FRAC_INV_V1) #define FP64_QNAN_V2(a_Sign) RTFLOAT64U_INIT_QNAN_EX(a_Sign, FP64_FRAC_INV_V2) #define FP64_QNAN_V3(a_Sign) RTFLOAT64U_INIT_QNAN_EX(a_Sign, FP64_FRAC_INV_V3) /* * Utility defines for table construction. */ #define FP32_ROW_UNUSED FP32_1(0), FP32_1(0), FP32_1(0), FP32_1(0), FP32_1(0), FP32_1(0), FP32_1(0), FP32_1(0) #define FP64_ROW_UNUSED FP64_1(0), FP64_1(0), FP64_1(0), FP64_1(0) /********************************************************************************************************************************* * Structures and Typedefs * *********************************************************************************************************************************/ /** Instruction set type and operand width. */ typedef enum BS3CPUINSTRX_INSTRTYPE_T { T_INVALID, T_MMX, T_MMX_SSE, /**< MMX instruction, but require the SSE CPUID to work. */ T_MMX_SSE2, /**< MMX instruction, but require the SSE2 CPUID to work. */ T_MMX_SSSE3, /**< MMX instruction, but require the SSSE3 CPUID to work. */ T_AXMMX, T_AXMMX_OR_SSE, T_SSE, T_128BITS = T_SSE, T_SSE2, T_SSE3, T_SSSE3, T_SSE4_1, T_SSE4_2, T_SSE4A, T_PCLMUL, T_SHA, T_AVX_128, T_AVX2_128, T_AVX_PCLMUL, T_AVX_256, T_256BITS = T_AVX_256, T_AVX2_256, T_MAX } BS3CPUINSTRX_INSTRTYPE_T; /** Memory or register rm variant. */ enum { RM_REG = 0, RM_MEM, RM_MEM8, /**< Memory operand is 8 bytes. Hack for movss and similar. */ RM_MEM16, /**< Memory operand is 16 bytes. Hack for movss and similar. */ RM_MEM32, /**< Memory operand is 32 bytes. Hack for movss and similar. */ RM_MEM64 /**< Memory operand is 64 bytes. Hack for movss and similar. */ }; /** * Execution environment configuration. */ typedef struct BS3CPUINSTR4_CONFIG_T { uint16_t fCr0Mp : 1; uint16_t fCr0Em : 1; uint16_t fCr0Ts : 1; uint16_t fCr4OsFxSR : 1; uint16_t fCr4OsXSave : 1; uint16_t fCr4OsXmmExcpt : 1; uint16_t fXcr0Sse : 1; uint16_t fXcr0Avx : 1; uint16_t fAligned : 1; /**< Aligned mem operands. If 0, they will be misaligned and tests w/o mem operands skipped. */ uint16_t fAlignCheck : 1; uint16_t fMxCsrMM : 1; /**< AMD only */ uint8_t bXcptSse; uint8_t bXcptAvx; } BS3CPUINSTR4_CONFIG_T; /** Pointer to an execution environment configuration. */ typedef BS3CPUINSTR4_CONFIG_T const BS3_FAR *PCBS3CPUINSTR4_CONFIG_T; /** State saved by bs3CpuInstr4ConfigReconfigure. */ typedef struct BS3CPUINSTRX_CONFIG_SAVED_T { uint32_t uCr0; uint32_t uCr4; uint32_t uEfl; uint16_t uFcw; uint16_t uFsw; uint32_t uMxCsr; } BS3CPUINSTRX_CONFIG_SAVED_T; typedef BS3CPUINSTRX_CONFIG_SAVED_T BS3_FAR *PBS3CPUINSTRX_CONFIG_SAVED_T; typedef BS3CPUINSTRX_CONFIG_SAVED_T const BS3_FAR *PCBS3CPUINSTRX_CONFIG_SAVED_T; /** * YMM packed single-precision floating-point register. * @todo move to x86.h? */ typedef union X86YMMFLOATPSREG { /** Packed single-precision floating-point view. */ RTFLOAT32U ar32[8]; /** 256-bit integer view. */ RTUINT256U ymm; } X86YMMFLOATPSREG; # ifndef VBOX_FOR_DTRACE_LIB AssertCompileSize(X86YMMFLOATPSREG, 32); AssertCompileSize(X86YMMFLOATPSREG, sizeof(X86YMMREG)); # endif /** Pointer to a YMM packed single-precision floating-point register. */ typedef X86YMMFLOATPSREG BS3_FAR *PX86YMMFLOATPSREG; /** Pointer to a const YMM single-precision packed floating-point register. */ typedef X86YMMFLOATPSREG const BS3_FAR *PCX86YMMFLOATPSREG; /** * YMM packed double-precision floating-point register. * @todo move to x86.h? */ typedef union X86YMMFLOATPDREG { /** Packed double-precision floating-point view. */ RTFLOAT64U ar64[4]; /** 256-bit integer view. */ RTUINT256U ymm; } X86YMMFLOATPDREG; # ifndef VBOX_FOR_DTRACE_LIB AssertCompileSize(X86YMMFLOATPDREG, 32); AssertCompileSize(X86YMMFLOATPDREG, sizeof(X86YMMREG)); # endif /** Pointer to a YMM packed floating-point register. */ typedef X86YMMFLOATPDREG BS3_FAR *PX86YMMFLOATPDREG; /** Pointer to a const YMM packed floating-point register. */ typedef X86YMMFLOATPDREG const BS3_FAR *PCX86YMMFLOATPDREG; /** * YMM scalar single-precision floating-point register. * @todo move to x86.h? */ typedef union X86YMMFLOATSSREG { /** Scalar single-precision floating-point view. */ RTFLOAT32U ar32[8]; /** 256-bit integer view. */ RTUINT256U ymm; } X86YMMFLOATSSREG; # ifndef VBOX_FOR_DTRACE_LIB AssertCompileSize(X86YMMFLOATSSREG, 32); AssertCompileSize(X86YMMFLOATSSREG, sizeof(X86YMMREG)); # endif /** Pointer to a YMM scalar single-precision floating-point register. */ typedef X86YMMFLOATSSREG BS3_FAR *PX86YMMFLOATSSREG; /** Pointer to a const YMM scalar single-precision floating-point register. */ typedef X86YMMFLOATSSREG const BS3_FAR *PCX86YMMFLOATSSREG; /** * YMM scalar double-precision floating-point register. * @todo move to x86.h? */ typedef union X86YMMFLOATSDREG { /** Scalar double-precision floating-point view. */ RTFLOAT64U ar64[4]; /** 256-bit integer view. */ RTUINT256U ymm; } X86YMMFLOATSDREG; # ifndef VBOX_FOR_DTRACE_LIB AssertCompileSize(X86YMMFLOATSDREG, 32); AssertCompileSize(X86YMMFLOATSDREG, sizeof(X86YMMREG)); # endif /** Pointer to a YMM scalar double-precision floating-point register. */ typedef X86YMMFLOATSDREG BS3_FAR *PX86YMMFLOATSDREG; /** Pointer to a const YMM scalar double-precision floating-point register. */ typedef X86YMMFLOATSDREG const BS3_FAR *PCX86YMMFLOATSDREG; /** * YMM scalar quadruple-precision floating-point register. * @todo move to x86.h? */ typedef union X86YMMFLOATSQREG { /** Scalar quadruple-precision floating point view. */ RTFLOAT128U ar128[2]; /** 256-bit integer view. */ RTUINT256U ymm; } X86YMMFLOATSQREG; # ifndef VBOX_FOR_DTRACE_LIB AssertCompileSize(X86YMMFLOATSQREG, 32); AssertCompileSize(X86YMMFLOATSQREG, sizeof(X86YMMREG)); # endif /** Pointer to a YMM scalar quadruple-precision floating-point register. */ typedef X86YMMFLOATSQREG *PX86YMMFLOATSQREG; /** Pointer to a const YMM scalar quadruple-precision floating-point register. */ typedef X86YMMFLOATSQREG const *PCX86YMMFLOATSQREG; /********************************************************************************************************************************* * Global Variables * *********************************************************************************************************************************/ static bool g_afTypeSupports[T_MAX] = { false, false, false, false, false, false, false, false, false, false }; static bool g_fAmdMisalignedSse = false; static uint8_t g_enmExtCtxMethod = BS3EXTCTXMETHOD_INVALID; static bool g_fMxCsrDazSupported = false; /** Size of g_pbBuf - at least three pages. */ static uint32_t g_cbBuf; /** Buffer of g_cbBuf size. */ static uint8_t BS3_FAR *g_pbBuf; /** RW alias for the buffer memory at g_pbBuf. Set up by bs3CpuInstrXBufSetup. */ static uint8_t BS3_FAR *g_pbBufAlias; /** RW alias for the memory at g_pbBuf. */ static uint8_t BS3_FAR *g_pbBufAliasAlloc; /** Exception type \#2 test configurations (>=16 byte memory reference, unaligned). */ static const BS3CPUINSTR4_CONFIG_T g_aXcptConfig2[] = { /* * X87 SSE SSE SSE AVX SSE AVX AVX SSE AVX AMD/SSE <-- applies to * +AVX +AVX +AMD/SSE +AMD/SSE * CR0 CR0 CR0 CR4 CR4 CR4 XCR0 XCR0 MXCSR * MP, EM, TS, OSFXSR, OSXSAVE, OSXMMEXCPT SSE, AVX, fAligned, AC/AM, MM, bXcptSse, bXcptAvx */ { 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #0 */ { 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #1 */ { 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #2 */ { 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_UD, X86_XCPT_DB }, /* #3 */ { 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_NM, X86_XCPT_NM }, /* #4 */ { 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_UD, X86_XCPT_NM }, /* #5 */ { 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_UD, X86_XCPT_DB }, /* #6 */ { 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_UD }, /* #7 */ { 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, X86_XCPT_DB, X86_XCPT_UD }, /* #8 */ { 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, X86_XCPT_DB, X86_XCPT_UD }, /* #9 */ /* Memory misalignment and alignment checks: */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, X86_XCPT_GP, X86_XCPT_DB }, /* #10 */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, X86_XCPT_GP, X86_XCPT_DB }, /* #11 */ { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #12 */ /* AMD only: */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, X86_XCPT_DB, X86_XCPT_GP }, /* #13 */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, X86_XCPT_AC, X86_XCPT_GP }, /* #14 */ }; /** Exception type \#3 test configurations (< 16-byte memory argument). */ static const BS3CPUINSTR4_CONFIG_T g_aXcptConfig3[] = { /* * X87 SSE SSE SSE AVX SSE AVX AVX SSE AVX AMD/SSE <-- applies to * +AVX +AVX +AMD/SSE +AMD/SSE * CR0 CR0 CR0 CR4 CR4 CR4 XCR0 XCR0 MXCSR * MP, EM, TS, OSFXSR, OSXSAVE, OSXMMEXCPT SSE, AVX, fAligned, AC/AM, MM, bXcptSse, bXcptAvx */ { 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #0 */ { 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #1 */ { 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #2 */ { 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_UD, X86_XCPT_DB }, /* #3 */ { 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_NM, X86_XCPT_NM }, /* #4 */ { 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_UD, X86_XCPT_NM }, /* #5 */ { 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_UD, X86_XCPT_DB }, /* #6 */ { 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_UD }, /* #7 */ { 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, X86_XCPT_DB, X86_XCPT_UD }, /* #8 */ { 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, X86_XCPT_DB, X86_XCPT_UD }, /* #9 */ /* Memory misalignment and alignment checks: */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #10 */ /* [Avx]:DB */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, X86_XCPT_AC, X86_XCPT_AC }, /* #11 */ /* [Avx]:AC */ { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #12 */ /* AMD only: */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, X86_XCPT_DB, X86_XCPT_GP }, /* #13 */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, X86_XCPT_AC, X86_XCPT_GP }, /* #14 */ }; /** Exception type \#4 test configurations (>=16 byte memory arguments, no alignment, no floating-point exceptions). */ static const BS3CPUINSTR4_CONFIG_T g_aXcptConfig4[] = { /* * X87 SSE SSE SSE AVX SSE AVX AVX SSE AVX AMD/SSE <-- applies to * +AVX +AVX +AMD/SSE +AMD/SSE * CR0 CR0 CR0 CR4 CR4 CR4 XCR0 XCR0 MXCSR * MP, EM, TS, OSFXSR, OSXSAVE, OSXMMEXCPT SSE, AVX, fAligned, AC/AM, MM, bXcptSse, bXcptAvx */ { 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #0 */ { 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #1 */ { 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #2 */ { 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_UD, X86_XCPT_DB }, /* #3 */ { 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_NM, X86_XCPT_NM }, /* #4 */ { 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_UD, X86_XCPT_NM }, /* #5 */ { 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_UD, X86_XCPT_DB }, /* #6 */ { 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_UD }, /* #7 */ { 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, X86_XCPT_DB, X86_XCPT_UD }, /* #8 */ { 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, X86_XCPT_DB, X86_XCPT_UD }, /* #9 */ /* Memory misalignment and alignment checks: */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, X86_XCPT_GP, X86_XCPT_DB }, /* #10 */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, X86_XCPT_GP, X86_XCPT_DB }, /* #11 */ { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #12 */ /* AMD only: */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, X86_XCPT_DB, X86_XCPT_GP }, /* #13 */ { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, X86_XCPT_AC, X86_XCPT_GP }, /* #14 */ }; /** Exceptions type 5 (<16 byte memory arguments and not floating-point exceptions). */ static const BS3CPUINSTR4_CONFIG_T g_aXcptConfig5[] = { /* * X87 SSE SSE SSE AVX SSE AVX AVX SSE AVX AMD/SSE <-- applies to * +AVX +AVX +AMD/SSE +AMD/SSE * CR0 CR0 CR0 CR4 CR4 CR4 XCR0 XCR0 MXCSR * MP, EM, TS, OSFXSR, OSXSAVE, OSXMMEXCPT SSE, AVX, fAligned, AC/AM, MM, bXcptSse, bXcptAvx */ { 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #0 */ { 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #1 */ { 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #2 */ { 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_UD, X86_XCPT_DB }, /* #3 */ { 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_NM, X86_XCPT_NM }, /* #4 */ { 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_UD, X86_XCPT_NM }, /* #5 */ { 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, X86_XCPT_UD, X86_XCPT_DB }, /* #6 */ { 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, X86_XCPT_DB, X86_XCPT_UD }, /* #7 */ { 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, X86_XCPT_DB, X86_XCPT_UD }, /* #8 */ { 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, X86_XCPT_DB, X86_XCPT_UD }, /* #9 */ /* Memory misalignment and alignment checks: */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #10 */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, X86_XCPT_AC, X86_XCPT_AC }, /* #11 */ { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, X86_XCPT_DB, X86_XCPT_DB }, /* #12 */ /* AMD only: */ { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, X86_XCPT_DB, X86_XCPT_GP }, /* #13 */ { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, X86_XCPT_AC, X86_XCPT_GP }, /* #14 */ }; /** * Table D-1: Packed single-precision floating-point invalid values. * For instructions: addps, subps, mulps, divps, addsubps. **/ #define FP32_TABLE_D1_PS_INVALIDS \ /* 0*/{ { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK, \ /*256:out */ X86_MXCSR_XCPT_MASK }, \ { { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V2(0), FP32_SNAN_V6(0), FP32_SNAN_V2(0), FP32_SNAN_V1(0), FP32_SNAN_V4(0) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_V(0, 1), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V1(0), FP32_SNAN_V3(0), FP32_SNAN_V4(0), FP32_SNAN_V5(0), FP32_SNAN_V6(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V6(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V6(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0), FP32_SNAN_V7(0), FP32_SNAN_V1(0), FP32_SNAN_V6(0), FP32_SNAN_V1(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V4(0), FP32_SNAN_V3(0), FP32_SNAN_V5(0), FP32_SNAN_V3(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_MAX(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V5(0), FP32_QNAN_V3(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(1), FP32_NORM_V0(1), FP32_QNAN_V1(0), FP32_NORM_V3(0), FP32_QNAN_V3(1), FP32_NORM_V5(0), FP32_QNAN_V5(1) } }, \ { /*src1 */ { FP32_1(0), FP32_1(1), FP32_QNAN_V0(1), FP32_NORM_V2(1), FP32_QNAN_V2(0), FP32_NORM_V4(0), FP32_QNAN_V4(1), FP32_NORM_V6(1) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_MAX(1), FP32_QNAN_MAX(1), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(1), FP32_QNAN_V4(1), FP32_QNAN_V5(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK, \ /*256:out */ X86_MXCSR_XCPT_MASK }, \ { { /*src2 */ { FP32_SNAN(1), FP32_SNAN_MAX(1), FP32_NORM_V0(1), FP32_SNAN_V1(0), FP32_NORM_V3(0), FP32_SNAN_V3(1), FP32_NORM_V5(0), FP32_SNAN_V5(1) } }, \ { /*src1 */ { FP32_1(0), FP32_1(0), FP32_SNAN_V0(1), FP32_NORM_V2(1), FP32_SNAN_V2(1), FP32_NORM_V4(0), FP32_SNAN_V4(1), FP32_NORM_V6(1) } }, \ { /* => */ { FP32_QNAN_V(1, 1), FP32_QNAN_MAX(1), FP32_QNAN_V0(1), FP32_QNAN_V1(0), FP32_QNAN_V2(1), FP32_QNAN_V3(1), FP32_QNAN_V4(1), FP32_QNAN_V5(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, \ /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, \ /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, \ { { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V2(0), FP32_SNAN_V6(0), FP32_SNAN_V2(0), FP32_SNAN_V1(0), FP32_SNAN_V4(0) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_V(0, 1), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V1(0), FP32_SNAN_V3(0), FP32_SNAN_V4(0), FP32_SNAN_V5(0), FP32_SNAN_V6(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V6(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V6(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0), FP32_SNAN_V7(0), FP32_SNAN_V1(0), FP32_SNAN_V6(0), FP32_SNAN_V1(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V4(0), FP32_SNAN_V3(0), FP32_SNAN_V5(0), FP32_SNAN_V3(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_MAX(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V5(0), FP32_QNAN_V3(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_RC_UP, \ /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_RC_UP | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(1), FP32_NORM_V0(1), FP32_QNAN_V1(0), FP32_NORM_V3(0), FP32_QNAN_V3(1), FP32_NORM_V5(0), FP32_QNAN_V5(1) } }, \ { /*src1 */ { FP32_1(0), FP32_1(1), FP32_QNAN_V0(1), FP32_NORM_V2(1), FP32_QNAN_V2(0), FP32_NORM_V4(0), FP32_QNAN_V4(1), FP32_NORM_V6(1) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_MAX(1), FP32_QNAN_V0(1), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(1), FP32_QNAN_V4(1), FP32_QNAN_V5(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ 0, \ /*256:out */ 0 }, \ /*11*/{ { /*src2 */ { FP32_SNAN(1), FP32_SNAN_MAX(1), FP32_NORM_V0(1), FP32_SNAN_V1(0), FP32_NORM_V3(0), FP32_SNAN_V3(1), FP32_NORM_V5(0), FP32_SNAN_V5(1) } }, \ { /*src1 */ { FP32_1(0), FP32_1(0), FP32_SNAN_V0(1), FP32_NORM_V2(1), FP32_SNAN_V2(1), FP32_NORM_V4(0), FP32_SNAN_V4(1), FP32_NORM_V6(1) } }, \ { /* => */ { FP32_QNAN_V(1, 1), FP32_QNAN_MAX(1), FP32_QNAN_V0(1), FP32_QNAN_V1(0), FP32_QNAN_V2(1), FP32_QNAN_V3(1), FP32_QNAN_V4(1), FP32_QNAN_V5(1) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, \ /** * Table D-1: Packed double-precision floating-point invalid values. * For instructions: addpd, subpd, mulpd, divpd, addsubpd. **/ #define FP64_TABLE_D1_PD_INVALIDS \ /* 0*/{ { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK, \ /*256:out */ X86_MXCSR_XCPT_MASK }, \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_V1(0) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_QNAN_V(0, 1), FP64_QNAN_MAX(0), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V0(0), FP64_SNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V2(0), FP64_QNAN_V3(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V2(0), FP64_QNAN_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_V3(0), FP64_SNAN_V0(0) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_QNAN_MAX(0), FP64_QNAN_V3(0), FP64_QNAN_V0(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(1), FP64_NORM_V0(1), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_1(0), FP64_1(1), FP64_QNAN_V0(1), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(1), FP64_QNAN_V0(1), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK, \ /*256:out */ X86_MXCSR_XCPT_MASK }, \ { { /*src2 */ { FP64_SNAN(1), FP64_SNAN_MAX(1), FP64_NORM_V0(1), FP64_SNAN_V1(0) } }, \ { /*src1 */ { FP64_1(0), FP64_1(0), FP64_SNAN_V0(1), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN_V(1, 1), FP64_QNAN_MAX(1), FP64_QNAN_V0(1), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V2(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V3(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, \ /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, \ /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_V2(0) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_QNAN_V(0, 1), FP64_QNAN_MAX(0), FP64_QNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V3(0), FP64_QNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V3(0), FP64_QNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_V0(0), FP64_SNAN_V3(0) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_RC_UP, \ /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_RC_UP | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(1), FP64_NORM_V0(1), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_1(0), FP64_1(1), FP64_QNAN_V3(1), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(1), FP64_QNAN_V3(1), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_RC_DOWN, \ /*128:out */ X86_MXCSR_RC_DOWN, \ /*256:out */ X86_MXCSR_RC_DOWN }, \ /*11*/{ { /*src2 */ { FP64_SNAN(1), FP64_SNAN_MAX(1), FP64_NORM_V0(1), FP64_SNAN_V2(0) } }, \ { /*src1 */ { FP64_1(0), FP64_1(0), FP64_SNAN_V3(1), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN_V(1, 1), FP64_QNAN_MAX(1), FP64_QNAN_V3(1), FP64_QNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, \ /** * Table D-1: Scalar single-precision floating-point invalid values. * For instructions: addss, subss, mulss, divss. **/ #define FP32_TABLE_D1_SS_INVALIDS \ /* QNan, QNan */ \ /* 0*/{ { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ 0, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_QNAN_MAX(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0), FP32_QNAN_V1(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0), FP32_QNAN_V1(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ 0, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_QNAN_V1(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0) } }, \ { /*src1 */ { FP32_QNAN_V2(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0), FP32_QNAN_V1(0) } }, \ { /* => */ { FP32_QNAN_V2(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0), FP32_QNAN_V1(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ 0, \ /*256:out */ -1 }, \ /* QNan, SNan */ \ { { /*src2 */ { FP32_QNAN(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN_V2(0), FP32_SNAN_V6(0), FP32_SNAN_V2(0), FP32_SNAN_V1(0), FP32_SNAN_V4(0), FP32_SNAN_V1(0) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_SNAN_V2(0), FP32_SNAN_V6(0), FP32_SNAN_V2(0), FP32_SNAN_V1(0), FP32_SNAN_V4(0), FP32_QNAN_V1(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_QNAN_MAX(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V2(0), FP32_SNAN_V6(0), FP32_SNAN_V2(0), FP32_SNAN_V1(0), FP32_SNAN_V4(0) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V2(0), FP32_SNAN_V6(0), FP32_SNAN_V2(0), FP32_SNAN_V1(0), FP32_SNAN_V4(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_QNAN_V1(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_SNAN_V2(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ { /* => */ { FP32_QNAN_V2(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, QNan */ \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V1(0), FP32_SNAN_V3(0), FP32_SNAN_V4(0), FP32_SNAN_V5(0), FP32_SNAN_V6(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V6(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V6(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_SNAN_MAX(0), FP32_SNAN_MAX(0), FP32_SNAN_V1(0), FP32_SNAN_V1(0), FP32_SNAN_V3(0), FP32_SNAN_V4(0), FP32_SNAN_V5(0), FP32_SNAN_V6(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_V6(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_V6(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_RC_UP, \ /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_SNAN_V0(0), FP32_SNAN_MAX(0), FP32_SNAN_V1(0), FP32_SNAN_V1(0), FP32_SNAN_V3(0), FP32_SNAN_V4(0), FP32_SNAN_V5(0), FP32_SNAN_V6(0) } }, \ { /*src1 */ { FP32_QNAN_V6(0), FP32_QNAN(0), FP32_QNAN_V6(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0) } }, \ { /* => */ { FP32_QNAN_V6(0), FP32_QNAN(0), FP32_QNAN_V6(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, \ /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, SNan */ \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0), FP32_SNAN_V7(0), FP32_SNAN_V1(0), FP32_SNAN_V6(0), FP32_SNAN_V1(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V4(0), FP32_SNAN_V3(0), FP32_SNAN_V5(0), FP32_SNAN_V3(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_SNAN_MAX(0), FP32_SNAN_V4(0), FP32_SNAN_V3(0), FP32_SNAN_V5(0), FP32_SNAN_V3(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN_V2(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0), FP32_SNAN_V7(0), FP32_SNAN_V1(0), FP32_SNAN_V6(0), FP32_SNAN_V1(0) } }, \ { /*src1 */ { FP32_SNAN_MAX(0), FP32_SNAN_V0(0), FP32_SNAN_V4(0), FP32_SNAN_V3(0), FP32_SNAN_V5(0), FP32_SNAN_V3(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0) } }, \ { /* => */ { FP32_QNAN_MAX(0), FP32_SNAN_V0(0), FP32_SNAN_V4(0), FP32_SNAN_V3(0), FP32_SNAN_V5(0), FP32_SNAN_V3(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_SNAN_V1(0), FP32_SNAN_V2(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0), FP32_SNAN_V7(0), FP32_SNAN_V1(0), FP32_SNAN_V6(0), FP32_SNAN_V1(0) } }, \ { /*src1 */ { FP32_SNAN_V4(0), FP32_SNAN_V3(0), FP32_SNAN_V4(0), FP32_SNAN_V3(0), FP32_SNAN_V5(0), FP32_SNAN_V3(0), FP32_SNAN_V1(0), FP32_SNAN_V0(0) } }, \ { /* => */ { FP32_QNAN_V4(0), FP32_SNAN_V3(0), FP32_SNAN_V4(0), FP32_SNAN_V3(0), FP32_SNAN_V5(0), FP32_SNAN_V3(0), FP32_SNAN_V1(0), FP32_SNAN_V0(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, Norm FP */ \ { { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(1), FP32_NORM_V0(1), FP32_QNAN_V1(0), FP32_NORM_V3(0), FP32_QNAN_V3(1), FP32_NORM_V5(0), FP32_QNAN_V5(1) } }, \ { /*src1 */ { FP32_1(0), FP32_1(1), FP32_QNAN_V0(1), FP32_NORM_V2(1), FP32_QNAN_V2(0), FP32_NORM_V4(0), FP32_QNAN_V4(1), FP32_NORM_V6(1) } }, \ { /* => */ { FP32_QNAN(0), FP32_1(1), FP32_QNAN_V0(1), FP32_NORM_V2(1), FP32_QNAN_V2(0), FP32_NORM_V4(0), FP32_QNAN_V4(1), FP32_NORM_V6(1) } }, \ /*mxcsr:in */ X86_MXCSR_FZ, \ /*128:out */ X86_MXCSR_FZ, \ /*256:out */ -1 }, \ /* SNan, Norm FP */ \ /*13*/{ { /*src2 */ { FP32_SNAN(1), FP32_SNAN_MAX(1), FP32_NORM_V0(1), FP32_SNAN_V1(0), FP32_NORM_V3(0), FP32_SNAN_V3(1), FP32_NORM_V5(0), FP32_SNAN_V5(1) } }, \ { /*src1 */ { FP32_1(0), FP32_1(0), FP32_SNAN_V0(1), FP32_NORM_V2(1), FP32_SNAN_V2(1), FP32_NORM_V4(0), FP32_SNAN_V4(1), FP32_NORM_V6(1) } }, \ { /* => */ { FP32_QNAN_V(1, 1), FP32_1(0), FP32_SNAN_V0(1), FP32_NORM_V2(1), FP32_SNAN_V2(1), FP32_NORM_V4(0), FP32_SNAN_V4(1), FP32_NORM_V6(1) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /** * Table D-1: Scalar double-precision floating-point invalid values. * For instructions: addsd, subsd, mulsd, divsd. **/ #define FP64_TABLE_D1_SD_INVALIDS \ /* QNan, QNan (Masked). */ \ /* 0*/{ { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN(1), FP64_QNAN_MAX(1), FP64_QNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN(1), FP64_QNAN_MAX(1), FP64_QNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_MAX(0), FP64_QNAN_V1(1), FP64_QNAN_V2(0), FP64_INF(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN_V2(1), FP64_QNAN_V3(1), FP64_SNAN(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_V2(1), FP64_QNAN_V3(1), FP64_SNAN(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_V1(0), FP64_QNAN_V1(0), FP64_QNAN_V2(0), FP64_INF(1) } }, \ { /*src1 */ { FP64_QNAN_V0(0), FP64_QNAN_V2(0), FP64_QNAN_V3(1), FP64_QNAN(0) } }, \ { /* => */ { FP64_QNAN_V0(0), FP64_QNAN_V2(0), FP64_QNAN_V3(1), FP64_QNAN(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK, \ /*256:out */ -1 }, \ /* QNan, SNan (Masked). */ \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_V1(0), FP64_QNAN_V2(0), FP64_QNAN_V3(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN_V2(1), FP64_SNAN_V1(0), FP64_SNAN_V2(1) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_SNAN_V2(1), FP64_SNAN_V1(0), FP64_SNAN_V2(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_MAX(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN(1), FP64_SNAN_MAX(1), FP64_SNAN_V2(0) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_SNAN(1), FP64_SNAN_MAX(1), FP64_SNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_V1(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_INF(0) } }, \ { /*src1 */ { FP64_SNAN_V2(0), FP64_QNAN(0), FP64_QNAN_MAX(1), FP64_QNAN(1) } }, \ { /* => */ { FP64_QNAN_V2(0), FP64_QNAN(0), FP64_QNAN_MAX(1), FP64_QNAN(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, QNan (Masked). */ \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V1(1) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V3(1), FP64_QNAN_V2(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V3(1), FP64_QNAN_V2(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN_MAX(0), FP64_SNAN_MAX(1), FP64_SNAN_V1(0), FP64_SNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN(1), FP64_QNAN_V3(1), FP64_QNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN(1), FP64_QNAN_V3(1), FP64_QNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN_V0(0), FP64_SNAN_MAX(0), FP64_SNAN_V1(0), FP64_SNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN_V1(0), FP64_QNAN(1), FP64_QNAN_V2(1), FP64_QNAN_V3(1) } }, \ { /* => */ { FP64_QNAN_V1(0), FP64_QNAN(1), FP64_QNAN_V2(1), FP64_QNAN_V3(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, SNan (Masked). */ \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_V0(0), FP64_SNAN_V3(0) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_SNAN_MAX(0), FP64_SNAN_V0(0), FP64_SNAN_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN_V2(0), FP64_SNAN_V1(0), FP64_SNAN_V2(0) } }, \ { /*src1 */ { FP64_SNAN_MAX(0), FP64_SNAN_V0(0), FP64_SNAN_V2(0), FP64_SNAN_V3(1) } }, \ { /* => */ { FP64_QNAN_MAX(0), FP64_SNAN_V0(0), FP64_SNAN_V2(0), FP64_SNAN_V3(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN_V1(0), FP64_SNAN_V2(0), FP64_SNAN_V1(0), FP64_SNAN_V2(0) } }, \ { /*src1 */ { FP64_SNAN_V0(0), FP64_SNAN_V3(0), FP64_SNAN_V0(0), FP64_SNAN_V3(0) } }, \ { /* => */ { FP64_QNAN_V0(0), FP64_SNAN_V3(0), FP64_SNAN_V0(0), FP64_SNAN_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, Norm FP (Masked). */ \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(1), FP64_NORM_V0(1), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_1(0), FP64_1(1), FP64_QNAN_V0(1), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_1(1), FP64_QNAN_V0(1), FP64_NORM_V2(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK, \ /*256:out */ -1 }, \ /* SNan, Norm FP (Masked). */ \ { { /*src2 */ { FP64_SNAN(1), FP64_SNAN_MAX(1), FP64_NORM_V0(1), FP64_SNAN_V1(0) } }, \ { /*src1 */ { FP64_1(0), FP64_1(0), FP64_SNAN_V0(1), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN_V(1, 1), FP64_1(0), FP64_SNAN_V0(1), FP64_NORM_V2(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, QNan (Unmasked). */ \ /*14*/{ { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V2(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ 0, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_MAX(0), FP64_QNAN_V1(0), FP64_QNAN_V2(0), FP64_QNAN_V3(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN_V2(0), FP64_QNAN_V0(0), FP64_QNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_V2(0), FP64_QNAN_V0(0), FP64_QNAN_V2(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ 0, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_V1(0), FP64_QNAN_V1(0), FP64_QNAN_V2(0), FP64_QNAN_V3(0) } }, \ { /*src1 */ { FP64_QNAN_V2(0), FP64_QNAN_V2(1), FP64_QNAN_V0(0), FP64_QNAN_V0(1) } }, \ { /* => */ { FP64_QNAN_V2(0), FP64_QNAN_V2(1), FP64_QNAN_V0(0), FP64_QNAN_V0(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ 0, \ /*256:out */ -1 }, \ /* QNan, SNan (Unmasked). */ \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_V1(0), FP64_QNAN_V2(0), FP64_QNAN_V3(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN_V2(1), FP64_SNAN_V3(1), FP64_SNAN_V2(0) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_SNAN_V2(1), FP64_SNAN_V3(1), FP64_SNAN_V2(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_MAX(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_V2(0) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_V1(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_SNAN_V2(0), FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V2(0) } }, \ { /* => */ { FP64_QNAN_V2(0), FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, QNan (Unmasked). */ \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V3(0), FP64_QNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V3(0), FP64_QNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN_MAX(0), FP64_SNAN_MAX(0), FP64_SNAN_V1(0), FP64_SNAN_V1(1) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_V2(1), FP64_QNAN_V0(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_V2(1), FP64_QNAN_V0(1) } }, \ /*mxcsr:in */ X86_MXCSR_RC_UP, \ /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN_V0(0), FP64_SNAN_MAX(0), FP64_SNAN_V1(0), FP64_SNAN_V1(1) } }, \ { /*src1 */ { FP64_QNAN_V3(0), FP64_QNAN(0), FP64_QNAN_V2(1), FP64_QNAN_V3(1) } }, \ { /* => */ { FP64_QNAN_V3(0), FP64_QNAN(0), FP64_QNAN_V2(1), FP64_QNAN_V3(1) } }, \ /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, \ /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, SNan (Unmasked). */ \ /*23*/{ { /*src2 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_V2(0), FP64_SNAN_V0(1) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_SNAN_MAX(0), FP64_SNAN_V2(0), FP64_SNAN_V0(1) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN_V2(0), FP64_SNAN_V1(0), FP64_SNAN_V2(1) } }, \ { /*src1 */ { FP64_SNAN_MAX(0), FP64_SNAN_V0(0), FP64_SNAN_V2(1), FP64_SNAN_V3(1) } }, \ { /* => */ { FP64_QNAN_MAX(0), FP64_SNAN_V0(0), FP64_SNAN_V2(1), FP64_SNAN_V3(1) } }, \ /*mxcsr:in */ X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN_V1(0), FP64_SNAN_V2(0), FP64_SNAN_V0(1), FP64_SNAN_V2(0) } }, \ { /*src1 */ { FP64_SNAN_V2(0), FP64_SNAN_V3(1), FP64_SNAN_V3(1), FP64_SNAN_V3(0) } }, \ { /* => */ { FP64_QNAN_V2(0), FP64_SNAN_V3(1), FP64_SNAN_V3(1), FP64_SNAN_V3(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, Norm FP (Unmasked). */ \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(1), FP64_NORM_V0(1), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_1(0), FP64_INF(1), FP64_QNAN_V0(1), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_INF(1), FP64_QNAN_V0(1), FP64_NORM_V2(1) } }, \ /*mxcsr:in */ X86_MXCSR_FZ, \ /*128:out */ X86_MXCSR_FZ, \ /*256:out */ -1 }, \ /* SNan, Norm FP (Unmasked). */ \ /*27*/{ { /*src2 */ { FP64_SNAN(1), FP64_SNAN_MAX(1), FP64_NORM_V0(1), FP64_SNAN_V1(0) } }, \ { /*src1 */ { FP64_1(0), FP64_INF(0), FP64_SNAN_V0(1), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN_V(1, 1), FP64_INF(0), FP64_SNAN_V0(1), FP64_NORM_V2(1) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /** * Table D-1: Horizontally packed single-precision floating-point invalid values. * For instructions: haddps, hsubps. **/ #define FP32_TABLE_D1_H_PS_INVALIDS \ /* 0*/{ { /*src2 */ { FP32_QNAN_MAX(0), FP32_QNAN(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V3(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V6(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK, \ /*256:out */ X86_MXCSR_XCPT_MASK }, \ { { /*src2 */ { FP32_QNAN(0), FP32_SNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_SNAN_V3(0), FP32_QNAN_V4(0), FP32_SNAN_V5(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_SNAN(0), FP32_QNAN(0), FP32_SNAN_V2(0), FP32_QNAN_V6(0), FP32_SNAN_V2(0), FP32_QNAN_V1(0), FP32_SNAN_V4(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V6(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V4(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN_MAX(0), FP32_QNAN_V2(0), FP32_SNAN_V1(0), FP32_QNAN_V2(0), FP32_SNAN_V3(0), FP32_QNAN_V4(0), FP32_SNAN_V5(0), FP32_QNAN_V6(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_QNAN(0), FP32_SNAN(0), FP32_QNAN_V5(0), FP32_SNAN_V4(0), FP32_QNAN_V3(0), FP32_SNAN_V2(0), FP32_QNAN_V1(0) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_V(0, 1), FP32_QNAN_MAX(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V5(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_MAX(0), FP32_SNAN(0), FP32_SNAN_V7(0), FP32_SNAN_V1(0), FP32_SNAN_V6(0), FP32_SNAN_V1(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V5(0), FP32_SNAN_V3(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_V(0, 1), FP32_QNAN_V(0, 1), FP32_QNAN_MAX(0), FP32_QNAN_V5(0), FP32_QNAN_V1(0), FP32_QNAN_V7(0), FP32_QNAN_V6(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_QNAN(0), FP32_NORM_V1(0), FP32_QNAN_MAX(0), FP32_QNAN_V1(0), FP32_QNAN_V1(0), FP32_NORM_V3(1), FP32_QNAN_V5(0), FP32_NORM_V5(1) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_1(1), FP32_QNAN_MAX(1), FP32_NORM_V2(1), FP32_QNAN_V2(0), FP32_NORM_V4(0), FP32_QNAN_V4(1), FP32_NORM_V6(1) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_MAX(1), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V4(1), FP32_QNAN_V1(0), FP32_QNAN_V5(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK, \ /*256:out */ X86_MXCSR_XCPT_MASK }, \ { { /*src2 */ { FP32_SNAN_MAX(1), FP32_1(0), FP32_SNAN_V1(0), FP32_NORM_V3(0), FP32_SNAN_V0(0), FP32_NORM_V3(1), FP32_SNAN_V6(0), FP32_NORM_V7(1) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_1(1), FP32_SNAN_MAX(0), FP32_NORM_V2(1), FP32_SNAN_V2(1), FP32_NORM_V4(0), FP32_SNAN_V4(1), FP32_NORM_V6(1) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_MAX(0), FP32_QNAN_MAX(1), FP32_QNAN_V1(0), FP32_QNAN_V2(1), FP32_QNAN_V4(1), FP32_QNAN_V0(0), FP32_QNAN_V6(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_QNAN_MAX(0), FP32_QNAN(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V3(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V6(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, \ /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, \ { { /*src2 */ { FP32_QNAN(0), FP32_SNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_SNAN_V3(0), FP32_QNAN_V4(0), FP32_SNAN_V5(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_SNAN(0), FP32_QNAN(0), FP32_SNAN_V2(0), FP32_QNAN_V6(0), FP32_SNAN_V2(0), FP32_QNAN_V1(0), FP32_SNAN_V4(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V6(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V4(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN_MAX(0), FP32_QNAN_V2(0), FP32_SNAN_V1(0), FP32_QNAN_V2(0), FP32_SNAN_V3(0), FP32_QNAN_V4(0), FP32_SNAN_V5(0), FP32_QNAN_V6(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_QNAN(0), FP32_SNAN(0), FP32_QNAN_V5(0), FP32_SNAN_V4(0), FP32_QNAN_V3(0), FP32_SNAN_V2(0), FP32_QNAN_V1(0) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_V(0, 1), FP32_QNAN_MAX(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V5(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_MAX(0), FP32_SNAN(0), FP32_SNAN_V7(0), FP32_SNAN_V1(0), FP32_SNAN_V6(0), FP32_SNAN_V1(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V5(0), FP32_SNAN_V3(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_V(0, 1), FP32_QNAN_V(0, 1), FP32_QNAN_MAX(0), FP32_QNAN_V5(0), FP32_QNAN_V1(0), FP32_QNAN_V7(0), FP32_QNAN_V6(0) } }, \ /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, \ /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_QNAN(0), FP32_NORM_V1(0), FP32_QNAN_MAX(0), FP32_QNAN_V1(0), FP32_QNAN_V1(0), FP32_NORM_V3(1), FP32_QNAN_V5(0), FP32_NORM_V5(1) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_1(1), FP32_QNAN_MAX(1), FP32_NORM_V2(1), FP32_QNAN_V2(0), FP32_NORM_V4(0), FP32_QNAN_V4(1), FP32_NORM_V6(1) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_MAX(1), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V4(1), FP32_QNAN_V1(0), FP32_QNAN_V5(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ 0, \ /*256:out */ 0 }, \ { { /*src2 */ { FP32_SNAN_MAX(1), FP32_1(0), FP32_SNAN_V1(0), FP32_NORM_V3(0), FP32_SNAN_V0(0), FP32_NORM_V3(1), FP32_SNAN_V6(0), FP32_NORM_V7(1) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_1(1), FP32_SNAN_MAX(0), FP32_NORM_V2(1), FP32_SNAN_V2(1), FP32_NORM_V4(0), FP32_SNAN_V4(1), FP32_NORM_V6(1) } }, \ { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_MAX(0), FP32_QNAN_MAX(1), FP32_QNAN_V1(0), FP32_QNAN_V2(1), FP32_QNAN_V4(1), FP32_QNAN_V0(0), FP32_QNAN_V6(0) } }, \ /*mxcsr:in */ X86_MXCSR_RC_UP, \ /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_RC_UP | X86_MXCSR_IE }, \ /** * Table D-1: Horizontally packed double-precision floating-point invalid values. * For instructions: haddpd, hsubpd. **/ #define FP64_TABLE_D1_H_PD_INVALIDS \ /* 0*/{ { /*src2 */ { FP64_QNAN_MAX(0), FP64_QNAN(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN(0), FP64_QNAN_V0(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK, \ /*256:out */ X86_MXCSR_XCPT_MASK }, \ { { /*src2 */ { FP64_QNAN(0), FP64_SNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_SNAN(0), FP64_QNAN(0), FP64_SNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN_MAX(0), FP64_QNAN_V2(0), FP64_SNAN_V1(0), FP64_QNAN_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_QNAN(0), FP64_SNAN(0), FP64_QNAN_V3(0) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_QNAN_MAX(0), FP64_QNAN_V(0, 1), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_MAX(0), FP64_SNAN(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_MAX(0) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_QNAN_V(0, 1), FP64_QNAN_V(0, 1), FP64_QNAN_MAX(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_QNAN(0), FP64_NORM_V1(0), FP64_QNAN_MAX(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_1(1), FP64_QNAN_MAX(1), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(1), FP64_QNAN_MAX(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK, \ /*256:out */ X86_MXCSR_XCPT_MASK }, \ { { /*src2 */ { FP64_SNAN_MAX(1), FP64_1(0), FP64_SNAN_V1(0), FP64_NORM_V3(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_1(1), FP64_SNAN_MAX(0), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_QNAN_MAX(1), FP64_QNAN_MAX(0), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_QNAN_MAX(0), FP64_QNAN(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN(0), FP64_QNAN_V0(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, \ /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, \ { { /*src2 */ { FP64_QNAN(0), FP64_SNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_SNAN(0), FP64_QNAN(0), FP64_SNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(0) } }, \ /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, \ /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN_MAX(0), FP64_QNAN_V2(0), FP64_SNAN_V1(0), FP64_QNAN_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_QNAN(0), FP64_SNAN(0), FP64_QNAN_V3(0) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_QNAN_MAX(0), FP64_QNAN_V(0, 1), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_MAX(0), FP64_SNAN(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_MAX(0) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_QNAN_V(0, 1), FP64_QNAN_V(0, 1), FP64_QNAN_MAX(0) } }, \ /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, \ /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_QNAN(0), FP64_NORM_V1(0), FP64_QNAN_MAX(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_1(1), FP64_QNAN_MAX(1), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(1), FP64_QNAN_MAX(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ 0, \ /*256:out */ 0 }, \ /*11*/{ { /*src2 */ { FP64_SNAN_MAX(1), FP64_1(0), FP64_SNAN_V1(0), FP64_NORM_V3(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_1(1), FP64_SNAN_MAX(0), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN_V(0, 1), FP64_QNAN_MAX(1), FP64_QNAN_MAX(0), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_RC_UP, \ /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_RC_UP | X86_MXCSR_IE }, \ /** * Table D-9: Packed single-precision floating-point invalid values. * For instructions: maxps, minps. **/ #define FP32_TABLE_D9_PS_INVALIDS \ /* 0*/{ { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V2(0), FP32_SNAN_V6(0), FP32_SNAN_V2(0), FP32_SNAN_V1(0), FP32_SNAN_V4(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V1(0), FP32_SNAN_V3(0), FP32_SNAN_V4(0), FP32_SNAN_V5(0), FP32_SNAN_V6(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V6(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0) } }, \ { /* => */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V1(0), FP32_SNAN_V3(0), FP32_SNAN_V4(0), FP32_SNAN_V5(0), FP32_SNAN_V6(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0), FP32_SNAN_V7(0), FP32_SNAN_V1(0), FP32_SNAN_V6(0), FP32_SNAN_V1(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V4(0), FP32_SNAN_V3(0), FP32_SNAN_V5(0), FP32_SNAN_V3(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0) } }, \ { /* => */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0), FP32_SNAN_V7(0), FP32_SNAN_V1(0), FP32_SNAN_V6(0), FP32_SNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(1), FP32_NORM_V0(1), FP32_QNAN_V1(0), FP32_NORM_V3(0), FP32_QNAN_V3(1), FP32_NORM_V5(0), FP32_QNAN_V5(1) } }, \ { /*src1 */ { FP32_1(0), FP32_1(1), FP32_QNAN_V0(1), FP32_NORM_V2(1), FP32_QNAN_V2(0), FP32_NORM_V4(0), FP32_QNAN_V4(1), FP32_NORM_V6(1) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_MAX(1), FP32_NORM_V0(1), FP32_QNAN_V1(0), FP32_NORM_V3(0), FP32_QNAN_V3(1), FP32_NORM_V5(0), FP32_QNAN_V5(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN(1), FP32_SNAN_MAX(1), FP32_NORM_V0(1), FP32_SNAN_V1(0), FP32_NORM_V3(0), FP32_SNAN_V3(1), FP32_NORM_V5(0), FP32_SNAN_V5(1) } }, \ { /*src1 */ { FP32_1(0), FP32_1(0), FP32_SNAN_V0(1), FP32_NORM_V2(1), FP32_SNAN_V2(1), FP32_NORM_V4(0), FP32_SNAN_V4(1), FP32_NORM_V6(1) } }, \ { /* => */ { FP32_SNAN(1), FP32_SNAN_MAX(1), FP32_NORM_V0(1), FP32_SNAN_V1(0), FP32_NORM_V3(0), FP32_SNAN_V3(1), FP32_NORM_V5(0), FP32_SNAN_V5(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V2(0), FP32_QNAN_V6(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0), FP32_QNAN_V4(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_IE }, \ { { /*src2 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V2(0), FP32_SNAN_V6(0), FP32_SNAN_V2(0), FP32_SNAN_V1(0), FP32_SNAN_V4(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V0(0), FP32_QNAN_V1(0), FP32_QNAN_V2(0), FP32_QNAN_V3(0), FP32_QNAN_V4(0), FP32_QNAN_V5(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V1(0), FP32_SNAN_V3(0), FP32_SNAN_V4(0), FP32_SNAN_V5(0), FP32_SNAN_V6(0) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_QNAN_MAX(0), FP32_QNAN_V6(0), FP32_QNAN_V5(0), FP32_QNAN_V4(0), FP32_QNAN_V3(0), FP32_QNAN_V2(0), FP32_QNAN_V1(0) } }, \ { /* => */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V1(0), FP32_SNAN_V3(0), FP32_SNAN_V4(0), FP32_SNAN_V5(0), FP32_SNAN_V6(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_IE }, \ { { /*src2 */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0), FP32_SNAN_V7(0), FP32_SNAN_V1(0), FP32_SNAN_V6(0), FP32_SNAN_V1(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_SNAN_MAX(0), FP32_SNAN_V4(0), FP32_SNAN_V3(0), FP32_SNAN_V5(0), FP32_SNAN_V3(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0) } }, \ { /* => */ { FP32_SNAN(0), FP32_SNAN(0), FP32_SNAN_V1(0), FP32_SNAN_V2(0), FP32_SNAN_V7(0), FP32_SNAN_V1(0), FP32_SNAN_V6(0), FP32_SNAN_V1(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_IE }, \ /** * Table D-9: Packed double-precision floating-point invalid values. * For instructions: maxpd, minpd. **/ #define FP64_TABLE_D9_PD_INVALIDS \ /* 0*/{ { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V2(0), FP64_QNAN_V3(0) } }, \ { /* => */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_V2(0), FP64_SNAN_V3(0) } }, \ { /* => */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(1), FP64_NORM_V0(1), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_1(0), FP64_1(1), FP64_QNAN_V0(1), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(1), FP64_NORM_V0(1), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN(1), FP64_SNAN_MAX(1), FP64_NORM_V0(1), FP64_SNAN_V1(0) } }, \ { /*src1 */ { FP64_1(0), FP64_1(0), FP64_SNAN_V0(1), FP64_NORM_V2(1) } }, \ { /* => */ { FP64_SNAN(1), FP64_SNAN_MAX(1), FP64_NORM_V0(1), FP64_SNAN_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_IE }, \ { { /*src2 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V0(0), FP64_QNAN_V1(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_QNAN_MAX(0), FP64_QNAN_V2(0), FP64_QNAN_V3(0) } }, \ { /* => */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V1(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_IE }, \ { { /*src2 */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_SNAN_MAX(0), FP64_SNAN_V2(0), FP64_SNAN_V3(0) } }, \ { /* => */ { FP64_SNAN(0), FP64_SNAN(0), FP64_SNAN_V1(0), FP64_SNAN_V2(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ X86_MXCSR_IE }, \ /** * Table D-9: Scalar single-precision floating-point invalid values. * For instructions: maxss, minss. **/ #define FP32_TABLE_D9_SS_INVALIDS \ /* QNan, QNan (Masked). */ \ /* 0*/{ { /*src2 */ { FP32_QNAN(0), FP32_RAND_V2(0), FP32_RAND_V7(1), FP32_RAND_V6(0), FP32_RAND_V2(0), FP32_RAND_V1(1), FP32_RAND_V7(0), FP32_RAND_V2(1) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_RAND_V3(0), FP32_RAND_V4(0), FP32_RAND_V5(1), FP32_RAND_V5(1), FP32_RAND_V6(1), FP32_RAND_V7(1), FP32_RAND_V1(1) } }, \ { /* => */ { FP32_QNAN(0), FP32_RAND_V3(0), FP32_RAND_V4(0), FP32_RAND_V5(1), FP32_RAND_V5(1), FP32_RAND_V6(1), FP32_RAND_V7(1), FP32_RAND_V1(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_QNAN_MAX(0), FP32_RAND_V0(0), FP32_RAND_V1(1), FP32_RAND_V2(0), FP32_RAND_V3(0), FP32_RAND_V4(1), FP32_RAND_V5(0), FP32_RAND_V6(1) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_RAND_V7(1), FP32_RAND_V6(0), FP32_RAND_V5(1), FP32_RAND_V4(1), FP32_RAND_V3(1), FP32_RAND_V2(0), FP32_RAND_V1(0) } }, \ { /* => */ { FP32_QNAN_MAX(0), FP32_RAND_V7(1), FP32_RAND_V6(0), FP32_RAND_V5(1), FP32_RAND_V4(1), FP32_RAND_V3(1), FP32_RAND_V2(0), FP32_RAND_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_QNAN_V0(0), FP32_RAND_V0(1), FP32_RAND_V7(1), FP32_RAND_V2(0), FP32_RAND_V3(1), FP32_RAND_V4(0), FP32_RAND_V1(0), FP32_RAND_V2(0) } }, \ { /*src1 */ { FP32_QNAN_MAX(0), FP32_RAND_V1(0), FP32_RAND_V7(0), FP32_RAND_V2(1), FP32_RAND_V6(1), FP32_RAND_V3(1), FP32_RAND_V5(0), FP32_RAND_V4(1) } }, \ { /* => */ { FP32_QNAN_V0(0), FP32_RAND_V1(0), FP32_RAND_V7(0), FP32_RAND_V2(1), FP32_RAND_V6(1), FP32_RAND_V3(1), FP32_RAND_V5(0), FP32_RAND_V4(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, SNan (Masked). */ \ { { /*src2 */ { FP32_QNAN(0), FP32_RAND_V6(0), FP32_RAND_V5(1), FP32_RAND_V4(0), FP32_RAND_V2(0), FP32_RAND_V2(1), FP32_RAND_V1(0), FP32_RAND_V0(1) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_RAND_V0(1), FP32_RAND_V1(0), FP32_RAND_V2(0), FP32_RAND_V3(1), FP32_RAND_V4(0), FP32_RAND_V5(1), FP32_RAND_V6(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_RAND_V0(1), FP32_RAND_V1(0), FP32_RAND_V2(0), FP32_RAND_V3(1), FP32_RAND_V4(0), FP32_RAND_V5(1), FP32_RAND_V6(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_QNAN_MAX(0), FP32_RAND_V2(1), FP32_RAND_V3(0), FP32_RAND_V1(1), FP32_RAND_V0(1), FP32_RAND_V4(1), FP32_RAND_V5(1), FP32_RAND_V6(1) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V5(0), FP32_RAND_V2(1), FP32_RAND_V0(0), FP32_RAND_V1(0), FP32_RAND_V3(0) } }, \ { /* => */ { FP32_QNAN_MAX(0), FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V5(0), FP32_RAND_V2(1), FP32_RAND_V0(0), FP32_RAND_V1(0), FP32_RAND_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_QNAN_V0(0), FP32_RAND_V1(1), FP32_RAND_V3(0), FP32_RAND_V1(1), FP32_RAND_V0(0), FP32_RAND_V4(1), FP32_RAND_V5(1), FP32_RAND_V6(1) } }, \ { /*src1 */ { FP32_SNAN_MAX(0), FP32_RAND_V3(0), FP32_RAND_V5(0), FP32_RAND_V2(1), FP32_RAND_V0(0), FP32_RAND_V6(0), FP32_RAND_V7(1), FP32_RAND_V1(0) } }, \ { /* => */ { FP32_QNAN_V0(0), FP32_RAND_V3(0), FP32_RAND_V5(0), FP32_RAND_V2(1), FP32_RAND_V0(0), FP32_RAND_V6(0), FP32_RAND_V7(1), FP32_RAND_V1(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, QNan (Masked). */ \ { { /*src2 */ { FP32_SNAN(0), FP32_RAND_V2(1), FP32_RAND_V3(0), FP32_RAND_V1(1), FP32_RAND_V0(1), FP32_RAND_V4(1), FP32_RAND_V5(1), FP32_RAND_V6(1) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V5(0), FP32_RAND_V2(1), FP32_RAND_V0(0), FP32_RAND_V1(0), FP32_RAND_V3(0) } }, \ { /* => */ { FP32_SNAN(0), FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V5(0), FP32_RAND_V2(1), FP32_RAND_V0(0), FP32_RAND_V1(0), FP32_RAND_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_SNAN(0), FP32_RAND_V1(1), FP32_RAND_V3(0), FP32_RAND_V1(1), FP32_RAND_V3(0), FP32_RAND_V4(1), FP32_RAND_V5(1), FP32_RAND_V7(1) } }, \ { /*src1 */ { FP32_QNAN_MAX(0), FP32_RAND_V2(0), FP32_RAND_V4(0), FP32_RAND_V3(1), FP32_RAND_V2(0), FP32_RAND_V6(0), FP32_RAND_V7(1), FP32_RAND_V2(0) } }, \ { /* => */ { FP32_SNAN(0), FP32_RAND_V2(0), FP32_RAND_V4(0), FP32_RAND_V3(1), FP32_RAND_V2(0), FP32_RAND_V6(0), FP32_RAND_V7(1), FP32_RAND_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_SNAN_V1(0), FP32_RAND_V1(1), FP32_RAND_V7(1), FP32_RAND_V2(0), FP32_RAND_V3(1), FP32_RAND_V4(0), FP32_RAND_V1(0), FP32_RAND_V2(0) } }, \ { /*src1 */ { FP32_QNAN_V6(0), FP32_RAND_V2(0), FP32_RAND_V3(0), FP32_RAND_V4(1), FP32_RAND_V5(1), FP32_RAND_V0(1), FP32_RAND_V2(0), FP32_RAND_V3(1) } }, \ { /* => */ { FP32_SNAN_V1(0), FP32_RAND_V2(0), FP32_RAND_V3(0), FP32_RAND_V4(1), FP32_RAND_V5(1), FP32_RAND_V0(1), FP32_RAND_V2(0), FP32_RAND_V3(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, SNan (Masked). */ \ { { /*src2 */ { FP32_SNAN(0), FP32_RAND_V1(1), FP32_RAND_V7(1), FP32_RAND_V2(0), FP32_RAND_V3(1), FP32_RAND_V4(0), FP32_RAND_V1(0), FP32_RAND_V2(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_RAND_V3(0), FP32_RAND_V4(0), FP32_RAND_V5(1), FP32_RAND_V2(1), FP32_RAND_V0(1), FP32_RAND_V1(0), FP32_RAND_V7(0) } }, \ { /* => */ { FP32_SNAN(0), FP32_RAND_V3(0), FP32_RAND_V4(0), FP32_RAND_V5(1), FP32_RAND_V2(1), FP32_RAND_V0(1), FP32_RAND_V1(0), FP32_RAND_V7(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_SNAN(0), FP32_RAND_V1(0), FP32_RAND_V7(1), FP32_RAND_V2(1), FP32_RAND_V3(0), FP32_RAND_V4(1), FP32_RAND_V1(1), FP32_RAND_V2(1) } }, \ { /*src1 */ { FP32_SNAN_MAX(0), FP32_RAND_V7(0), FP32_RAND_V5(0), FP32_RAND_V7(1), FP32_RAND_V6(1), FP32_RAND_V5(1), FP32_RAND_V3(0), FP32_RAND_V2(1) } }, \ { /* => */ { FP32_SNAN(0), FP32_RAND_V7(0), FP32_RAND_V5(0), FP32_RAND_V7(1), FP32_RAND_V6(1), FP32_RAND_V5(1), FP32_RAND_V3(0), FP32_RAND_V2(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_SNAN_V1(0), FP32_RAND_V1(1), FP32_RAND_V6(1), FP32_RAND_V2(0), FP32_RAND_V3(1), FP32_RAND_V4(0), FP32_RAND_V1(0), FP32_RAND_V2(0) } }, \ { /*src1 */ { FP32_SNAN_V4(0), FP32_RAND_V2(1), FP32_RAND_V3(1), FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V3(0), FP32_RAND_V0(0), FP32_RAND_V0(1) } }, \ { /* => */ { FP32_SNAN_V1(0), FP32_RAND_V2(1), FP32_RAND_V3(1), FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V3(0), FP32_RAND_V0(0), FP32_RAND_V0(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, Normal (Masked). */ \ { { /*src2 */ { FP32_QNAN(0), FP32_RAND_V3(1), FP32_RAND_V2(1), FP32_RAND_V2(0), FP32_RAND_V5(1), FP32_RAND_V4(0), FP32_RAND_V1(0), FP32_RAND_V2(0) } }, \ { /*src1 */ { FP32_1(0), FP32_RAND_V2(1), FP32_RAND_V4(1), FP32_RAND_V6(1), FP32_RAND_V2(1), FP32_RAND_V7(0), FP32_RAND_V3(0), FP32_RAND_V4(1) } }, \ { /* => */ { FP32_QNAN(0), FP32_RAND_V2(1), FP32_RAND_V4(1), FP32_RAND_V6(1), FP32_RAND_V2(1), FP32_RAND_V7(0), FP32_RAND_V3(0), FP32_RAND_V4(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, Normal (Masked). */ \ { { /*src2 */ { FP32_SNAN(1), FP32_RAND_V0(1), FP32_RAND_V2(1), FP32_RAND_V2(0), FP32_RAND_V5(1), FP32_RAND_V4(0), FP32_RAND_V1(0), FP32_RAND_V2(0) } }, \ { /*src1 */ { FP32_1(0), FP32_RAND_V0(1), FP32_RAND_V1(1), FP32_RAND_V3(1), FP32_RAND_V4(1), FP32_RAND_V6(0), FP32_RAND_V7(0), FP32_RAND_V1(1) } }, \ { /* => */ { FP32_SNAN(1), FP32_RAND_V0(1), FP32_RAND_V1(1), FP32_RAND_V3(1), FP32_RAND_V4(1), FP32_RAND_V6(0), FP32_RAND_V7(0), FP32_RAND_V1(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, QNan (Unmasked). */ \ { { /*src2 */ { FP32_QNAN(0), FP32_RAND_V2(0), FP32_RAND_V7(1), FP32_RAND_V6(0), FP32_RAND_V2(0), FP32_RAND_V1(1), FP32_RAND_V7(0), FP32_RAND_V2(1) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_RAND_V3(0), FP32_RAND_V4(0), FP32_RAND_V5(1), FP32_RAND_V5(1), FP32_RAND_V6(1), FP32_RAND_V7(1), FP32_RAND_V1(1) } }, \ { /* => */ { FP32_QNAN(0), FP32_RAND_V3(0), FP32_RAND_V4(0), FP32_RAND_V5(1), FP32_RAND_V5(1), FP32_RAND_V6(1), FP32_RAND_V7(1), FP32_RAND_V1(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_QNAN_MAX(0), FP32_RAND_V0(0), FP32_RAND_V1(1), FP32_RAND_V2(0), FP32_RAND_V3(0), FP32_RAND_V4(1), FP32_RAND_V5(0), FP32_RAND_V6(1) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_RAND_V7(1), FP32_RAND_V6(0), FP32_RAND_V5(1), FP32_RAND_V4(1), FP32_RAND_V3(1), FP32_RAND_V2(0), FP32_RAND_V1(0) } }, \ { /* => */ { FP32_QNAN_MAX(0), FP32_RAND_V7(1), FP32_RAND_V6(0), FP32_RAND_V5(1), FP32_RAND_V4(1), FP32_RAND_V3(1), FP32_RAND_V2(0), FP32_RAND_V1(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_QNAN_V0(0), FP32_RAND_V0(1), FP32_RAND_V7(1), FP32_RAND_V2(0), FP32_RAND_V3(1), FP32_RAND_V4(0), FP32_RAND_V1(0), FP32_RAND_V2(0) } }, \ { /*src1 */ { FP32_QNAN_MAX(0), FP32_RAND_V1(0), FP32_RAND_V7(0), FP32_RAND_V2(1), FP32_RAND_V6(1), FP32_RAND_V3(1), FP32_RAND_V5(0), FP32_RAND_V4(1) } }, \ { /* => */ { FP32_QNAN_V0(0), FP32_RAND_V1(0), FP32_RAND_V7(0), FP32_RAND_V2(1), FP32_RAND_V6(1), FP32_RAND_V3(1), FP32_RAND_V5(0), FP32_RAND_V4(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, SNan (Unmasked). */ \ { { /*src2 */ { FP32_QNAN(0), FP32_RAND_V6(0), FP32_RAND_V5(1), FP32_RAND_V4(0), FP32_RAND_V2(0), FP32_RAND_V2(1), FP32_RAND_V1(0), FP32_RAND_V0(1) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_RAND_V0(1), FP32_RAND_V1(0), FP32_RAND_V2(0), FP32_RAND_V3(1), FP32_RAND_V4(0), FP32_RAND_V5(1), FP32_RAND_V6(0) } }, \ { /* => */ { FP32_QNAN(0), FP32_RAND_V0(1), FP32_RAND_V1(0), FP32_RAND_V2(0), FP32_RAND_V3(1), FP32_RAND_V4(0), FP32_RAND_V5(1), FP32_RAND_V6(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_QNAN_MAX(0), FP32_RAND_V2(1), FP32_RAND_V3(0), FP32_RAND_V1(1), FP32_RAND_V0(1), FP32_RAND_V4(1), FP32_RAND_V5(1), FP32_RAND_V6(1) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V5(0), FP32_RAND_V2(1), FP32_RAND_V0(0), FP32_RAND_V1(0), FP32_RAND_V3(0) } }, \ { /* => */ { FP32_QNAN_MAX(0), FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V5(0), FP32_RAND_V2(1), FP32_RAND_V0(0), FP32_RAND_V1(0), FP32_RAND_V3(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_QNAN_V0(0), FP32_RAND_V1(1), FP32_RAND_V3(0), FP32_RAND_V1(1), FP32_RAND_V0(0), FP32_RAND_V4(1), FP32_RAND_V5(1), FP32_RAND_V6(1) } }, \ { /*src1 */ { FP32_SNAN_MAX(0), FP32_RAND_V3(0), FP32_RAND_V5(0), FP32_RAND_V2(1), FP32_RAND_V0(0), FP32_RAND_V6(0), FP32_RAND_V7(1), FP32_RAND_V1(0) } }, \ { /* => */ { FP32_QNAN_V0(0), FP32_RAND_V3(0), FP32_RAND_V5(0), FP32_RAND_V2(1), FP32_RAND_V0(0), FP32_RAND_V6(0), FP32_RAND_V7(1), FP32_RAND_V1(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, QNan (Unmasked). */ \ { { /*src2 */ { FP32_SNAN(0), FP32_RAND_V2(1), FP32_RAND_V3(0), FP32_RAND_V1(1), FP32_RAND_V0(1), FP32_RAND_V4(1), FP32_RAND_V5(1), FP32_RAND_V6(1) } }, \ { /*src1 */ { FP32_QNAN(0), FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V5(0), FP32_RAND_V2(1), FP32_RAND_V0(0), FP32_RAND_V1(0), FP32_RAND_V3(0) } }, \ { /* => */ { FP32_SNAN(0), FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V5(0), FP32_RAND_V2(1), FP32_RAND_V0(0), FP32_RAND_V1(0), FP32_RAND_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_FZ, \ /*128:out */ X86_MXCSR_FZ | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_SNAN(0), FP32_RAND_V1(1), FP32_RAND_V3(0), FP32_RAND_V1(1), FP32_RAND_V3(0), FP32_RAND_V4(1), FP32_RAND_V5(1), FP32_RAND_V7(1) } }, \ { /*src1 */ { FP32_QNAN_MAX(0), FP32_RAND_V2(0), FP32_RAND_V4(0), FP32_RAND_V3(1), FP32_RAND_V2(0), FP32_RAND_V6(0), FP32_RAND_V7(1), FP32_RAND_V2(0) } }, \ { /* => */ { FP32_SNAN(0), FP32_RAND_V2(0), FP32_RAND_V4(0), FP32_RAND_V3(1), FP32_RAND_V2(0), FP32_RAND_V6(0), FP32_RAND_V7(1), FP32_RAND_V2(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_SNAN_V1(0), FP32_RAND_V1(1), FP32_RAND_V7(1), FP32_RAND_V2(0), FP32_RAND_V3(1), FP32_RAND_V4(0), FP32_RAND_V1(0), FP32_RAND_V2(0) } }, \ { /*src1 */ { FP32_QNAN_V6(0), FP32_RAND_V2(0), FP32_RAND_V3(0), FP32_RAND_V4(1), FP32_RAND_V5(1), FP32_RAND_V0(1), FP32_RAND_V2(0), FP32_RAND_V3(1) } }, \ { /* => */ { FP32_SNAN_V1(0), FP32_RAND_V2(0), FP32_RAND_V3(0), FP32_RAND_V4(1), FP32_RAND_V5(1), FP32_RAND_V0(1), FP32_RAND_V2(0), FP32_RAND_V3(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, SNan (Unmasked). */ \ { { /*src2 */ { FP32_SNAN(0), FP32_RAND_V1(1), FP32_RAND_V7(1), FP32_RAND_V2(0), FP32_RAND_V3(1), FP32_RAND_V4(0), FP32_RAND_V1(0), FP32_RAND_V2(0) } }, \ { /*src1 */ { FP32_SNAN(0), FP32_RAND_V3(0), FP32_RAND_V4(0), FP32_RAND_V5(1), FP32_RAND_V2(1), FP32_RAND_V0(1), FP32_RAND_V1(0), FP32_RAND_V7(0) } }, \ { /* => */ { FP32_SNAN(0), FP32_RAND_V3(0), FP32_RAND_V4(0), FP32_RAND_V5(1), FP32_RAND_V2(1), FP32_RAND_V0(1), FP32_RAND_V1(0), FP32_RAND_V7(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_SNAN(0), FP32_RAND_V1(0), FP32_RAND_V7(1), FP32_RAND_V2(1), FP32_RAND_V3(0), FP32_RAND_V4(1), FP32_RAND_V1(1), FP32_RAND_V2(1) } }, \ { /*src1 */ { FP32_SNAN_MAX(0), FP32_RAND_V7(0), FP32_RAND_V5(0), FP32_RAND_V7(1), FP32_RAND_V6(1), FP32_RAND_V5(1), FP32_RAND_V3(0), FP32_RAND_V2(1) } }, \ { /* => */ { FP32_SNAN(0), FP32_RAND_V7(0), FP32_RAND_V5(0), FP32_RAND_V7(1), FP32_RAND_V6(1), FP32_RAND_V5(1), FP32_RAND_V3(0), FP32_RAND_V2(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP32_SNAN_V1(0), FP32_RAND_V1(1), FP32_RAND_V6(1), FP32_RAND_V2(0), FP32_RAND_V3(1), FP32_RAND_V4(0), FP32_RAND_V1(0), FP32_RAND_V2(0) } }, \ { /*src1 */ { FP32_SNAN_V4(0), FP32_RAND_V2(1), FP32_RAND_V3(1), FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V3(0), FP32_RAND_V0(0), FP32_RAND_V0(1) } }, \ { /* => */ { FP32_SNAN_V1(0), FP32_RAND_V2(1), FP32_RAND_V3(1), FP32_RAND_V1(1), FP32_RAND_V4(0), FP32_RAND_V3(0), FP32_RAND_V0(0), FP32_RAND_V0(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, Normal (Unmasked). */ \ { { /*src2 */ { FP32_QNAN(0), FP32_RAND_V3(1), FP32_RAND_V2(1), FP32_RAND_V2(0), FP32_RAND_V5(1), FP32_RAND_V4(0), FP32_RAND_V1(0), FP32_RAND_V2(0) } }, \ { /*src1 */ { FP32_1(0), FP32_RAND_V2(1), FP32_RAND_V4(1), FP32_RAND_V6(1), FP32_RAND_V2(1), FP32_RAND_V7(0), FP32_RAND_V3(0), FP32_RAND_V4(1) } }, \ { /* => */ { FP32_QNAN(0), FP32_RAND_V2(1), FP32_RAND_V4(1), FP32_RAND_V6(1), FP32_RAND_V2(1), FP32_RAND_V7(0), FP32_RAND_V3(0), FP32_RAND_V4(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, Normal (Unmasked). */ \ { { /*src2 */ { FP32_SNAN(1), FP32_RAND_V0(1), FP32_RAND_V2(1), FP32_RAND_V2(0), FP32_RAND_V5(1), FP32_RAND_V4(0), FP32_RAND_V1(0), FP32_RAND_V2(0) } }, \ { /*src1 */ { FP32_1(0), FP32_RAND_V0(1), FP32_RAND_V1(1), FP32_RAND_V3(1), FP32_RAND_V4(1), FP32_RAND_V6(0), FP32_RAND_V7(0), FP32_RAND_V1(1) } }, \ { /* => */ { FP32_SNAN(1), FP32_RAND_V0(1), FP32_RAND_V1(1), FP32_RAND_V3(1), FP32_RAND_V4(1), FP32_RAND_V6(0), FP32_RAND_V7(0), FP32_RAND_V1(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /** * Table D-9: Scalar double-precision floating-point invalid values. * For instructions: maxsd, minsd. **/ #define FP64_TABLE_D9_SD_INVALIDS \ /* QNan, QNan (Masked). */ \ /* 0*/{ { /*src2 */ { FP64_QNAN(0), FP64_RAND_V2(0), FP64_RAND_V0(1), FP64_RAND_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_MAX(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V3(1) } }, \ { /* => */ { FP64_QNAN_MAX(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V3(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_V0(0), FP64_RAND_V0(1), FP64_RAND_V0(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_QNAN_MAX(0), FP64_RAND_V1(0), FP64_RAND_V0(0), FP64_RAND_V2(1) } }, \ { /* => */ { FP64_QNAN_V0(0), FP64_RAND_V1(0), FP64_RAND_V0(0), FP64_RAND_V2(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, SNan (Masked). */ \ { { /*src2 */ { FP64_QNAN(0), FP64_RAND_V1(0), FP64_RAND_V3(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_MAX(0), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, \ { /* => */ { FP64_QNAN_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_V0(0), FP64_RAND_V1(1), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, \ { /*src1 */ { FP64_SNAN_MAX(0), FP64_RAND_V3(0), FP64_RAND_V3(0), FP64_RAND_V2(1) } }, \ { /* => */ { FP64_QNAN_V0(0), FP64_RAND_V3(0), FP64_RAND_V3(0), FP64_RAND_V2(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, QNan (Masked). */ \ { { /*src2 */ { FP64_SNAN(0), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, \ { /* => */ { FP64_SNAN(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN(0), FP64_RAND_V1(1), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, \ { /*src1 */ { FP64_QNAN_MAX(0), FP64_RAND_V2(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, \ { /* => */ { FP64_SNAN(0), FP64_RAND_V2(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN_V1(0), FP64_RAND_V1(1), FP64_RAND_V0(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_QNAN_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V2(1) } }, \ { /* => */ { FP64_SNAN_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V2(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, SNan (Masked). */ \ { { /*src2 */ { FP64_SNAN(0), FP64_RAND_V1(1), FP64_RAND_V0(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, \ { /* => */ { FP64_SNAN(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN(0), FP64_RAND_V1(0), FP64_RAND_V0(1), FP64_RAND_V2(1) } }, \ { /*src1 */ { FP64_SNAN_MAX(0), FP64_RAND_V0(0), FP64_RAND_V3(0), FP64_RAND_V0(1) } }, \ { /* => */ { FP64_SNAN(0), FP64_RAND_V0(0), FP64_RAND_V3(0), FP64_RAND_V0(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN_V1(0), FP64_RAND_V1(1), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_SNAN_V2(0), FP64_RAND_V2(1), FP64_RAND_V3(1), FP64_RAND_V1(1) } }, \ { /* => */ { FP64_SNAN_V1(0), FP64_RAND_V2(1), FP64_RAND_V3(1), FP64_RAND_V1(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, Normal (Masked). */ \ { { /*src2 */ { FP64_QNAN(0), FP64_RAND_V3(1), FP64_RAND_V2(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_1(0), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, Normal (Masked). */ \ { { /*src2 */ { FP64_SNAN(1), FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_1(0), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, \ { /* => */ { FP64_SNAN(1), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, \ /*mxcsr:in */ X86_MXCSR_XCPT_MASK, \ /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, QNan (Unmasked). */ \ /* 0*/{ { /*src2 */ { FP64_QNAN(0), FP64_RAND_V2(0), FP64_RAND_V0(1), FP64_RAND_V1(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_MAX(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V3(1) } }, \ { /* => */ { FP64_QNAN_MAX(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V3(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_V0(0), FP64_RAND_V0(1), FP64_RAND_V0(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_QNAN_MAX(0), FP64_RAND_V1(0), FP64_RAND_V0(0), FP64_RAND_V2(1) } }, \ { /* => */ { FP64_QNAN_V0(0), FP64_RAND_V1(0), FP64_RAND_V0(0), FP64_RAND_V2(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, SNan (Unmasked). */ \ { { /*src2 */ { FP64_QNAN(0), FP64_RAND_V1(0), FP64_RAND_V3(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, \ { /* => */ { FP64_QNAN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_MAX(0), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, \ { /* => */ { FP64_QNAN_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_QNAN_V0(0), FP64_RAND_V1(1), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, \ { /*src1 */ { FP64_SNAN_MAX(0), FP64_RAND_V3(0), FP64_RAND_V3(0), FP64_RAND_V2(1) } }, \ { /* => */ { FP64_QNAN_V0(0), FP64_RAND_V3(0), FP64_RAND_V3(0), FP64_RAND_V2(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, QNan (Unmasked). */ \ { { /*src2 */ { FP64_SNAN(0), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, \ { /*src1 */ { FP64_QNAN(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, \ { /* => */ { FP64_SNAN(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, \ /*mxcsr:in */ X86_MXCSR_FZ, \ /*128:out */ X86_MXCSR_FZ | X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN(0), FP64_RAND_V1(1), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, \ { /*src1 */ { FP64_QNAN_MAX(0), FP64_RAND_V2(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, \ { /* => */ { FP64_SNAN(0), FP64_RAND_V2(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN_V1(0), FP64_RAND_V1(1), FP64_RAND_V0(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_QNAN_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V2(1) } }, \ { /* => */ { FP64_SNAN_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V2(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, SNan (Unmasked). */ \ { { /*src2 */ { FP64_SNAN(0), FP64_RAND_V1(1), FP64_RAND_V0(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_SNAN(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, \ { /* => */ { FP64_SNAN(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN(0), FP64_RAND_V1(0), FP64_RAND_V0(1), FP64_RAND_V2(1) } }, \ { /*src1 */ { FP64_SNAN_MAX(0), FP64_RAND_V0(0), FP64_RAND_V3(0), FP64_RAND_V0(1) } }, \ { /* => */ { FP64_SNAN(0), FP64_RAND_V0(0), FP64_RAND_V3(0), FP64_RAND_V0(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ { { /*src2 */ { FP64_SNAN_V1(0), FP64_RAND_V1(1), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_SNAN_V2(0), FP64_RAND_V2(1), FP64_RAND_V3(1), FP64_RAND_V1(1) } }, \ { /* => */ { FP64_SNAN_V1(0), FP64_RAND_V2(1), FP64_RAND_V3(1), FP64_RAND_V1(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* QNan, Normal (Unmasked). */ \ { { /*src2 */ { FP64_QNAN(0), FP64_RAND_V3(1), FP64_RAND_V2(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_1(0), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, \ { /* => */ { FP64_QNAN(0), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /* SNan, Normal (Unmasked). */ \ { { /*src2 */ { FP64_SNAN(1), FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V2(0) } }, \ { /*src1 */ { FP64_1(0), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, \ { /* => */ { FP64_SNAN(1), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, \ /*mxcsr:in */ 0, \ /*128:out */ X86_MXCSR_IE, \ /*256:out */ -1 }, \ /** * Returns the name of an X86 exception given the vector. * * @returns Name of the exception. * @param uVector The exception vector. */ static const char BS3_FAR *bs3CpuInstr4XcptName(uint8_t uVector) { switch (uVector) { case X86_XCPT_DE: return "#DE"; case X86_XCPT_DB: return "#DB"; case X86_XCPT_NMI: return "#NMI"; case X86_XCPT_BP: return "#BP"; case X86_XCPT_OF: return "#OF"; case X86_XCPT_BR: return "#BR"; case X86_XCPT_UD: return "#UD"; case X86_XCPT_NM: return "#NM"; case X86_XCPT_DF: return "#DF"; case X86_XCPT_CO_SEG_OVERRUN: return "#CO_SEG_OVERRUN"; case X86_XCPT_TS: return "#TS"; case X86_XCPT_NP: return "#NP"; case X86_XCPT_SS: return "#SS"; case X86_XCPT_GP: return "#GP"; case X86_XCPT_PF: return "#PF"; case X86_XCPT_MF: return "#MF"; case X86_XCPT_AC: return "#AC"; case X86_XCPT_MC: return "#MC"; case X86_XCPT_XF: return "#XF"; case X86_XCPT_VE: return "#VE"; case X86_XCPT_CP: return "#CP"; case X86_XCPT_VC: return "#VC"; case X86_XCPT_SX: return "#SX"; } return "UNKNOWN"; } DECL_FORCE_INLINE(bool) bs3CpuInstr4IsSse(uint8_t enmType) { return enmType >= T_SSE && enmType < T_AVX_128; } DECL_FORCE_INLINE(bool) bs3CpuInstr4IsAvx(uint8_t enmType) { return enmType >= T_AVX_128; } DECL_FORCE_INLINE(uint8_t) bs3CpuInstr4GetOperandSize(uint8_t enmType) { return enmType < T_128BITS ? 64/8 : enmType < T_256BITS ? 128/8 : 256/8; } /** * Gets the names of floating-point exception flags that are set for a given MXCSR. * * @returns Names of floating-point exception flags that are set. * @param pszBuf Where to store the floating-point exception flags. * @param cchBuf The size of the buffer. * @param uMxCsr The MXCSR value. */ static size_t bs3CpuInstr4GetXcptFlags(char BS3_FAR *pszBuf, size_t cchBuf, uint32_t uMxCsr) { BS3_ASSERT(cchBuf >= FP_XCPT_FLAGS_NAMES_MAXLEN); return Bs3StrPrintf(pszBuf, cchBuf, "%s%s%s%s%s%s", uMxCsr & X86_MXCSR_IE ? " IE" : "", uMxCsr & X86_MXCSR_DE ? " DE" : "", uMxCsr & X86_MXCSR_ZE ? " ZE" : "", uMxCsr & X86_MXCSR_OE ? " OE" : "", uMxCsr & X86_MXCSR_UE ? " UE" : "", uMxCsr & X86_MXCSR_PE ? " PE" : ""); } /** * Gets the names of floating-point exception mask that are set for a given MXCSR. * * @returns Names of floating-point exception flags that are set. * @param pszBuf Where to store the floating-point exception flags. * @param cchBuf The size of the buffer. * @param uMxCsr The MXCSR value. */ static size_t bs3CpuInstr4GetXcptMasks(char BS3_FAR *pszBuf, size_t cchBuf, uint32_t uMxCsr) { BS3_ASSERT(cchBuf >= FP_XCPT_MASKS_NAMES_MAXLEN); return Bs3StrPrintf(pszBuf, cchBuf, "%s%s%s%s%s%s", uMxCsr & X86_MXCSR_IM ? " IM" : "", uMxCsr & X86_MXCSR_DM ? " DM" : "", uMxCsr & X86_MXCSR_ZM ? " ZM" : "", uMxCsr & X86_MXCSR_OM ? " OM" : "", uMxCsr & X86_MXCSR_UM ? " UM" : "", uMxCsr & X86_MXCSR_PM ? " PM" : ""); } /** * Gets the names of floating-point bits other than flags and masks that are set for * a given MXCSR. * * @returns Names of floating-point exception flags that are set. * @param pszBuf Where to store the floating-point exception flags. * @param cchBuf The size of the buffer. * @param uMxCsr The MXCSR value. */ static size_t bs3CpuInstr4GetXcptOthers(char BS3_FAR *pszBuf, size_t cchBuf, uint32_t uMxCsr) { uint32_t const fMxCsrRc = uMxCsr & X86_MXCSR_RC_MASK; BS3_ASSERT(cchBuf >= FP_XCPT_OTHERS_NAMES_MAXLEN); return Bs3StrPrintf(pszBuf, cchBuf, "%s%s%s%s", uMxCsr & X86_MXCSR_DAZ ? " DAZ" : "", uMxCsr & X86_MXCSR_FZ ? " FZ" : "", uMxCsr & X86_MXCSR_MM ? " MM" : "", fMxCsrRc == X86_MXCSR_RC_NEAREST ? " RC=NEAREST" : fMxCsrRc == X86_MXCSR_RC_DOWN ? " RC=DOWN" : fMxCsrRc == X86_MXCSR_RC_UP ? " RC=UP" : fMxCsrRc == X86_MXCSR_RC_ZERO ? " RC=ZERO" : ""); } /** * Reconfigures the execution environment according to @a pConfig. * * Call bs3CpuInstrXConfigRestore to undo the changes. * * @returns true on success, false if the configuration cannot be applied. In * the latter case, no context changes are made. * @param pSavedCfg Where to save state we modify. * @param pCtx The register context to modify. * @param pExtCtx The extended register context to modify. * @param pConfig The configuration to apply. * @param bMode The target mode. */ static bool bs3CpuInstr4ConfigReconfigure(PBS3CPUINSTRX_CONFIG_SAVED_T pSavedCfg, PBS3REGCTX pCtx, PBS3EXTCTX pExtCtx, PCBS3CPUINSTR4_CONFIG_T pConfig, uint8_t bMode) { /* * Save context bits we may change here */ pSavedCfg->uCr0 = pCtx->cr0.u32; pSavedCfg->uCr4 = pCtx->cr4.u32; pSavedCfg->uEfl = pCtx->rflags.u32; pSavedCfg->uFcw = Bs3ExtCtxGetFcw(pExtCtx); pSavedCfg->uFsw = Bs3ExtCtxGetFsw(pExtCtx); pSavedCfg->uMxCsr = Bs3ExtCtxGetMxCsr(pExtCtx); /* * Can we make these changes? */ if (pConfig->fMxCsrMM && !g_fAmdMisalignedSse) return false; /* * Modify the test context. */ if (pConfig->fCr0Mp) pCtx->cr0.u32 |= X86_CR0_MP; else pCtx->cr0.u32 &= ~X86_CR0_MP; if (pConfig->fCr0Em) pCtx->cr0.u32 |= X86_CR0_EM; else pCtx->cr0.u32 &= ~X86_CR0_EM; if (pConfig->fCr0Ts) pCtx->cr0.u32 |= X86_CR0_TS; else pCtx->cr0.u32 &= ~X86_CR0_TS; if (pConfig->fCr4OsFxSR) pCtx->cr4.u32 |= X86_CR4_OSFXSR; else pCtx->cr4.u32 &= ~X86_CR4_OSFXSR; if (pConfig->fCr4OsXmmExcpt && g_afTypeSupports[T_SSE]) pCtx->cr4.u32 |= X86_CR4_OSXMMEEXCPT; else pCtx->cr4.u32 &= ~X86_CR4_OSXMMEEXCPT; if (pConfig->fCr4OsFxSR) pCtx->cr4.u32 |= X86_CR4_OSFXSR; else pCtx->cr4.u32 &= ~X86_CR4_OSFXSR; if (pConfig->fCr4OsXSave) pCtx->cr4.u32 |= X86_CR4_OSXSAVE; else pCtx->cr4.u32 &= ~X86_CR4_OSXSAVE; if (pConfig->fXcr0Sse) pExtCtx->fXcr0Saved |= XSAVE_C_SSE; else pExtCtx->fXcr0Saved &= ~XSAVE_C_SSE; if (pConfig->fXcr0Avx && g_afTypeSupports[T_AVX_256]) pExtCtx->fXcr0Saved |= XSAVE_C_YMM; else pExtCtx->fXcr0Saved &= ~XSAVE_C_YMM; if (pConfig->fAlignCheck) { pCtx->rflags.u32 |= X86_EFL_AC; pCtx->cr0.u32 |= X86_CR0_AM; } else { pCtx->rflags.u32 &= ~X86_EFL_AC; pCtx->cr0.u32 &= ~X86_CR0_AM; } /** @todo Can we remove this? x87 FPU and SIMD are independent. */ Bs3ExtCtxSetFsw(pExtCtx, pSavedCfg->uFsw & ~(X86_FSW_ES | X86_FSW_B)); if (pConfig->fMxCsrMM) Bs3ExtCtxSetMxCsr(pExtCtx, pSavedCfg->uMxCsr | X86_MXCSR_MM); else Bs3ExtCtxSetMxCsr(pExtCtx, pSavedCfg->uMxCsr & ~X86_MXCSR_MM); return true; } /** * Undoes changes made by bs3CpuInstr4ConfigReconfigure. */ static void bs3CpuInstrXConfigRestore(PCBS3CPUINSTRX_CONFIG_SAVED_T pSavedCfg, PBS3REGCTX pCtx, PBS3EXTCTX pExtCtx) { pCtx->cr0.u32 = pSavedCfg->uCr0; pCtx->cr4.u32 = pSavedCfg->uCr4; pCtx->rflags.u32 = pSavedCfg->uEfl; pExtCtx->fXcr0Saved = pExtCtx->fXcr0Nominal; Bs3ExtCtxSetFcw(pExtCtx, pSavedCfg->uFcw); Bs3ExtCtxSetFsw(pExtCtx, pSavedCfg->uFsw); Bs3ExtCtxSetMxCsr(pExtCtx, pSavedCfg->uMxCsr); } /** * Allocates three extended CPU contexts and initializes the first one * with random data. * @returns First extended context, initialized with randomish data. NULL on * failure (complained). * @param ppExtCtx2 Where to return the 2nd context. */ static PBS3EXTCTX bs3CpuInstrXAllocExtCtxs(PBS3EXTCTX BS3_FAR *ppExtCtx2) { /* Allocate extended context structures. */ uint64_t fFlags; uint16_t cb = Bs3ExtCtxGetSize(&fFlags); PBS3EXTCTX pExtCtx1 = Bs3MemAlloc(BS3MEMKIND_TILED, cb * 2); PBS3EXTCTX pExtCtx2 = (PBS3EXTCTX)((uint8_t BS3_FAR *)pExtCtx1 + cb); if (pExtCtx1) { Bs3ExtCtxInit(pExtCtx1, cb, fFlags); /** @todo populate with semi-random stuff. */ Bs3ExtCtxInit(pExtCtx2, cb, fFlags); *ppExtCtx2 = pExtCtx2; return pExtCtx1; } Bs3TestFailedF("Bs3MemAlloc(tiled,%#x)", cb * 2); *ppExtCtx2 = NULL; return NULL; } /** * Frees the extended CPU contexts allocated by bs3CpuInstrXAllocExtCtxs. * * @param pExtCtx1 The first extended context. * @param pExtCtx2 The second extended context. */ static void bs3CpuInstrXFreeExtCtxs(PBS3EXTCTX pExtCtx1, PBS3EXTCTX BS3_FAR pExtCtx2) { RT_NOREF_PV(pExtCtx2); Bs3MemFree(pExtCtx1, pExtCtx1->cb * 2); } /** * Sets up SSE and AVX bits relevant for FPU instructions. */ static void bs3CpuInstr4SetupSseAndAvx(PBS3REGCTX pCtx, PCBS3EXTCTX pExtCtx) { /* CR0: */ uint32_t cr0 = Bs3RegGetCr0(); cr0 &= ~(X86_CR0_TS | X86_CR0_MP | X86_CR0_EM); cr0 |= X86_CR0_NE; Bs3RegSetCr0(cr0); /* If real mode context, the cr0 value will differ from the current one (we're in PE32 mode). */ pCtx->cr0.u32 &= ~(X86_CR0_TS | X86_CR0_MP | X86_CR0_EM); pCtx->cr0.u32 |= X86_CR0_NE; /* CR4: */ BS3_ASSERT( pExtCtx->enmMethod == BS3EXTCTXMETHOD_FXSAVE || pExtCtx->enmMethod == BS3EXTCTXMETHOD_XSAVE); { uint32_t cr4 = Bs3RegGetCr4(); if (pExtCtx->enmMethod == BS3EXTCTXMETHOD_XSAVE) { cr4 |= X86_CR4_OSFXSR | X86_CR4_OSXMMEEXCPT | X86_CR4_OSXSAVE; Bs3RegSetCr4(cr4); Bs3RegSetXcr0(pExtCtx->fXcr0Nominal); } else if (pExtCtx->enmMethod == BS3EXTCTXMETHOD_FXSAVE) { cr4 |= X86_CR4_OSFXSR | X86_CR4_OSXMMEEXCPT; Bs3RegSetCr4(cr4); } pCtx->cr4.u32 = cr4; } } /** * Configures the buffer with electric fences in paged modes. * * @returns Adjusted buffer pointer. * @param pbBuf The buffer pointer. * @param pcbBuf Pointer to the buffer size (input & output). * @param bMode The testing target mode. */ DECLINLINE(uint8_t BS3_FAR *) bs3CpuInstrXBufSetup(uint8_t BS3_FAR *pbBuf, uint32_t *pcbBuf, uint8_t bMode) { if (BS3_MODE_IS_PAGED(bMode)) { int rc; uint32_t cbBuf = *pcbBuf; Bs3PagingProtectPtr(&pbBuf[0], X86_PAGE_SIZE, 0, X86_PTE_P); Bs3PagingProtectPtr(&pbBuf[cbBuf - X86_PAGE_SIZE], X86_PAGE_SIZE, 0, X86_PTE_P); pbBuf += X86_PAGE_SIZE; cbBuf -= X86_PAGE_SIZE * 2; *pcbBuf = cbBuf; g_pbBufAlias = g_pbBufAliasAlloc; rc = Bs3PagingAlias((uintptr_t)g_pbBufAlias, (uintptr_t)pbBuf, cbBuf + X86_PAGE_SIZE, /* must include the tail guard pg */ X86_PTE_P | X86_PTE_A | X86_PTE_D | X86_PTE_RW); if (RT_FAILURE(rc)) Bs3TestFailedF("Bs3PagingAlias failed on %p/%p LB %#x: %d", g_pbBufAlias, pbBuf, cbBuf, rc); } else g_pbBufAlias = pbBuf; return pbBuf; } /** * Undoes what bs3CpuInstrXBufSetup did. * * @param pbBuf The buffer pointer. * @param cbBuf The buffer size. * @param bMode The testing target mode. */ DECLINLINE(void) bs3CpuInstrXBufCleanup(uint8_t BS3_FAR *pbBuf, uint32_t cbBuf, uint8_t bMode) { if (BS3_MODE_IS_PAGED(bMode)) { Bs3PagingProtectPtr(&pbBuf[-X86_PAGE_SIZE], X86_PAGE_SIZE, X86_PTE_P, 0); Bs3PagingProtectPtr(&pbBuf[cbBuf], X86_PAGE_SIZE, X86_PTE_P, 0); } } /** * Gets a buffer of a @a cbMemOp sized operand according to the given * configuration and alignment restrictions. * * @returns Pointer to the buffer. * @param pbBuf The buffer pointer. * @param cbBuf The buffer size. * @param cbMemOp The operand size. * @param cbAlign The operand alignment restriction. * @param pConfig The configuration. * @param fPageFault The \#PF test setting. */ DECLINLINE(uint8_t BS3_FAR *) bs3CpuInstrXBufForOperand(uint8_t BS3_FAR *pbBuf, uint32_t cbBuf, uint8_t cbMemOp, uint8_t cbAlign, PCBS3CPUINSTR4_CONFIG_T pConfig, unsigned fPageFault) { /* All allocations are at the tail end of the buffer, so that we've got a guard page following the operand. When asked to consistently trigger a #PF, we slide the buffer into that guard page. */ if (fPageFault) cbBuf += X86_PAGE_SIZE; if (pConfig->fAligned) { if (!pConfig->fAlignCheck) return &pbBuf[cbBuf - cbMemOp]; return &pbBuf[cbBuf - cbMemOp - cbAlign]; } return &pbBuf[cbBuf - cbMemOp - 1]; } /** * Determines the size of memory operands. */ DECLINLINE(uint8_t) bs3CpuInstrXMemOpSize(uint8_t cbOperand, uint8_t enmRm) { if (enmRm <= RM_MEM) return cbOperand; if (enmRm == RM_MEM8) return sizeof(uint8_t); if (enmRm == RM_MEM16) return sizeof(uint16_t); if (enmRm == RM_MEM32) return sizeof(uint32_t); if (enmRm == RM_MEM64) return sizeof(uint64_t); BS3_ASSERT(0); return cbOperand; } #include #include DECLINLINE(uint32_t) bs3CpuInstrX_SimpleRand(void) { /* * A simple Lehmer linear congruential pseudo-random number * generator using the constants suggested by Park & Miller: * * modulus = 2^31 - 1 (INT32_MAX) * multiplier = 7^5 (16807) * * It produces numbers in the range [1..INT32_MAX-1] and is * more chaotic in the higher bits. * * Note! Runtime/common/rand/randparkmiller.cpp is also use this algorithm, * though the zero handling is different. */ static uint32_t s_uSeedMemory = 0; uint32_t uVal = s_uSeedMemory; if (!uVal) { uVal = (uint32_t)ASMReadTSC(); Bs3TestPrintf("PRNG initial seed: 0x%08lx\n", uVal); } uVal = ASMModU64ByU32RetU32(ASMMult2xU32RetU64(uVal, 16807), INT32_MAX); s_uSeedMemory = uVal; return uVal; } /* * Code to make testing the tests faster. `bs3CpuInstrX_SkipIt()' randomly * skips a fraction of the micro-tests. It is sufficiently random that * over a large number of runs, all micro-tests will be hit. * * Full test runs take ever longer as we add more instructions and fancier * ways of testing them. In one example scenario, a debug build running * bs3-cpu-instr-3 under interpreted IEM went from 9000 to 800 seconds, * with BS3_SKIPIT_AVG_SKIP on the default 26. * * To activate this 'developer's speed-testing mode', turn on * `#define BS3_SKIPIT_DO_SKIP' here. * * BS3_SKIPIT_AVG_SKIP governs approximately how many micro-tests are * skipped in a row; e.g. the default of 26 means that on average, every * 26th micro-test is run during a particular test run. (This is not 26x * faster, due to other activities which are not skipped!) Note this is * only an average; the actual skips are random. * * You can also modify bs3CpuInstrX_SkipIt() to focus on specific sub-tests, * using its (currently ignored) `bRing, iCfg, iTest, iVal, iVariant' args * (to enable this: turn on `#define BS3_SKIPIT_DO_ARGS': which costs about * 3% performance). * * Note! For testing the native recompiler, configure the VM to invoke * native recompilation quickly with: * * VBoxManage setextradata vmname VBoxInternal/Devices/VMMDev/0/Config/TestingEnabled 1 * VBoxManage setextradata vmname VBoxInternal/Devices/VMMDev/0/Config/TestingThresholdNativeRecompiler 2 * VBoxManage setextradata vmname VBoxInternal/IEM/NativeRecompileAtUsedCount 1 */ #define BS3_SKIPIT_AVG_SKIP 26 #define BS3_SKIPIT_REPORT_COUNT 1000000 #undef BS3_SKIPIT_DO_SKIP #undef BS3_SKIPIT_DO_ARGS #ifdef DEBUG_ramshankar # undef BS3_SKIPIT_DO_SKIP # define BS3_SKIPIT_DO_SKIP # undef BS3_SKIPIT_AVG_SKIP # define BS3_SKIPIT_AVG_SKIP 80 #endif #ifndef BS3_SKIPIT_DO_SKIP # define BS3_SKIPIT(bRing, iCfg, iTest, iVal, iVariant) (false) #else static unsigned g_cSeen, g_cSkipped; static void bs3CpuInstrX_ShowTallies(void) { Bs3TestPrintf("Micro-tests %d: tested %d / skipped %d\n", g_cSeen, g_cSeen - g_cSkipped, g_cSkipped); } # ifdef BS3_SKIPIT_DO_ARGS # define BS3_SKIPIT(bRing, iCfg, iTest, iVal, iVariant) bs3CpuInstrX_SkipIt(bRing, iCfg, iTest, iVal, iVariant) static bool bs3CpuInstrX_SkipIt(uint8_t bRing, unsigned iCfg, unsigned iTest, unsigned iVal, unsigned iVariant) # else # define BS3_SKIPIT(bRing, iCfg, iTest, iVal, iVariant) bs3CpuInstrX_SkipIt() static bool bs3CpuInstrX_SkipIt(void) # endif { static unsigned s_uTimes = 0; bool fSkip; /* Cache calls to the relatively expensive random routine */ if (!s_uTimes) s_uTimes = bs3CpuInstrX_SimpleRand() % (BS3_SKIPIT_AVG_SKIP * 2 + 1) + 1; fSkip = --s_uTimes > 0; if (fSkip) ++g_cSkipped; if (++g_cSeen % BS3_SKIPIT_REPORT_COUNT == 0) bs3CpuInstrX_ShowTallies(); return fSkip; } #endif /* BS3_SKIPIT_DO_SKIP */ /* * Test type #1. * Generic YMM registers. */ typedef struct BS3CPUINSTR4_TEST1_VALUES_T { X86YMMREG uSrc2; /**< Second source operand. */ X86YMMREG uSrc1; /**< uDstIn for SSE */ X86YMMREG uDstOut; /**< Destination output. */ uint32_t uMxCsr; /**< MXCSR to set prior to executing the instruction. */ uint32_t u128ExpectedMxCsr; /**< Expected MXCSR for a 128-bit instruction. */ uint32_t u256ExpectedMxCsr; /**< Expected MXCSR for a 256-bit instructions. */ uint8_t afPadding[2]; /**< Alignment padding. */ } BS3CPUINSTR4_TEST1_VALUES_T; /* * Test type #1. * Packed single-precision. */ typedef struct BS3CPUINSTR4_TEST1_VALUES_PS_T { X86YMMFLOATPSREG uSrc2; /**< Second source operand. */ X86YMMFLOATPSREG uSrc1; /**< uDstIn for SSE */ X86YMMFLOATPSREG uDstOut; /**< Destination output. */ uint32_t uMxCsr; /**< MXCSR to set prior to executing the instruction. */ uint32_t u128ExpectedMxCsr; /**< Expected MXCSR for a 128-bit instruction. */ uint32_t u256ExpectedMxCsr; /**< Expected MXCSR for a 256-bit instructions. */ uint8_t afPadding[2]; /**< Alignment padding. */ } BS3CPUINSTR4_TEST1_VALUES_PS_T; AssertCompile(sizeof(BS3CPUINSTR4_TEST1_VALUES_PS_T) == sizeof(BS3CPUINSTR4_TEST1_VALUES_T)); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, uSrc2, BS3CPUINSTR4_TEST1_VALUES_T, uSrc2); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, uSrc1, BS3CPUINSTR4_TEST1_VALUES_T, uSrc1); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, uDstOut, BS3CPUINSTR4_TEST1_VALUES_T, uDstOut); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, uMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, uMxCsr); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, u128ExpectedMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, u128ExpectedMxCsr); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PS_T, u256ExpectedMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, u256ExpectedMxCsr); /* * Test type #1. * Packed double-precision. */ typedef struct BS3CPUINSTR4_TEST1_VALUES_PD_T { X86YMMFLOATPDREG uSrc2; /**< Second source operand. */ X86YMMFLOATPDREG uSrc1; /**< uDstIn for SSE */ X86YMMFLOATPDREG uDstOut; /**< Destination output. */ uint32_t uMxCsr; /**< MXCSR to set prior to executing the instruction. */ uint32_t u128ExpectedMxCsr; /**< Expected MXCSR for a 128-bit instruction. */ uint32_t u256ExpectedMxCsr; /**< Expected MXCSR for a 256-bit instructions. */ uint8_t afPadding[2]; /**< Alignment padding. */ } BS3CPUINSTR4_TEST1_VALUES_PD_T; AssertCompile(sizeof(BS3CPUINSTR4_TEST1_VALUES_PD_T) == sizeof(BS3CPUINSTR4_TEST1_VALUES_T)); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, uSrc2, BS3CPUINSTR4_TEST1_VALUES_T, uSrc2); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, uSrc1, BS3CPUINSTR4_TEST1_VALUES_T, uSrc1); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, uDstOut, BS3CPUINSTR4_TEST1_VALUES_T, uDstOut); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, uMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, uMxCsr); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, u128ExpectedMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, u128ExpectedMxCsr); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_PD_T, u256ExpectedMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, u256ExpectedMxCsr); /* * Test type #1. * Scalar single-precision. */ typedef struct BS3CPUINSTR4_TEST1_VALUES_SS_T { X86YMMFLOATSSREG uSrc2; /**< Second source operand. */ X86YMMFLOATSSREG uSrc1; /**< uDstIn for SSE */ X86YMMFLOATSSREG uDstOut; /**< Destination output. */ uint32_t uMxCsr; /**< MXCSR to set prior to executing the instruction. */ uint32_t u128ExpectedMxCsr; /**< Expected MXCSR for a 128-bit instruction. */ uint32_t u256ExpectedMxCsr; /**< Expected MXCSR for a 256-bit instructions. */ uint8_t afPadding[2]; /**< Alignment padding. */ } BS3CPUINSTR4_TEST1_VALUES_SS_T; AssertCompile(sizeof(BS3CPUINSTR4_TEST1_VALUES_SS_T) == sizeof(BS3CPUINSTR4_TEST1_VALUES_T)); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SS_T, uSrc2, BS3CPUINSTR4_TEST1_VALUES_T, uSrc2); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SS_T, uSrc1, BS3CPUINSTR4_TEST1_VALUES_T, uSrc1); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SS_T, uDstOut, BS3CPUINSTR4_TEST1_VALUES_T, uDstOut); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SS_T, uMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, uMxCsr); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SS_T, u128ExpectedMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, u128ExpectedMxCsr); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SS_T, u256ExpectedMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, u256ExpectedMxCsr); /* * Test type #1. * Scalar double-precision. */ typedef struct BS3CPUINSTR4_TEST1_VALUES_SD_T { X86YMMFLOATSDREG uSrc2; /**< Second source operand. */ X86YMMFLOATSDREG uSrc1; /**< uDstIn for SSE */ X86YMMFLOATSDREG uDstOut; /**< Destination output. */ uint32_t uMxCsr; /**< MXCSR to set prior to executing the instruction. */ uint32_t u128ExpectedMxCsr; /**< Expected MXCSR for a 128-bit instruction. */ uint32_t u256ExpectedMxCsr; /**< Expected MXCSR for a 256-bit instructions. */ uint8_t afPadding[2]; /**< Alignment padding. */ } BS3CPUINSTR4_TEST1_VALUES_SD_T; AssertCompile(sizeof(BS3CPUINSTR4_TEST1_VALUES_SD_T) == sizeof(BS3CPUINSTR4_TEST1_VALUES_T)); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SD_T, uSrc2, BS3CPUINSTR4_TEST1_VALUES_T, uSrc2); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SD_T, uSrc1, BS3CPUINSTR4_TEST1_VALUES_T, uSrc1); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SD_T, uDstOut, BS3CPUINSTR4_TEST1_VALUES_T, uDstOut); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SD_T, uMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, uMxCsr); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SD_T, u128ExpectedMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, u128ExpectedMxCsr); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SD_T, u256ExpectedMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, u256ExpectedMxCsr); /* * Test type #1. * Scalar quadruple-precision. */ typedef struct BS3CPUINSTR4_TEST1_VALUES_SQ_T { X86YMMFLOATSQREG uSrc2; /**< Second source operand. */ X86YMMFLOATSQREG uSrc1; /**< uDstIn for SSE */ X86YMMFLOATSQREG uDstOut; /**< Destination output. */ uint32_t uMxCsr; /**< MXCSR to set prior to executing the instruction. */ uint32_t u128ExpectedMxCsr; /**< Expected MXCSR for a 128-bit instruction. */ uint32_t u256ExpectedMxCsr; /**< Expected MXCSR for a 256-bit instructions. */ uint8_t afPadding[2]; /**< Alignment padding. */ } BS3CPUINSTR4_TEST1_VALUES_SQ_T; AssertCompile(sizeof(BS3CPUINSTR4_TEST1_VALUES_SQ_T) == sizeof(BS3CPUINSTR4_TEST1_VALUES_T)); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, uSrc2, BS3CPUINSTR4_TEST1_VALUES_T, uSrc2); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, uSrc1, BS3CPUINSTR4_TEST1_VALUES_T, uSrc1); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, uDstOut, BS3CPUINSTR4_TEST1_VALUES_T, uDstOut); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, uMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, uMxCsr); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, u128ExpectedMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, u128ExpectedMxCsr); AssertCompileMembersSameSizeAndOffset(BS3CPUINSTR4_TEST1_VALUES_SQ_T, u256ExpectedMxCsr, BS3CPUINSTR4_TEST1_VALUES_T, u256ExpectedMxCsr); typedef struct BS3CPUINSTR4_TEST1_T { FPFNBS3FAR pfnWorker; /**< Test function worker. */ uint8_t bAvxMisalignXcpt; /**< AVX misalignment exception. */ uint8_t enmRm; /**< R/M type. */ uint8_t enmType; /**< CPU instruction type (see T_XXX). */ uint8_t iRegDst; /**< Index of destination register, UINT8_MAX if N/A. */ uint8_t iRegSrc1; /**< Index of first source register, UINT8_MAX if N/A. */ uint8_t iRegSrc2; /**< Index of second source register, UINT8_MAX if N/A. */ uint8_t cValues; /**< Number of test values in @c paValues. */ BS3CPUINSTR4_TEST1_VALUES_T const BS3_FAR *paValues; /**< Test values. */ } BS3CPUINSTR4_TEST1_T; typedef struct BS3CPUINSTR4_TEST1_MODE_T { BS3CPUINSTR4_TEST1_T const BS3_FAR *paTests; unsigned cTests; } BS3CPUINSTR4_TEST1_MODE_T; /** Initializer for a BS3CPUINSTR4_TEST1_MODE_T array (three entries). */ #define BS3CPUINSTR4_TEST1_MODES_INIT(a_aTests16, a_aTests32, a_aTests64) \ { { a_aTests16, RT_ELEMENTS(a_aTests16) }, { a_aTests32, RT_ELEMENTS(a_aTests32) }, { a_aTests64, RT_ELEMENTS(a_aTests64) } } typedef struct BS3CPUINSTR4_TEST1_CTX_T { BS3CPUINSTR4_CONFIG_T const BS3_FAR *pConfig; /**< The test execution environment configuration. */ BS3CPUINSTR4_TEST1_T const BS3_FAR *pTest; /**< The instruction being tested. */ unsigned iVal; /**< Which iteration of the test value is this. */ const char BS3_FAR *pszMode; /**< The testing mode (e.g. real, protected, paged and permutations). */ PBS3TRAPFRAME pTrapFrame; /**< The exception (trap) frame. */ PBS3REGCTX pCtx; /**< The general-purpose register context. */ PBS3EXTCTX pExtCtx; /**< The extended (FPU) register context. */ PBS3EXTCTX pExtCtxOut; /**< The output extended (FPU) register context. */ uint8_t BS3_FAR *puMemOp; /**< The memory operand buffer. */ uint8_t BS3_FAR *puMemOpAlias; /**< The memory operand alias buffer for comparing result. */ uint8_t cbMemOp; /**< Size of the memory operand (and alias) buffer in bytes. */ uint8_t cbOperand; /**< Size of the instruction operand (8 for MMX, 16 for SSE etc). */ uint8_t cbInstr; /**< Size of the instruction opcode. */ uint8_t bXcptExpect; /**< The expected exception while/after executing the instruction. */ uint16_t idTestStep; /**< The test iteration step. */ } BS3CPUINSTR4_TEST1_CTX_T; /** Pointer to a test 1 context. */ typedef BS3CPUINSTR4_TEST1_CTX_T BS3_FAR *PBS3CPUINSTR4_TEST1_CTX_T; /** * Constants used in test value definitions. These are extra bits which * can be set in the ':out' fields of a test value; stored in 'stolen' * bits from the real x86 MXCSR CPU register definition. * * 'BS3_MXCSR_?M_FIXED' bits prevent the mask randomizer from changing * the corresponding bit of the mask. These can be used to 'split' an * entry which produces different results under different masks, * allowing both sets of results to be properly tested. * * 'BS3_MXCSR_PE_FUZZY' marks test value entries which are considered * to have passed the test regardless of the value of X86_MXCSR_PE in * the result. Many, most, or possibly all instances of this represent * bugs in the test value definitions and/or the CPU emulator IEM; all * need further investigation. */ #define BS3_MXCSR_FIXED_SHIFT 11 #define BS3_MXCSR_FIXED_MASK (X86_MXCSR_XCPT_MASK << BS3_MXCSR_FIXED_SHIFT) #define BS3_MXCSR_IM_FIXED (X86_MXCSR_IM << BS3_MXCSR_FIXED_SHIFT) #define BS3_MXCSR_DM_FIXED (X86_MXCSR_DM << BS3_MXCSR_FIXED_SHIFT) #define BS3_MXCSR_ZM_FIXED (X86_MXCSR_ZM << BS3_MXCSR_FIXED_SHIFT) #define BS3_MXCSR_OM_FIXED (X86_MXCSR_OM << BS3_MXCSR_FIXED_SHIFT) #define BS3_MXCSR_UM_FIXED (X86_MXCSR_UM << BS3_MXCSR_FIXED_SHIFT) #define BS3_MXCSR_PM_FIXED (X86_MXCSR_PM << BS3_MXCSR_FIXED_SHIFT) #define BS3_MXCSR_PE_FUZZY RT_BIT_32(24) /* Confirm all bits we're 'stealing' are actually available */ AssertCompile(BS3_MXCSR_FIXED_MASK == BS3_MXCSR_IM_FIXED | BS3_MXCSR_DM_FIXED | BS3_MXCSR_ZM_FIXED | BS3_MXCSR_OM_FIXED | BS3_MXCSR_UM_FIXED | BS3_MXCSR_PM_FIXED); AssertCompile((X86_MXCSR_ZERO_MASK & BS3_MXCSR_FIXED_MASK) == BS3_MXCSR_FIXED_MASK); AssertCompile((X86_MXCSR_ZERO_MASK & BS3_MXCSR_PE_FUZZY) == BS3_MXCSR_PE_FUZZY); /* Confirm bits we're 'stealing' do not overlap each other */ AssertCompile((BS3_MXCSR_FIXED_MASK & BS3_MXCSR_PE_FUZZY) == 0); /** * Worker for bs3CpuInstr4_WorkerTestType1. */ static uint16_t bs3CpuInstr4_WorkerTestType1_Inner(uint8_t bMode, PBS3CPUINSTR4_TEST1_CTX_T pTestCtx, PCBS3CPUINSTRX_CONFIG_SAVED_T pSavedCfg) { BS3CPUINSTR4_TEST1_T const BS3_FAR *pTest = pTestCtx->pTest; BS3CPUINSTR4_TEST1_VALUES_T const BS3_FAR *pValues = &pTestCtx->pTest->paValues[pTestCtx->iVal]; PBS3TRAPFRAME pTrapFrame = pTestCtx->pTrapFrame; PBS3REGCTX pCtx = pTestCtx->pCtx; PBS3EXTCTX pExtCtx = pTestCtx->pExtCtx; PBS3EXTCTX pExtCtxOut = pTestCtx->pExtCtxOut; uint8_t BS3_FAR *puMemOp = pTestCtx->puMemOp; uint8_t BS3_FAR *puMemOpAlias = pTestCtx->puMemOpAlias; uint8_t cbMemOp = pTestCtx->cbMemOp; uint8_t const cbOperand = pTestCtx->cbOperand; uint8_t const cbInstr = ((uint8_t const BS3_FAR *)(uintptr_t)pTestCtx->pTest->pfnWorker)[-1]; uint8_t bXcptExpect = pTestCtx->bXcptExpect; uint8_t const bFpXcpt = pTestCtx->pConfig->fCr4OsXmmExcpt ? X86_XCPT_XF : X86_XCPT_UD; bool const fSseInstr = bs3CpuInstr4IsSse(pTest->enmType); uint32_t uMxCsr; X86YMMREG MemOpExpect; uint16_t cErrors; uint16_t cErrorsInit = Bs3TestSubErrorCount(); uint32_t uExpectedMxCsr; bool fFpXcptExpected; uint32_t uSpecifiedMask, uExpectedMask, uImpliedMask, uCombinedMask, uMaskedMask, uUnmaskedMask, uThisMask; uint32_t uExpectedMxCsr_orig, uExpectedExceptions, uExpectedUnmaskedExceptions, uInitialExceptions, uRandTmp; uint64_t uSeenMasks = 0; bool fFuzzyPE; uint32_t uForceOnMask, uForceOffMask; static const char * const s_apszMaskType[] = { "Specified", "Expected", "Implied", "Combined", "Masked", "Unmasked", "Random" }; unsigned iMaskType; /* * Different exceptions may be raised by the same instruction given a * particular set of 256-bit inputs vs. the lower 128-bits of the same * inputs. The test value tables therefore provide us with the exceptions * expected for each size. The tables give the maximum exceptions, as * would be raised when all exceptions are masked; the test worker then * varies the masking configuration and is able to derive the exceptions * which will be raised in each scenario. * * Certain instruction tests give different results with different masks, * beyond the scope of the test worker's knowledge. The test worker may * be instructed not to vary a specified set of masks for a particular * test; such tests should be duplicated in the test data, once for each * different set of fixed masks expected to give different results. See * the 'Denormals' section of instruction `addpd` for an example working. * This area is marked for further investigation. * * There is an additional 'fuzzy PE exception' flag which means that the * test worker will ignore the PE exception bit in the instruction results * (including whether or not a fault was raised). This exists due to * observed variable behavior in IEM, and even with physical hardware * in some instances. It is not meant to excuse the variable behavior * (particularly in IEM!), but to make it tolerable to run tests while the * known outage exists. This is marked for further investigation. */ /** @todo deeper / continued investigation of 'forced mask' situations */ /** @todo deeper investigation of 'fuzzy PE' situation */ if (pTestCtx->cbOperand > 16) uExpectedMxCsr = pValues->u256ExpectedMxCsr; else uExpectedMxCsr = pValues->u128ExpectedMxCsr; fFuzzyPE = (uExpectedMxCsr & BS3_MXCSR_PE_FUZZY) != 0; uExpectedMxCsr &= ~BS3_MXCSR_PE_FUZZY; uSpecifiedMask = pValues->uMxCsr & X86_MXCSR_XCPT_MASK; uForceOnMask = ((uExpectedMxCsr & BS3_MXCSR_FIXED_MASK) >> BS3_MXCSR_FIXED_SHIFT) & uSpecifiedMask; uForceOffMask = ((uExpectedMxCsr & BS3_MXCSR_FIXED_MASK) >> BS3_MXCSR_FIXED_SHIFT) & (~uSpecifiedMask); uExpectedMxCsr = ((uExpectedMxCsr & ~BS3_MXCSR_FIXED_MASK) | uForceOnMask) & ~uForceOffMask; uExpectedMxCsr_orig = uExpectedMxCsr; uInitialExceptions = pValues->uMxCsr & X86_MXCSR_XCPT_FLAGS; uExpectedMask = uExpectedMxCsr_orig & X86_MXCSR_XCPT_MASK; /* * The worker no longer insists that uSpecifiedMask == uExpectedMask. While * this is the usual state of affairs, a particular value entry could give * different input and output masks to intentionally force extra testing of * specific mask values. This shouldn't actually provide any benefit since * random masks will eventually (quickly -- in microseconds) hit all possible * combinations; but perhaps there is some reason to do it in some cases? * But in most cases, uSpecifiedMask, uExpectedMask, uImpliedMask, and * uCombinedMask will be identical; duplicates will be filtered out by the * uSeenMasks test. */ uImpliedMask = (uExpectedMxCsr_orig & X86_MXCSR_XCPT_FLAGS) << X86_MXCSR_XCPT_MASK_SHIFT; uCombinedMask = uSpecifiedMask | uImpliedMask; uMaskedMask = X86_MXCSR_XCPT_MASK; uUnmaskedMask = 0; /* * The test value tables give us the exceptions expected when run fully * masked. Here we try the instruction under multiple mask schemes: * as requested by the value table; as implied by the stated resulting * exceptions; fully masked; fully unmasked; with a random mask; with * random exceptions already turned on; both random mask & exceptions. */ for (iMaskType = 0; iMaskType < RT_ELEMENTS(s_apszMaskType); iMaskType++) { if (BS3_SKIPIT(0, 0, 0, pTestCtx->iVal, iMaskType)) continue; switch (iMaskType) { case 0: uThisMask = uSpecifiedMask; break; case 1: uThisMask = uExpectedMask; break; case 2: uThisMask = uImpliedMask; break; case 3: uThisMask = uCombinedMask; break; case 4: uThisMask = uMaskedMask; break; case 5: uThisMask = uUnmaskedMask; break; case 6: /* This case must be last, as it trashes uSeenMasks & uInitialExceptions */ /* Also confirm 1:1 cases implemented :: mask type descriptions */ BS3_ASSERT(iMaskType == RT_ELEMENTS(s_apszMaskType) - 1); uRandTmp = bs3CpuInstrX_SimpleRand(); uThisMask = uRandTmp & X86_MXCSR_XCPT_MASK; switch (uRandTmp & X86_MXCSR_RC_MASK) { case X86_MXCSR_RC_ZERO: case X86_MXCSR_RC_NEAREST: /* Random mask */ break; case X86_MXCSR_RC_UP: /* Random initial exceptions */ uThisMask = uSpecifiedMask; RT_FALL_THRU(); case X86_MXCSR_RC_DOWN: /* Random mask & initial exceptions */ uSeenMasks = 0; /* Don't skip for same-mask */ uInitialExceptions = uRandTmp & X86_MXCSR_XCPT_FLAGS; break; default: BS3_ASSERT(0); } break; default: BS3_ASSERT(0); } /* No matter what was chosen, honor FIXED mask bits */ uThisMask = (uThisMask | uForceOnMask) & ~uForceOffMask; /* Skip millions of redundant tests imposed by the mask twiddling scheme */ if (uSeenMasks & (RT_BIT_64(uThisMask >> X86_MXCSR_XCPT_MASK_SHIFT))) continue; uSeenMasks |= RT_BIT_64(uThisMask >> X86_MXCSR_XCPT_MASK_SHIFT); /* This is the input MXCSR value we'll be sending */ uMxCsr = (pValues->uMxCsr & ~(X86_MXCSR_XCPT_MASK | X86_MXCSR_XCPT_FLAGS)) | uThisMask | uInitialExceptions; /* What exceptions does this test value claim to raise? Only actual raises, not initially-on exceptions */ uExpectedExceptions = uExpectedMxCsr_orig & X86_MXCSR_XCPT_FLAGS; uExpectedUnmaskedExceptions = uExpectedExceptions & ~(uThisMask >> X86_MXCSR_XCPT_MASK_SHIFT); /* This is the output MXCSR value we will expect */ uExpectedMxCsr = (uExpectedMxCsr_orig & ~(X86_MXCSR_XCPT_MASK)) | uThisMask; /* If we hit an unmasked early exception, late exceptions won't be raised. */ if (uExpectedUnmaskedExceptions & (X86_MXCSR_DE | X86_MXCSR_IE | X86_MXCSR_ZE)) uExpectedMxCsr &= ~(X86_MXCSR_OE | X86_MXCSR_PE | X86_MXCSR_UE); /* However, all exceptions which are on before the instruction will still be on. */ uExpectedMxCsr |= uInitialExceptions; /* A fault is raised only by unmasked exceptions which were caused by the instruction itself. */ fFpXcptExpected = (uExpectedUnmaskedExceptions != 0); /* * Set up the context and some expectations. */ /* Destination. */ Bs3MemZero(&MemOpExpect, sizeof(MemOpExpect)); if (pTest->iRegDst == UINT8_MAX) { BS3_ASSERT(pTest->enmRm >= RM_MEM); Bs3MemSet(puMemOpAlias, 0xcc, cbMemOp); if (bXcptExpect == X86_XCPT_DB) MemOpExpect.ymm = pValues->uDstOut.ymm; else Bs3MemSet(&MemOpExpect, 0xcc, sizeof(MemOpExpect)); } /* Source #1 (/ destination for SSE). */ if (pTest->iRegSrc1 == UINT8_MAX) { BS3_ASSERT(pTest->enmRm >= RM_MEM); Bs3MemCpy(puMemOpAlias, &pValues->uSrc1, cbMemOp); if (pTest->iRegDst == UINT8_MAX) BS3_ASSERT(fSseInstr); else MemOpExpect.ymm = pValues->uSrc1.ymm; } else if (fSseInstr) Bs3ExtCtxSetXmm(pExtCtx, pTest->iRegSrc1, &pValues->uSrc1.ymm.DQWords.dqw0); else Bs3ExtCtxSetYmm(pExtCtx, pTest->iRegSrc1, &pValues->uSrc1.ymm, 32); /* Source #2. */ if (pTest->iRegSrc2 == UINT8_MAX) { BS3_ASSERT(pTest->enmRm >= RM_MEM); BS3_ASSERT(pTest->iRegDst != UINT8_MAX && pTest->iRegSrc1 != UINT8_MAX); Bs3MemCpy(puMemOpAlias, &pValues->uSrc2, cbMemOp); MemOpExpect.ymm = pValues->uSrc2.ymm; } else if (fSseInstr) Bs3ExtCtxSetXmm(pExtCtx, pTest->iRegSrc2, &pValues->uSrc2.ymm.DQWords.dqw0); else Bs3ExtCtxSetYmm(pExtCtx, pTest->iRegSrc2, &pValues->uSrc2.ymm, 32); /* Memory pointer. */ if (pTest->enmRm >= RM_MEM) { BS3_ASSERT( pTest->iRegDst == UINT8_MAX || pTest->iRegSrc1 == UINT8_MAX || pTest->iRegSrc2 == UINT8_MAX); Bs3RegCtxSetGrpSegFromCurPtr(pCtx, &pCtx->rbx, &pCtx->fs, puMemOp); } /* Setup MXCSR for the current test. */ uMxCsr |= (pSavedCfg->uMxCsr & X86_MXCSR_MM); BS3_ASSERT(!(uMxCsr & X86_MXCSR_MM)); BS3_ASSERT(!(uMxCsr & X86_MXCSR_DAZ) || g_fMxCsrDazSupported); Bs3ExtCtxSetMxCsr(pExtCtx, uMxCsr); /* * Prepare globals and execute. */ g_uBs3TrapEipHint = pCtx->rip.u32; if ( bXcptExpect == X86_XCPT_DB && !fFpXcptExpected) g_uBs3TrapEipHint += cbInstr + 1; Bs3TrapSetJmpAndRestoreWithExtCtxAndRm(pCtx, pExtCtx, pTrapFrame, pExtCtxOut); /* * Check the result. * * If a floating-point exception is expected, the destination is not updated by the instruction. * In the case of SSE instructions, updating the destination here will work because it is the same * as the source, but for AVX++ it won't because the destination is different and would contain 0s. */ cErrors = Bs3TestSubErrorCount(); if ( bXcptExpect == X86_XCPT_DB && !fFpXcptExpected && pTest->iRegDst != UINT8_MAX) { if (fSseInstr) Bs3ExtCtxSetXmm(pExtCtx, pTest->iRegDst, &pValues->uDstOut.ymm.DQWords.dqw0); else Bs3ExtCtxSetYmm(pExtCtx, pTest->iRegDst, &pValues->uDstOut.ymm, cbOperand); } #if defined(DEBUG_aeichner) /** @todo Necessary kludge on a i7-1068NG7. */ if ( pExtCtx->enmMethod == BS3EXTCTXMETHOD_XSAVE && pExtCtx->Ctx.x.Hdr.bmXState == 0x7 && pExtCtxOut->Ctx.x.Hdr.bmXState == 0x3) pExtCtxOut->Ctx.x.Hdr.bmXState = 0x7; #endif if (bXcptExpect == X86_XCPT_DB) { if (fFuzzyPE) { uint32_t const uGotMxCsr = Bs3ExtCtxGetMxCsr(pExtCtxOut); uExpectedMxCsr = (uExpectedMxCsr & ~X86_MXCSR_PE) | (uGotMxCsr & X86_MXCSR_PE); } Bs3ExtCtxSetMxCsr(pExtCtx, uExpectedMxCsr | (pSavedCfg->uMxCsr & X86_MXCSR_MM)); } Bs3TestCheckExtCtx(pExtCtxOut, pExtCtx, 0 /*fFlags*/, pTestCtx->pszMode, pTestCtx->idTestStep); if (bXcptExpect == X86_XCPT_DB) { uint32_t const uGotMxCsr = Bs3ExtCtxGetMxCsr(pExtCtxOut) & ~X86_MXCSR_MM; /* Check if the SIMD FP exception flags and mask (or lack of) are as expected. */ if (uGotMxCsr != uExpectedMxCsr) { char szExpectFlags[FP_XCPT_FLAGS_NAMES_MAXLEN]; char szExpectMasks[FP_XCPT_MASKS_NAMES_MAXLEN]; char szExpectOthers[FP_XCPT_OTHERS_NAMES_MAXLEN]; char szGotFlags[FP_XCPT_FLAGS_NAMES_MAXLEN]; char szGotMasks[FP_XCPT_MASKS_NAMES_MAXLEN]; char szGotOthers[FP_XCPT_OTHERS_NAMES_MAXLEN]; bs3CpuInstr4GetXcptFlags(&szExpectFlags[0], sizeof(szExpectFlags), uExpectedMxCsr); bs3CpuInstr4GetXcptMasks(&szExpectMasks[0], sizeof(szExpectMasks), uExpectedMxCsr); bs3CpuInstr4GetXcptOthers(&szExpectOthers[0], sizeof(szExpectOthers), uExpectedMxCsr); bs3CpuInstr4GetXcptFlags(&szGotFlags[0], sizeof(szGotFlags), uGotMxCsr); bs3CpuInstr4GetXcptMasks(&szGotMasks[0], sizeof(szGotMasks), uGotMxCsr); bs3CpuInstr4GetXcptOthers(&szGotOthers[0], sizeof(szGotOthers), uGotMxCsr); Bs3TestFailedF("Expected MXCSR %#RX32 (%s%s%s ) got MXCSR %#RX32 (%s%s%s )", uExpectedMxCsr, szExpectFlags, szExpectMasks, szExpectOthers, uGotMxCsr, szGotFlags, szGotMasks, szGotOthers); } /* Check if the SIMD FP exception (or lack of) is as expected. */ if (fFpXcptExpected) { if (pTrapFrame->bXcpt == bFpXcpt) { /* likely */ } else Bs3TestFailedF("Expected floating-point xcpt %s, got %s", bs3CpuInstr4XcptName(bFpXcpt), bs3CpuInstr4XcptName(pTrapFrame->bXcpt)); } else if (pTrapFrame->bXcpt == X86_XCPT_DB) { /* likely */ } else Bs3TestFailedF("Expected no xcpt, got %s", bs3CpuInstr4XcptName(pTrapFrame->bXcpt)); } /* Check if non-FP exception is as expected. */ else if (pTrapFrame->bXcpt != bXcptExpect) Bs3TestFailedF("Expected xcpt %s, got %s", bs3CpuInstr4XcptName(bXcptExpect), bs3CpuInstr4XcptName(pTrapFrame->bXcpt)); /* Kludge! Looks like EFLAGS.AC is cleared when raising #GP in real mode on the 10980XE. WEIRD! */ if (bMode == BS3_MODE_RM && (pCtx->rflags.u32 & X86_EFL_AC)) { if (pTrapFrame->Ctx.rflags.u32 & X86_EFL_AC) Bs3TestFailedF("Expected EFLAGS.AC to be cleared (bXcpt=%d)", pTrapFrame->bXcpt); pTrapFrame->Ctx.rflags.u32 |= X86_EFL_AC; } if (bXcptExpect == X86_XCPT_PF) pCtx->cr2.u = (uintptr_t)puMemOp; Bs3TestCheckRegCtxEx(&pTrapFrame->Ctx, pCtx, bXcptExpect == X86_XCPT_DB && !fFpXcptExpected ? cbInstr + 1 : 0, 0 /*cbSpAdjust*/, (bXcptExpect == X86_XCPT_DB && !fFpXcptExpected) || BS3_MODE_IS_16BIT_SYS(bMode) ? 0 : X86_EFL_RF, pTestCtx->pszMode, pTestCtx->idTestStep); pCtx->cr2.u = 0; if ( pTest->enmRm >= RM_MEM && Bs3MemCmp(puMemOpAlias, &MemOpExpect, cbMemOp) != 0) Bs3TestFailedF("Expected uMemOp %.*Rhxs, got %.*Rhxs", cbMemOp, &MemOpExpect, cbMemOp, puMemOpAlias); if (cErrors != Bs3TestSubErrorCount()) Bs3TestFailedF("Mask mode %s, mask=%#RX32, in-exceptions=%#RX32, in-MxCsr=%#RX32, expect-MxCsr=%#RX32", s_apszMaskType[iMaskType], uThisMask, uInitialExceptions, uMxCsr, uExpectedMxCsr); } return cErrorsInit; } /** * Test type #1 worker. */ static uint8_t bs3CpuInstr4_WorkerTestType1(uint8_t bMode, BS3CPUINSTR4_TEST1_T const BS3_FAR *paTests, unsigned cTests, PCBS3CPUINSTR4_CONFIG_T paConfigs, unsigned cConfigs) { BS3REGCTX Ctx; BS3TRAPFRAME TrapFrame; const char BS3_FAR * const pszMode = Bs3GetModeName(bMode); uint8_t bRing = BS3_MODE_IS_V86(bMode) ? 3 : 0; uint8_t BS3_FAR *pbBuf = g_pbBuf; uint32_t cbBuf = g_cbBuf; PBS3EXTCTX pExtCtxOut; PBS3EXTCTX pExtCtx = bs3CpuInstrXAllocExtCtxs(&pExtCtxOut); if (pExtCtx) { /* likely */ } else return 0; if (pExtCtx->enmMethod != BS3EXTCTXMETHOD_ANCIENT) { /* likely */ } else { Bs3TestPrintf("Skipped due to ancient FPU state format\n"); return 0; } /* Ensure the structures are allocated before we sample the stack pointer. */ Bs3MemSet(&Ctx, 0, sizeof(Ctx)); Bs3MemSet(&TrapFrame, 0, sizeof(TrapFrame)); /* * Create test context. */ pbBuf = bs3CpuInstrXBufSetup(pbBuf, &cbBuf, bMode); Bs3RegCtxSaveForMode(&Ctx, bMode, 1024); bs3CpuInstr4SetupSseAndAvx(&Ctx, pExtCtx); /* * Run the tests in all rings since alignment issues may behave * differently in ring-3 compared to ring-0. */ for (;;) { unsigned fPf = 0; do { unsigned iCfg; for (iCfg = 0; iCfg < cConfigs; iCfg++) { unsigned iTest; BS3CPUINSTRX_CONFIG_SAVED_T SavedCfg; if (!bs3CpuInstr4ConfigReconfigure(&SavedCfg, &Ctx, pExtCtx, &paConfigs[iCfg], bMode)) continue; /* unsupported config */ /* * Iterate the tests. */ for (iTest = 0; iTest < cTests; iTest++) { BS3CPUINSTR4_TEST1_T const BS3_FAR *pTest = &paTests[iTest]; unsigned const cValues = pTest->cValues; bool const fSseInstr = bs3CpuInstr4IsSse(pTest->enmType); bool const fAvxInstr = bs3CpuInstr4IsAvx(pTest->enmType); uint8_t const cbOperand = bs3CpuInstr4GetOperandSize(pTest->enmType); uint8_t const cbMemOp = bs3CpuInstrXMemOpSize(cbOperand, pTest->enmRm); uint8_t const cbAlign = cbMemOp; uint8_t BS3_FAR *puMemOp = bs3CpuInstrXBufForOperand(pbBuf, cbBuf, cbMemOp, cbAlign, &paConfigs[iCfg], fPf); uint8_t *puMemOpAlias = &g_pbBufAlias[(uintptr_t)puMemOp - (uintptr_t)pbBuf]; uint8_t bXcptExpect = !g_afTypeSupports[pTest->enmType] ? X86_XCPT_UD : fSseInstr ? paConfigs[iCfg].bXcptSse : BS3_MODE_IS_RM_OR_V86(bMode) ? X86_XCPT_UD : paConfigs[iCfg].bXcptAvx; uint16_t idTestStep = bRing * 10000 + iCfg * 100 + iTest * 10; unsigned cRecompRuns = 0; unsigned const cMaxRecompRuns = g_cBs3ThresholdNativeRecompiler + cValues; unsigned iVal; /* If testing unaligned memory accesses (or #PF), skip register-only tests. This allows setting bXcptSse and bXcptAvx to reflect the misaligned exceptions. */ if ( (pTest->enmRm == RM_REG || pTest->enmRm == RM_MEM8) && (!paConfigs[iCfg].fAligned || paConfigs[iCfg].fAlignCheck || fPf)) continue; /* #AC is only raised in ring-3. */ if (bXcptExpect == X86_XCPT_AC) { if (bRing != 3) bXcptExpect = X86_XCPT_DB; else if (fAvxInstr) bXcptExpect = pTest->bAvxMisalignXcpt; /* they generally don't raise #AC */ } if (fPf && bXcptExpect == X86_XCPT_DB) bXcptExpect = X86_XCPT_PF; Bs3RegCtxSetRipCsFromCurPtr(&Ctx, pTest->pfnWorker); /* * Iterate the test values and do the actual testing. */ while (cRecompRuns < cMaxRecompRuns) { for (iVal = 0; iVal < cValues; iVal++, idTestStep++, cRecompRuns++) { uint16_t cErrors; BS3CPUINSTR4_TEST1_CTX_T TestCtx; /* * If the hardware does not support DAZ bit skip test values that set it. */ if ( !g_fMxCsrDazSupported && (pTest->paValues[iVal].uMxCsr & X86_MXCSR_DAZ)) continue; /* * Setup the test instruction context and pass it to the worker. * A few of these can be figured out by the worker but initializing * it outside the inner most loop is more optimal. */ TestCtx.pConfig = &paConfigs[iCfg]; TestCtx.pTest = pTest; TestCtx.iVal = iVal; TestCtx.pszMode = pszMode; TestCtx.pTrapFrame = &TrapFrame; TestCtx.pCtx = &Ctx; TestCtx.pExtCtx = pExtCtx; TestCtx.pExtCtxOut = pExtCtxOut; TestCtx.puMemOp = (uint8_t *)puMemOp; TestCtx.puMemOpAlias = puMemOpAlias; TestCtx.cbMemOp = cbMemOp; TestCtx.cbOperand = cbOperand; TestCtx.bXcptExpect = bXcptExpect; TestCtx.idTestStep = idTestStep; cErrors = bs3CpuInstr4_WorkerTestType1_Inner(bMode, &TestCtx, &SavedCfg); if (cErrors != Bs3TestSubErrorCount()) { if (paConfigs[iCfg].fAligned) Bs3TestFailedF("%s: ring-%d/cfg#%u/test#%u/value#%u failed (bXcptExpect=%u %s, %s %u-bit)", Bs3GetModeName(bMode), bRing, iCfg, iTest, iVal, bXcptExpect, bs3CpuInstr4XcptName(bXcptExpect), fSseInstr ? "SSE" : "AVX", cbOperand * 8); else Bs3TestFailedF("%s: ring-%d/cfg#%u/test#%u/value#%u failed (bXcptExpect=%u %s, puMemOp=%p, EFLAGS=%#RX32, %s %u-bit)", Bs3GetModeName(bMode), bRing, iCfg, iTest, iVal, bXcptExpect, bs3CpuInstr4XcptName(bXcptExpect), puMemOp, TrapFrame.Ctx.rflags.u32, fSseInstr ? "SSE" : "AVX", cbOperand * 8); Bs3TestPrintf("\n"); } } } } bs3CpuInstrXConfigRestore(&SavedCfg, &Ctx, pExtCtx); } } while (fPf++ == 0 && BS3_MODE_IS_PAGED(bMode)); /* * Next ring. */ bRing++; if (bRing > 3 || bMode == BS3_MODE_RM) break; Bs3RegCtxConvertToRingX(&Ctx, bRing); } /* * Cleanup. */ bs3CpuInstrXBufCleanup(pbBuf, cbBuf, bMode); bs3CpuInstrXFreeExtCtxs(pExtCtx, pExtCtxOut); return 0; } /** @todo 'master switch' turns on all IEM misbehaviors documented below */ #ifdef TODO_EXPOSE_IEM_ERRATA # define TODO_X86_MXCSR_PE_IEM # define TODO_X86_MXCSR_PE_IEM_SSE # define TODO_X86_MXCSR_UE_IEM #endif /* TODO_EXPOSE_IEM_ERRATA */ /* * [V]ADDPS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_addps(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP }, /* * Infinity. */ /* 5*/{ { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_QNAN(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_IM, /*128:out */ X86_MXCSR_IM | X86_MXCSR_IE, /*256:out */ X86_MXCSR_IM | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_QNAN(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_IE, /*256:out */ X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_QNAN(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(0), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, { /*src1 */ { FP32_INF(1), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_INF(0), FP32_INF(1) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_0(0), FP32_QNAN(1), FP32_0(0), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, /* * Overflow, Precision. */ /*10*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM, /*256:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(1), FP32_0(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(1), FP32_0(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_INF(0), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_0(0), FP32_INF(0), FP32_INF(0), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_0(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_INF(0), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_0(0), FP32_INF(0), FP32_INF(0), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_0(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /*src1 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /* => */ { FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_NORM_MAX(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_NORM_MAX(0), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /*src1 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /* => */ { FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_NORM_MAX(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_NORM_MAX(0), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1) } }, { /* => */ { FP32_V(0, FP32_FRAC_NORM_MAX, FP32_EXP_SAFE_INT_MAX), FP32_0(0), FP32_0(0), FP32_V(0, FP32_FRAC_NORM_MAX, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(0, FP32_FRAC_NORM_MAX, FP32_EXP_SAFE_INT_MAX), FP32_0(0), FP32_0(0), FP32_V(1, FP32_FRAC_NORM_MAX, FP32_EXP_SAFE_INT_MAX + 1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_PE, /*256:out */ X86_MXCSR_PE }, /* * Normals. */ /*23*/{ { /*src2 */ { FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_NORM_MAX(0), FP32_0(0), FP32_V(0, 0, 0x7d)/*0.25*/, FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_NORM_MAX(0), FP32_0(0), FP32_V(0, 0, 0x7d)/*0.25*/ } }, { /*src1 */ { FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_NORM_MAX(1), FP32_0(0), FP32_V(0, 0, 0x7e)/*0.50*/, FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_NORM_MAX(1), FP32_0(0), FP32_V(0, 0, 0x7e)/*0.50*/ } }, { /* => */ { FP32_V(0, 0x400000, 0x7f)/* 1.50*/, FP32_0(1), FP32_0(0), FP32_V(0, 0x400000, 0x7e)/*0.75*/, FP32_V(0, 0x400000, 0x7f)/* 1.50*/, FP32_0(1), FP32_0(0), FP32_V(0, 0x400000, 0x7e)/*0.75*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_V1(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_V1(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_NORM_V1(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_V1(1), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_V(0, 0x5c0000, 0x84)/*55*/, FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_0(0), FP32_V(0, 0x5c0000, 0x84)/*55*/, FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_V(0, 0x534000, 0x86)/*211.25*/, FP32_0(0) } }, { /*src1 */ { FP32_V(0, 0x1ea980, 0x8f)/* 81235*/, FP32_V(0, 0x600000, 0x81)/* 7*/, FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_0(0), FP32_V(0, 0x600000, 0x81)/* 7*/, FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_1(1) /*- 1.00*/, FP32_0(0) } }, { /* => */ { FP32_V(0, 0x669050, 0x93)/*1888778*/, FP32_V(0, 0x780000, 0x84)/*62*/, FP32_V(0, 0x253468, 0x93)/*1353357.00*/, FP32_0(0), FP32_V(0, 0x780000, 0x84)/*62*/, FP32_V(0, 0x253468, 0x93)/*1353357.00*/, FP32_V(0, 0x524000, 0x86)/*210.25*/, FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_0(0), FP32_0(0), FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_1(1), FP32_0(0) } }, { /*src1 */ { FP32_V(1, 0x712060, 0x92)/*- 987654*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_0(0), FP32_1(0), FP32_V(1, 0x712060, 0x92)/*- 987654*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_1(0), FP32_1(0) } }, { /* => */ { FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_V(0, 0x3c614e, 0x97)/*24691356*/, FP32_0(0), FP32_1(0), FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_V(0, 0x3c614e, 0x97)/*24691356*/, FP32_0(0), FP32_1(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ }, { { /*src2 */ { FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_1(1), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_NORM_SAFE_INT_MAX(0), FP32_0(1), FP32_0(0) } }, { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_0(1), FP32_0(0) } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_0(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_1(1), FP32_0(1), FP32_1(1), FP32_0(1), FP32_1(1), FP32_NORM_SAFE_INT_MAX(0), FP32_1(1) } }, { /*src1 */ { FP32_1(0), FP32_NORM_SAFE_INT_MAX(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_1(0), FP32_NORM_SAFE_INT_MAX(1) } }, { /* => */ { FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(1, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_0(1), FP32_1(1), FP32_0(1), FP32_1(1), FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(1, 0, FP32_EXP_SAFE_INT_MAX + 1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_0(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(0), FP32_0(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(0) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(1), FP32_0(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(1), FP32_0(0), FP32_NORM_SAFE_INT_MIN(0) } }, { /* => */ { FP32_0(1), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_V(0, 0, FP32_EXP_SAFE_INT_MIN + 1), FP32_0(1), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_V(0, 0, FP32_EXP_SAFE_INT_MIN + 1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_V(0, 0x3ce348, 0x90)/*193421.125*/, FP32_V(0, 0x6423f2, 0x92)/*934463.125*/, FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_V(0, 0x16b43a, 0x93)/*1234567.25*/, FP32_V(0, 0x792318, 0x91)/*510232.75*/, FP32_V(0, 0x600000, 0x7e)/* 0.875*/ } }, { /*src1 */ { FP32_V(0, 0x769b50, 0x92)/*1010101.000*/, FP32_V(0, 0x430ebc, 0x91)/*399477.875*/, FP32_V(1, 0x0a19f0, 0x8f)/*-70707.875*/, FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_V(0, 0x00c6d3, 0x94)/*2109876.75*/, FP32_V(1, 0x316740, 0x8e)/*-45415.25*/, FP32_V(0, 0x769b50, 0x92)/*1010101.000*/ } }, { /* => */ { FP32_V(0, 0x769b5e, 0x92)/*1010101.875*/, FP32_V(0, 0x10c030, 0x92)/*592899.000*/, FP32_V(0, 0x52e0b4, 0x92)/*863755.250*/, FP32_V(1, 0, FP32_EXP_SAFE_INT_MIN + 1), FP32_V(0, 0, FP32_EXP_SAFE_INT_MIN + 1), FP32_V(0, 0x4c20f0, 0x94)/*3344444.00*/, FP32_V(0, 0x62f630, 0x91)/*464817.50*/, FP32_V(0, 0x769b5e, 0x92)/*1010101.875*/ } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_RC_DOWN }, /* * Denormals. */ /*31*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out *AND* different output values */ /*--|32*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*32|33*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|35*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*34|36*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out *AND* different output values */ /*--|39*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*37|40*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, /** @todo More Denormals. */ /* * Invalids. */ /*40|43*/ FP32_TABLE_D1_PS_INVALIDS /** @todo Underflow, Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_addps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddps_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddps_XMM1_XMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddps_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddps_YMM1_YMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_addps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddps_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddps_XMM1_XMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddps_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddps_YMM1_YMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_addps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddps_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddps_XMM1_XMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddps_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddps_YMM1_YMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_addps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_addps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddps_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vaddps_XMM8_XMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddps_YMM8_YMM9_YMM10_icebp_c64, 255, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vaddps_YMM8_YMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]ADDPD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_addpd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ }, { { /*src2 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, /* * Infinity. */ /* 5*/{ { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_IE, /*256:out */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_IE }, { { /*src2 */ { FP64_0(0), FP64_INF(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_INF(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_QNAN(1), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE }, { { /*src2 */ { FP64_0(0), FP64_INF(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_INF(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_QNAN(1), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, /*256:out */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(0), FP64_INF(1), FP64_0(0), FP64_INF(1) } }, { /*src1 */ { FP64_INF(1), FP64_INF(0), FP64_0(0), FP64_INF(0) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_0(0), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP64_V(0, 0, 0x3fd)/*0.25*/, FP64_0(1), FP64_0(0), FP64_INF(1) } }, { /*src1 */ { FP64_V(0, 0, 0x3fe)/*0.50*/, FP64_0(1), FP64_0(0), FP64_INF(0) } }, { /* => */ { FP64_V(0, 0x8000000000000, 0x3fe)/*0.75*/, FP64_0(1), FP64_0(0), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, /* * Overflow, Precision. */ /*10*/{ { /*src2 */ { FP64_0(0), FP64_NORM_MAX(1), FP64_0(0), FP64_NORM_MAX(1) } }, { /*src1 */ { FP64_0(0), FP64_NORM_MAX(1), FP64_0(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_0(0), FP64_INF(1), FP64_0(0), FP64_INF(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */, /*256:out */ X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */ }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_INF(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */, /*256:out */ X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */ }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_0(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_0(0), FP64_NORM_MAX(0) } }, { /* => */ { FP64_INF(0), FP64_V(1, 0, FP32_EXP_NORM_MIN + 1), FP64_0(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */ }, { { /*src2 */ { FP64_NORM_MIN(1), FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_0(0) } }, { /*src1 */ { FP64_NORM_MIN(1), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_0(0) } }, { /* => */ { FP64_V(1, 0, FP32_EXP_NORM_MIN + 1), FP64_INF(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */ }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /* => */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */ }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_MAX(0), FP64_0(0), FP64_NORM_SAFE_INT_MAX(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_MAX(1), FP64_0(0), FP64_NORM_SAFE_INT_MAX(1) } }, { /* => */ { FP64_V(0, FP64_FRAC_NORM_MAX, FP64_EXP_SAFE_INT_MAX), FP64_0(0), FP64_0(0), FP64_V(1, FP64_FRAC_NORM_MAX, FP64_EXP_SAFE_INT_MAX + 1) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE }, /* * Normals. */ /*16*/{ { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_V1(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_NORM_V1(1), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_V(0, 0, 0x409)/*1024*/, FP64_V(0, 0xb800000000000, 0x404)/*55*/, FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_V(0, 0, 0x408)/* 512*/, FP64_V(0, 0xc000000000000, 0x401)/* 7*/, FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_V(0, 0x8000000000000, 0x409)/*1536*/, FP64_V(0, 0xf000000000000, 0x404)/*62*/, FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_V(0, 0x26580b4800000, 0x41d)/* 1234567890*/, FP64_V(0, 0xd6f3458800000, 0x41c)/*987654321*/, FP64_0(0), FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/ } }, { /*src1 */ { FP64_V(1, 0x26580b4800000, 0x41d)/*-1234567890*/, FP64_V(1, 0x9000000000000, 0x405)/* -100*/, FP64_0(0), FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/ } }, { /* => */ { FP64_0(0), FP64_V(0, 0xd6f3426800000, 0x41c)/*987654221*/, FP64_0(0), FP64_V(0, 0xcf00348ec5858, 0x432)/*4072598123457580.0*/ } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_NORM_SAFE_INT_MAX(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_1(0), FP64_1(1), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_1(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_1(0), FP64_NORM_SAFE_INT_MAX(1), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_V(0, 0, FP64_EXP_SAFE_INT_MAX + 1), FP64_V(1, 0, FP64_EXP_SAFE_INT_MAX + 1), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_0(0), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MIN(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(1), FP64_0(0), FP64_NORM_SAFE_INT_MIN(0) } }, { /* => */ { FP64_0(1), FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(0), FP64_V(0, 0, FP32_EXP_SAFE_INT_MIN + 1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_0(0), FP64_0(0), FP64_NORM_SAFE_INT_MIN(1) } }, { /*src1 */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_0(0), FP64_0(0), FP64_NORM_SAFE_INT_MIN(1) } }, { /* => */ { FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_0(0), FP64_0(0), FP64_V(1, 0, FP32_EXP_SAFE_INT_MIN + 1) } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_V(0, 0xc000000000000, 0x3ff)/* 1.75*/, FP64_NORM_MAX(0), FP64_0(0), FP64_V(0, 0, 0x3fd)/*0.25*/ } }, { /*src1 */ { FP64_V(1, 0, 0x3fd)/*-0.25*/, FP64_NORM_MAX(1), FP64_0(0), FP64_V(0, 0, 0x3fe)/*0.50*/ } }, { /* => */ { FP64_V(0, 0x8000000000000, 0x3ff)/* 1.50*/, FP64_0(1), FP64_0(0), FP64_V(0, 0x8000000000000, 0x3fe)/*0.75*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Denormals. */ /*24*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /* DM off, UM can vary */ /*128:out */ BS3_MXCSR_DM_FIXED | X86_MXCSR_DE, /*256:out */ BS3_MXCSR_DM_FIXED | X86_MXCSR_DE }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|25*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /* DM on, UM off */ /*128:out */ X86_MXCSR_DM | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED | X86_MXCSR_DE | X86_MXCSR_UE, /*256:out */ X86_MXCSR_DM | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED | X86_MXCSR_DE | X86_MXCSR_UE }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*25|26*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /* DM on, UM on */ /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED | X86_MXCSR_DE, /*256:out */ X86_MXCSR_DM | X86_MXCSR_UM | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED | X86_MXCSR_DE }, /*26|27*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, /*mxcsr:in */ 0, /* DM off, UM can vary */ /*128:out */ 0, /*256:out */ BS3_MXCSR_DM_FIXED | X86_MXCSR_DE }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|28*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /* DM on, UM off */ /*128:out */ X86_MXCSR_DM, /*256:out */ X86_MXCSR_DM | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED | X86_MXCSR_DE | X86_MXCSR_UE }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*27|29*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /* DM on, UM on */ /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM, /*256:out */ X86_MXCSR_DM | X86_MXCSR_UM | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED | X86_MXCSR_DE }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, /** @todo More denormals. */ /* * Invalids. */ /*29|31*/ FP64_TABLE_D1_PD_INVALIDS /** @todo Underflow, Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_addpd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addpd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_XMM1_XMM2_XMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_YMM1_YMM2_YMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_YMM1_YMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_addpd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addpd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_XMM1_XMM2_XMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_YMM1_YMM2_YMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_YMM1_YMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_addpd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addpd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_XMM1_XMM2_XMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_YMM1_YMM2_YMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_YMM1_YMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_addpd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE2, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_addpd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_XMM8_XMM9_XMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_YMM8_YMM9_YMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vaddpd_YMM8_YMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]ADDSS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_addss(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_0(0), FP32_0_x7(0) } }, { /* => */ { FP32_0(0), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V4 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V6 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V5 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, /* * Infinity. */ /* 6*/{ { /*src2 */ { FP32_INF(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_INF(1), FP32_0_x7(0) } }, { /* => */ { FP32_QNAN(1), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V2 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V5 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V5 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, /* * Overflow, Precision. */ /*12*/{ { /*src2 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V5 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PE | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_RAND_V0(1), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_NORM_MAX(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_PE, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V2 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(0, FP32_FRAC_NORM_MAX, FP32_EXP_SAFE_INT_MAX), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(1), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(1), FP32_RAND_x7_V4 } }, { /* => */ { FP32_V(1, FP32_FRAC_NORM_MAX, FP32_EXP_SAFE_INT_MAX), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ -1 }, /* * Normals. */ /*21*/{ { /*src2 */ { FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_RAND_x7_V2 } }, { /* => */ { FP32_V(0, 0x400000, 0x7f)/* 1.50*/, FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_V(0, 0x1ea980, 0x8f)/* 81235*/, FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(0, 0x669050, 0x93)/*1888778*/, FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(0, 0x253468, 0x93)/*1353357.00*/, FP32_RAND_x7_V3 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_V(1, 0x712060, 0x92)/*- 987654*/, FP32_RAND_x7_V5 } }, { /* => */ { FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_1(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_1(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_V(0, 0x769b50, 0x92)/*1010101.000*/, FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(0, 0x769b5e, 0x92)/*1010101.875*/, FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MIN(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, /* * Denormals. */ /*30*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V6 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V6 } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out *AND* different output values */ /*--|31*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V4 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V4 } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V4 } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*31|32*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V5 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DM | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_NORM_MIN(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE, /*256:out */ -1 }, /** @todo More denormals etc. */ /* * Invalids. */ /*36|37*/ FP32_TABLE_D1_SS_INVALIDS /** @todo Underflow; Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_addss_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addss_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddss_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddss_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_addss_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addss_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddss_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddss_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_addss_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addss_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddss_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddss_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_addss_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_addss_XMM8_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddss_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vaddss_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); } /* * [V]ADDSD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_addsd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_0(1), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V3(1), FP64_RAND_V1(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V3(1), FP64_RAND_V1(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V3(1), FP64_RAND_V0(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V3(1), FP64_RAND_V0(0), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, /* * Infinity. */ /* 6*/{ { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(0), FP32_RAND_V3(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V1(1), FP32_RAND_V1(1) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V0(0), FP64_RAND_V1(1), FP32_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V1(1), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V1(1), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V0(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V1(0) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_INF(0), FP64_0(1), FP64_0(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_QNAN(1), FP64_0(1), FP64_0(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, /* * Overflow, Precision. */ /*12*/{ { /*src2 */ { FP64_NORM_MAX(1), FP64_0(0), FP64_0(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_0(1), FP64_0(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_INF(1), FP64_0(1), FP64_0(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(1), FP64_0(0), FP64_0(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_0(1), FP64_0(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_INF(1), FP64_0(1), FP64_0(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V1(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_RAND_V2(0), FP64_RAND_V0(1), FP64_RAND_V1(0) } }, { /* => */ { FP64_NORM_MAX(1), FP64_RAND_V2(0), FP64_RAND_V0(1), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_PE, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(1), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_INF(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(1), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_INF(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_V(0, FP64_FRAC_NORM_MAX, FP64_EXP_SAFE_INT_MAX), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(1), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(1), FP64_RAND_V2(1), FP64_RAND_V0(1), FP64_RAND_V1(0) } }, { /* => */ { FP64_V(1, FP64_FRAC_NORM_MAX, FP64_EXP_SAFE_INT_MAX), FP64_RAND_V2(1), FP64_RAND_V0(1), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ -1 }, /* * Normals. */ /*19*/{ { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_V1(0), FP64_0(0), FP64_SNAN(0) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_NORM_V1(1), FP64_0(0), FP64_SNAN(1) } }, { /* => */ { FP64_0(0), FP64_NORM_V1(1), FP64_0(0), FP64_SNAN(1) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0, 0x409)/*1024*/, FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_V(0, 0, 0x408)/* 512*/, FP64_RAND_V2(1), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(0, 0x8000000000000, 0x409)/*1536*/, FP64_RAND_V2(1), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xb800000000000, 0x404)/*55*/, FP64_RAND_V2(1), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_V(0, 0xc000000000000, 0x401)/* 7*/, FP64_RAND_V1(1), FP64_RAND_V3(1), FP64_RAND_V2(0) } }, { /* => */ { FP64_V(0, 0xf000000000000, 0x404)/*62*/, FP64_RAND_V1(1), FP64_RAND_V3(1), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0x26580b4800000, 0x41d)/* 1234567890*/, FP64_RAND_V0(1), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(1, 0x26580b4800000, 0x41d)/*-1234567890*/, FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xd6f3458800000, 0x41c)/*987654321*/, FP64_RAND_V2(1), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_V(1, 0x9000000000000, 0x405)/* -100*/, FP64_RAND_V1(1), FP64_RAND_V3(1), FP64_RAND_V2(0) } }, { /* => */ { FP64_V(0, 0xd6f3426800000, 0x41c)/*987654221*/, FP64_RAND_V1(1), FP64_RAND_V3(1), FP64_RAND_V2(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/, FP64_RAND_V0(1), FP64_RAND_V2(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/, FP64_RAND_V3(1), FP64_RAND_V0(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_V(0, 0xcf00348ec5858, 0x432)/*4072598123457580.0*/, FP64_RAND_V3(1), FP64_RAND_V0(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_1(0), FP64_RAND_V2(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V2(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, { /*src1 */ { FP64_1(0), FP64_RAND_V3(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(0, 0, FP64_EXP_SAFE_INT_MAX + 1), FP64_RAND_V3(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_1(1), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(1), FP64_RAND_V3(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(1, 0, FP64_EXP_SAFE_INT_MAX + 1), FP64_RAND_V3(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_RAND_V2(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MIN(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V1(1) } }, { /* => */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_RAND_V2(0), FP64_RAND_V3(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_RAND_V2(0), FP64_RAND_V3(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ -1 }, /* * Denormals. */ /*32*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_SNAN(0), FP64_SNAN(0), FP64_QNAN(0) } }, { /*src1 */ { FP64_0(0), FP64_SNAN(0), FP64_QNAN(1), FP64_SNAN(1) } }, { /* => */ { FP64_0(0), FP64_SNAN(0), FP64_QNAN(1), FP64_SNAN(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out *AND* different output values */ /*--|33*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_SNAN(0), FP64_SNAN(0), FP64_QNAN(0) } }, { /*src1 */ { FP64_0(0), FP64_SNAN(0), FP64_QNAN(1), FP64_SNAN(1) } }, { /* => */ { FP64_0(0), FP64_SNAN(0), FP64_QNAN(1), FP64_SNAN(1) } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP64_DENORM_MAX(0), FP64_SNAN(0), FP64_QNAN(1), FP64_SNAN(1) } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*33|34*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_SNAN(0), FP64_SNAN(0), FP64_QNAN(0) } }, { /*src1 */ { FP64_0(0), FP64_SNAN(0), FP64_QNAN(1), FP64_SNAN(1) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_SNAN(0), FP64_QNAN(1), FP64_SNAN(1) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_SNAN(1), FP64_INF(0), FP64_SNAN(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_INF(0), FP64_SNAN(1), FP64_QNAN(0) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_INF(0), FP64_SNAN(1), FP64_QNAN(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out */ /*--|36*/{ { /*src2 */ { FP64_0(0), FP64_SNAN(1), FP64_INF(0), FP64_SNAN(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_INF(0), FP64_SNAN(1), FP64_QNAN(0) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_INF(0), FP64_SNAN(1), FP64_QNAN(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*35|37*/{ { /*src2 */ { FP64_0(0), FP64_SNAN(1), FP64_INF(0), FP64_SNAN(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_INF(0), FP64_SNAN(1), FP64_QNAN(0) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_INF(0), FP64_SNAN(1), FP64_QNAN(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, /** @todo More Denormals. */ /* * Invalids. */ /*37|39*/ FP64_TABLE_D1_SD_INVALIDS /** @todo Underflow, Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_addsd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addsd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsd_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsd_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_addsd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addsd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsd_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsd_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_addsd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addsd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsd_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsd_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_addsd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_addsd_XMM8_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsd_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vaddsd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); } /* * [V]HADDPS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_haddps(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 5*/{ { /*src2 */ { FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1) } }, { /*src1 */ { FP32_INF(1), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_INF(1), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_QNAN(1), FP32_0(0), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_0(0), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_IM, /*128:out */ X86_MXCSR_IM | X86_MXCSR_IE, /*256:out */ X86_MXCSR_IM | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(1), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_QNAN(1), FP32_INF(0), FP32_INF(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_INF(1), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, { /* => */ { FP32_QNAN(1), FP32_0(0), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_INF(0), FP32_INF(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_0(0) } }, { /*src1 */ { FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_INF(0), FP32_QNAN(1), FP32_INF(1), FP32_QNAN(0), FP32_INF(1), FP32_INF(1), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_INF(0), FP32_QNAN(0), FP32_INF(1), FP32_QNAN(0), FP32_INF(1), FP32_QNAN(1), FP32_INF(0), FP32_INF(0) } }, { /* => */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN(1), FP32_QNAN(0), FP32_QNAN(1), FP32_INF(0), FP32_INF(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, /* * Overflow, Precision. */ /*10*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(1), FP32_V(1, FP32_FRAC_NORM_MIN, FP32_EXP_NORM_MIN + 1), FP32_INF(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(1), FP32_V(1, FP32_FRAC_NORM_MIN, FP32_EXP_NORM_MIN + 1), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM, /*256:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_INF(1), FP32_INF(1), FP32_V(1, FP32_FRAC_NORM_MIN, FP32_EXP_NORM_MIN + 1), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_INF(1), FP32_INF(1), FP32_V(1, FP32_FRAC_NORM_MIN, FP32_EXP_NORM_MIN + 1), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_INF(0), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MAX), FP32_INF(0), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_INF(0), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MAX), FP32_INF(0), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_MIN(0) } }, { /*src1 */ { FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1) } }, { /* => */ { FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_V(0, 0, FP32_EXP_NORM_MIN + 1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_NORM_MAX(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_MIN(0) } }, { /*src1 */ { FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1) } }, { /* => */ { FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_V(0, 0, FP32_EXP_NORM_MIN + 1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_NORM_MAX(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1) } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_V(1, FP32_FRAC_NORM_MAX, FP32_EXP_SAFE_INT_MAX + 1), FP32_NORM_MAX(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_MAX(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_MAX(0), FP32_NORM_SAFE_INT_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_PE }, /* * Normals. */ /*23*/{ { /*src2 */ { FP32_V(0, 0, 0x7d)/* 0.25*/, FP32_V(0, 0, 0x7e)/*0.50*/, FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_V(0, 0x400000, 0x7f)/*1.50*/, FP32_V(0, 0, 0x7d)/*0.25*/ } }, { /*src1 */ { FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_V(0, 0x600000, 0x7f)/*1.75*/, FP32_NORM_MAX(1), FP32_0(0), FP32_V(0, 0, 0x7e)/*0.50*/, FP32_V(0, 0, 0x7d)/*0.25*/, FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_V(0, 0x400000, 0x7f)/* 1.50*/, FP32_NORM_MAX(1), FP32_V(0, 0x400000, 0x7e)/*0.75*/, FP32_NORM_MAX(0), FP32_V(0, 0x400000, 0x7e)/*0.75*/, FP32_0(0), FP32_NORM_MAX(0), FP32_V(0, 0x600000, 0x7f)/*1.75*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_NORM_V1(1), FP32_NORM_V1(0), FP32_NORM_V4(1), FP32_NORM_V4(0), FP32_NORM_V1(1), FP32_NORM_V1(0), FP32_NORM_V2(1), FP32_NORM_V2(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_V3(0), FP32_NORM_V3(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_V(0, 0x5c0000, 0x84)/* 55*/, FP32_V(0, 0x600000, 0x81)/* 7.00*/, FP32_0(0), FP32_V(0, 0x5c0000, 0x84)/* 55.00*/, FP32_V(0, 0x253468, 0x93)/*1353357*/, FP32_V(1, 0x7c9000, 0x88)/*-1010.25*/, FP32_0(0), FP32_V(0, 0x534000, 0x86)/*211.25*/ } }, { /*src1 */ { FP32_V(0, 0x669050, 0x93)/*1888778*/, FP32_V(1, 0x1ea980, 0x8f)/* -81235.00*/, FP32_V(0, 0x253468, 0x93)/*1353357*/, FP32_V(1, 0x7c9000, 0x88)/*-1010.25*/, FP32_V(0, 0x5c0000, 0x84)/* 55*/, FP32_V(0, 0x600000, 0x81)/*7*/, FP32_V(0, 0x534000, 0x86)/* 211.25*/, FP32_1(1) } }, { /* => */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_V(0, 0x780000, 0x84)/* 62*/, FP32_V(0, 0x5c0000, 0x84)/* 55.00*/, FP32_V(0, 0x780000, 0x84)/* 62*/, FP32_V(0, 0x524000, 0x86)/*210.25*/, FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_V(0, 0x534000, 0x86)/*211.25*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_0(0), FP32_NORM_V1(0), FP32_V(0, 0x3c614e, 0x97)/*24691356*/, FP32_V(1, 0x3c614e, 0x96)/*-12345678*/, FP32_0(0), FP32_1(1) } }, { /*src1 */ { FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_V(1, 0x712060, 0x92)/* -987654*/, FP32_NORM_V3(1), FP32_0(0), FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_V(1, 0x712060, 0x92)/* -987654*/, FP32_0(0), FP32_1(0) } }, { /* => */ { FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_NORM_V3(1), FP32_V(0, 0x3c614e, 0x97)/*24691356*/, FP32_NORM_V1(0), FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_1(0), FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_1(0), FP32_1(1), FP32_1(1), FP32_0(0), FP32_1(0), FP32_1(1), FP32_1(1), FP32_0(0) } }, { /*src1 */ { FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_NORM_SAFE_INT_MAX(0), FP32_1(1), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_NORM_SAFE_INT_MAX(0), FP32_1(1) } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_0(0), FP32_1(1), FP32_NORM_SAFE_INT_MAX(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_0(0), FP32_1(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_1(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_1(1), FP32_0(0) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_NORM_SAFE_INT_MAX(1), FP32_1(1), FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_NORM_SAFE_INT_MAX(1), FP32_1(1) } }, { /* => */ { FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(1, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_1(1), FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(1, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_1(1) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_1(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_1(1), FP32_0(0) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_NORM_SAFE_INT_MAX(1), FP32_1(1), FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_NORM_SAFE_INT_MAX(1), FP32_1(1) } }, { /* => */ { FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(1, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_1(1), FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(1, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_1(1) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ }, { { /*src2 */ { FP32_V(0, 0x6423f2, 0x92)/* 934463.125*/, FP32_V(1, 0x0a19f0, 0x8f)/*-70707.875*/, FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(0), FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_V(0, 0x769b50, 0x92)/*1010101.000*/ } }, { /*src1 */ { FP32_V(0, 0x769b50, 0x92)/*1010101.000*/, FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_V(0, 0x430ebc, 0x91)/*399477.875*/, FP32_V(0, 0x3ce348, 0x90)/*193421.125*/, FP32_V(0, 0x16b43a, 0x93)/*1234567.25*/, FP32_V(0, 0x00c6d3, 0x94)/*2109876.75*/, FP32_V(0, 0x792318, 0x91)/*510232.750*/, FP32_V(1, 0x316740, 0x8e)/* -45415.250*/ } }, { /* => */ { FP32_V(0, 0x769b5e, 0x92)/*1010101.875*/, FP32_V(0, 0x10c030, 0x92)/*592899.000*/, FP32_V(0, 0x52e0b4, 0x92)/*863755.250*/, FP32_V(1, 0, FP32_EXP_SAFE_INT_MIN + 1), FP32_V(0, 0x4c20f0, 0x94)/*3344444.00*/, FP32_V(0, 0x62f630, 0x91)/*464817.50*/, FP32_V(0, 0, FP32_EXP_SAFE_INT_MIN + 1), FP32_V(0, 0x769b5e, 0x92)/*1010101.875*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, /* * Denormals. */ /*31*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out *AND* different output values */ /*--|32*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP32_DENORM_MAX(1), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_0(0) } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*32|33*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_DENORM_MAX(1), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DE | X86_MXCSR_DM | X86_MXCSR_UM | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DE | X86_MXCSR_DM | X86_MXCSR_UM | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_DAZ }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out *AND* different output values */ /*--|37*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*36|38*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, /** @todo More Denormals. */ /* * Invalids. */ /*39|41*/ FP32_TABLE_D1_H_PS_INVALIDS /** @todo Underflow; Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_haddps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_haddps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_XMM1_XMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_YMM1_YMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_haddps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_haddps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_XMM1_XMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_YMM1_YMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_haddps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_haddps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_XMM1_XMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_YMM1_YMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_haddps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE3, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_haddps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE3, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_XMM8_XMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_YMM8_YMM9_YMM10_icebp_c64, 255, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vhaddps_YMM8_YMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]HADDPD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_haddpd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 5*/{ { /*src2 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /*src1 */ { FP64_INF(1), FP64_INF(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_0(0), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_IM, /*128:out */ X86_MXCSR_IM | X86_MXCSR_IE, /*256:out */ X86_MXCSR_IM | X86_MXCSR_IE }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_INF(1), FP64_INF(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_QNAN(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /*src1 */ { FP64_INF(1), FP64_INF(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_0(0), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(1), FP64_INF(1), FP64_INF(0), FP64_0(0) } }, { /*src1 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_0(0) } }, { /* => */ { FP64_INF(0), FP64_INF(1), FP64_INF(1), FP64_INF(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_INF(0), FP64_QNAN(1), FP64_INF(1), FP64_QNAN(0) } }, { /*src1 */ { FP64_INF(0), FP64_QNAN(0), FP64_INF(1), FP64_QNAN(0) } }, { /* => */ { FP64_QNAN(0), FP64_QNAN(1), FP64_QNAN(0), FP64_QNAN(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, /* * Overflow, Precision. */ /*10*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_NORM_MIN(1), FP64_NORM_MIN(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_INF(1), FP64_V(1, 0, 2) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_MIN(1), FP64_NORM_MIN(1), FP64_NORM_MAX(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(1) } }, { /* => */ { FP64_INF(1), FP64_V(1, FP32_FRAC_NORM_MIN, FP32_EXP_NORM_MIN + 1), FP64_INF(1), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1) } }, { /* => */ { FP64_NORM_MAX(0), FP64_0(0), FP64_NORM_MAX(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_0(0), FP64_NORM_MIN(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MIN(1) } }, { /* => */ { FP64_INF(0), FP64_0(0), FP64_V(1, 0, FP32_EXP_NORM_MIN + 1), FP64_NORM_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_0(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MIN(1), FP64_NORM_MAX(0), FP64_NORM_MIN(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_NORM_MAX(0), FP64_INF(0), FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MAX), FP64_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_0(0) } }, { /*src1 */ { FP64_NORM_MIN(1), FP64_NORM_MIN(1), FP64_NORM_MIN(0), FP64_NORM_MIN(0) } }, { /* => */ { FP64_V(1, 0, FP32_EXP_NORM_MIN + 1), FP64_NORM_MAX(0), FP64_V(0, 0, FP32_EXP_NORM_MIN + 1), FP64_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_0(0), FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MIN(0) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MIN(1), FP64_NORM_MIN(1) } }, { /* => */ { FP64_V(1, FP64_FRAC_NORM_MAX, FP64_EXP_NORM_MAX), FP64_NORM_MAX(0), FP64_V(1, 0, FP32_EXP_NORM_MIN + 1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_NORM_MAX(0), FP64_NORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_NORM_MAX(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MAX(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MIN(0) } }, { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MAX(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_PE }, /* * Normals. */ /*19*/{ { /*src2 */ { FP64_NORM_MIN(0), FP64_NORM_MIN(1), FP64_NORM_V2(1), FP64_NORM_V2(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_V1(0), FP64_NORM_V1(1) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_V(0, 0xb800000000000, 0x404)/* 55*/, FP64_V(0, 0xc000000000000, 0x401)/* 7*/, FP64_V(0, 0x26580b4800000, 0x41d)/*1234567890*/, FP64_V(1, 0x26580b4800000, 0x41d)/*-1234567890*/ } }, { /*src1 */ { FP64_V(0, 0, 0x409)/*1024*/, FP64_V(0, 0, 0x408)/*512*/, FP64_V(0, 0xd6f3458800000, 0x41c)/* 987654321*/, FP64_V(1, 0x9000000000000, 0x405)/* -100*/ } }, { /* => */ { FP64_V(0, 0x8000000000000, 0x409)/*1536*/, FP64_V(0, 0xf000000000000, 0x404)/* 62*/, FP64_V(0, 0xd6f3426800000, 0x41c)/* 987654221*/, FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_NORM_V2(1), FP64_NORM_V2(0) } }, { /*src1 */ { FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/, FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.50*/, FP64_NORM_V0(1), FP64_NORM_V0(0) } }, { /* => */ { FP64_V(0, 0xcf00348ec5858, 0x432)/*4072598123457580.0*/, FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_1(1), FP64_NORM_V3(1), FP64_NORM_V3(0) } }, { /*src1 */ { FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_1(0), FP64_NORM_V1(0), FP64_NORM_V1(1) } }, { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_0(0), FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MIN(0) } }, { /* => */ { FP64_0(1), FP64_NORM_SAFE_INT_MIN(0), FP64_V(0, 0, FP32_EXP_SAFE_INT_MIN + 1), FP64_V(1, 0, FP32_EXP_SAFE_INT_MIN + 1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_V(1, 0xc122186c3cfd0, 0x42d)/*-123456789876543.25*/, FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(1) } }, { /*src1 */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_V(0, 0xb88e0395d49b0, 0x42d)/* 121098765432102.75*/, FP64_NORM_V0(0), FP64_NORM_V0(1) } }, { /* => */ { FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_0(0), FP64_0(0), FP64_V(1, 0, FP32_EXP_SAFE_INT_MIN + 1) } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_RC_UP }, /* * Denormals. */ /*25*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_0(0), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|26*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_0(0), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*26|27*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_0(0), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(1), FP64_DENORM_MIN(1) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out *AND* different output values */ /*--|30*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_0(0) } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*29|31*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(1), FP64_DENORM_MAX(1) } }, { /*src1 */ { FP64_0(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(1), FP64_DENORM_MIN(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|34*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(1), FP64_DENORM_MIN(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_V(1, 2, 0), FP64_V(0, 0xffffffffffffe, 1) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*32|35*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(1), FP64_DENORM_MIN(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_V(1, 2, 0), FP64_V(0, 0xffffffffffffe, 1) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM, /*256:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, /* * Invalids. */ /*33|36*/ FP64_TABLE_D1_H_PD_INVALIDS /** @todo Underflow; Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_haddpd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_haddpd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_XMM1_XMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_YMM1_YMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_haddpd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_haddpd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_XMM1_XMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_YMM1_YMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_haddpd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_haddpd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_XMM1_XMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_YMM1_YMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_haddpd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE3, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_haddpd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE3, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_XMM8_XMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_YMM8_YMM9_YMM10_icebp_c64, 255, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vhaddpd_YMM8_YMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]SUBPS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_subps(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ }, /* * Infinity. */ /* 5*/{ { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1) } }, { /*src1 */ { FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0) } }, { /* => */ { FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*128:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*256:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM }, { { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_INF(1) } }, { /*src1 */ { FP32_INF(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_QNAN(1), FP32_0(0), FP32_0(0), FP32_QNAN(1), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_QNAN(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_QNAN(1), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(1), FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, { /*src1 */ { FP32_INF(0), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_INF(0), FP32_INF(1) } }, { /* => */ { FP32_INF(0), FP32_QNAN(1), FP32_0(1), FP32_QNAN(1), FP32_0(0), FP32_INF(0), FP32_INF(0), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, /* * Overflow, Precision. */ /*11*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MIN(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0),} }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_PE }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_INF(1), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_INF(1), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, #ifdef TODO_X86_MXCSR_PE_IEM_SSE /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out(SSE-128); properly set in 128:out(AVX-128) */ /*--|16*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0), FP32_0(0), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_NORM_MIN(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MIN(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE }, #endif /* TODO_X86_MXCSR_PE_IEM_SSE */ /*16|17*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0), FP32_0(0), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_NORM_MIN(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MIN(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE }, { { /*src2 */ { FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_V(1, 0, 2) } }, { /*src1 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MIN(1) } }, { /* => */ { FP32_NORM_MIN(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_V(1, 0, 2) } }, { /*src1 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MIN(1) } }, { /* => */ { FP32_NORM_MIN(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_NORM_MIN(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_MIN(0) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_RC_UP | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_NORM_MIN(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_MIN(0) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_OM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0) } }, { /*src1 */ { FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MAX), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE }, #ifdef TODO_X86_MXCSR_PE_IEM_SSE /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out(SSE-128) (but occasionally is set???); properly set in 128:out(AVX-128) */ /*--|23*/{ { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1) } }, { /* => */ { FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_INF(1), FP32_0(1), FP32_0(1), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_INF(1), FP32_0(1), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_PE }, #endif /* TODO_X86_MXCSR_PE_IEM_SSE */ /*22|24*/{ { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1) } }, { /* => */ { FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_INF(1), FP32_0(1), FP32_0(1), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_INF(1), FP32_0(1), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, /* * Normals. */ /*23|25*/{ { /*src2 */ { FP32_V(0, 0, 0x7d)/*0.25*/, FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_V(1, 0, 0x7e)/*-0.50*/, FP32_0(0), FP32_0(1), FP32_V(0, 0x400000, 0x7e)/* 0.75*/ } }, { /*src1 */ { FP32_V(0, 0x600000, 0x7f)/*1.75*/, FP32_0(0), FP32_0(0), FP32_0(0), FP32_V(1, 0x400000, 0x7e)/*-0.75*/, FP32_0(0), FP32_0(1), FP32_V(0, 0, 0x7e)/* 0.50*/ } }, { /* => */ { FP32_V(0, 0x400000, 0x7f)/*1.50*/, FP32_NORM_MAX(1), FP32_0(1), FP32_0(1), FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_0(1), FP32_0(1), FP32_V(1, 0, 0x7d)/*-0.25*/ } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_NORM_MAX(1), FP32_NORM_V1(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_V1(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_NORM_V1(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_V1(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_V(0, 0x600000, 0x81)/* 7*/, FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_0(0), FP32_V(0, 0x5c0000, 0x84)/* 55*/, FP32_V(0, 0x2514d6, 0x93)/* 1352346.75*/, FP32_V(0, 0x534000, 0x86)/*211.25*/, FP32_0(0) } }, { /*src1 */ { FP32_V(0, 0x669050, 0x93)/*1888778*/, FP32_V(0, 0x780000, 0x84)/*62*/, FP32_V(0, 0x253468, 0x93)/*1353357.00*/, FP32_0(0), FP32_V(1, 0x600000, 0x81)/* -7*/, FP32_V(1, 0x7c9000, 0x88)/* -1010.25*/, FP32_1(0) /* 1.00*/, FP32_0(0) } }, { /* => */ { FP32_V(0, 0x1ea980, 0x8f)/* 81235*/, FP32_V(0, 0x5c0000, 0x84)/*55*/, FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_0(0), FP32_V(1, 0x780000, 0x84)/*-62*/, FP32_V(1, 0x253468, 0x93)/*-1353357.00*/, FP32_V(1, 0x524000, 0x86)/*210.25*/, FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_FZ }, { { /*src2 */ { FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_V(1, 0x3c614e, 0x96)/*-12345678*/, FP32_0(0), FP32_0(0), FP32_V(0, 0x712060, 0x92)/* 987654*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_V(0, 0x3c614e, 0x96)/* 12345678*/, FP32_0(0), FP32_1(0), FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_V(0, 0x3c614e, 0x97)/*24691356*/, FP32_1(0), FP32_1(0) } }, { /* => */ { FP32_V(0, 0x712060, 0x92)/* 987654*/, FP32_V(0, 0x3c614e, 0x97)/* 24691356*/, FP32_0(1), FP32_1(0), FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_1(0), FP32_1(0) } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_1(1), FP32_NORM_SAFE_INT_MAX(0), FP32_0(1), FP32_0(0) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_1(1), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_0(1), FP32_0(0) } }, { /* => */ { FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_NORM_SAFE_INT_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(0), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ }, { { /*src2 */ { FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(1), FP32_0(1), FP32_1(1), FP32_1(1), FP32_NORM_SAFE_INT_MAX(0) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_NORM_SAFE_INT_MAX(0), FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1) } }, { /* => */ { FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_V(1, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_1(0) } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_0(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(0), FP32_0(1), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(1) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1), FP32_0(0), FP32_V(0, 0, FP32_EXP_SAFE_INT_MIN + 1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1), FP32_0(0), FP32_NORM_SAFE_INT_MIN(1) } }, { /* => */ { FP32_0(0), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_0(0), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_V(0, 0x3ce348, 0x90)/*193421.125*/, FP32_V(1, 0x0a19f0, 0x8f)/*-70707.875*/, FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_V(0, 0x00c6d3, 0x94)/*2109876.75*/, FP32_V(0, 0x316740, 0x8e)/* 45415.25*/, FP32_V(0, 0x600000, 0x7e)/* 0.875*/ } }, { /*src1 */ { FP32_V(0, 0x769b5e, 0x92)/*1010101.875*/, FP32_V(0, 0x10c030, 0x92)/*592899.000*/, FP32_V(0, 0x52e0b4, 0x92)/*863755.250*/, FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1), FP32_V(0, 0x4c20f0, 0x94)/*3344444.00*/, FP32_V(0, 0x792318, 0x91)/*510232.75*/, FP32_V(1, 0x769b50, 0x92)/*-1010101.000*/ } }, { /* => */ { FP32_V(0, 0x769b50, 0x92)/*1010101.000*/, FP32_V(0, 0x430ebc, 0x91)/*399477.875*/, FP32_V(0, 0x6423f2, 0x92)/*934463.125*/, FP32_V(0, 0, FP32_EXP_SAFE_INT_MIN + 1), FP32_V(1, 0, FP32_EXP_SAFE_INT_MIN + 1), FP32_V(0, 0x16b43a, 0x93)/*1234567.25*/, FP32_V(0, 0x62f630, 0x91)/*464817.50*/, FP32_V(1, 0x769b5e, 0x92)/*-1010101.875*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, /* * Denormals. */ /*31|33*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out *AND* different output values */ /*--|34*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*32|35*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|37*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*34|38*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out *AND* different output values */ /*--|41*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*37|42*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|44*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*39|45*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK }, /** @todo More denormals. */ /* * Invalids. */ /*41|47*/ FP32_TABLE_D1_PS_INVALIDS /** @todo Underflow; Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_subps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_subps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubps_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubps_XMM1_XMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubps_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubps_YMM1_YMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_subps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_subps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubps_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubps_XMM1_XMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubps_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubps_YMM1_YMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_subps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_subps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubps_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubps_XMM1_XMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubps_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubps_YMM1_YMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_subps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_subps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubps_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vsubps_XMM8_XMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubps_YMM8_YMM9_YMM10_icebp_c64, 255, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vsubps_YMM8_YMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]SUBPD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_subpd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_0(1) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 6*/{ { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_0(0), FP64_INF(1) } }, { /*src1 */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_INF(0) } }, { /* => */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*128:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*256:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM }, { { /*src2 */ { FP64_INF(0), FP64_INF(1), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_INF(0), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_QNAN(1), FP64_INF(1), FP64_INF(0), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_INF(0), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_INF(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_INF(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(1), FP64_INF(0), FP64_INF(1), FP64_INF(0) } }, { /*src1 */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_INF(0), FP64_QNAN(1), FP64_INF(0), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, /* * Overflow, Precision. */ /*12*/{ { /*src2 */ { FP64_NORM_MIN(1), FP64_0(0), FP64_NORM_MIN(1), FP64_NORM_MIN(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_0(0), FP64_NORM_MAX(0), FP64_NORM_MAX(0) } }, { /* => */ { FP64_NORM_MAX(0), FP64_0(0), FP64_NORM_MAX(0), FP64_NORM_MAX(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_PE, /*256:out */ X86_MXCSR_PE }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_NORM_MIN(1), FP64_NORM_MIN(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_NORM_MAX(0), FP64_NORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_NORM_MAX(0), FP64_NORM_MAX(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_PE }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_0(0), FP64_0(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_0(0), FP64_0(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_V(1, 0, FP32_EXP_NORM_MIN + 1), FP64_NORM_MIN(1) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MIN(1) } }, { /* => */ { FP64_INF(1), FP64_NORM_MAX(0), FP64_NORM_MIN(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_OE | X86_MXCSR_PE, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_OE | X86_MXCSR_PE }, { { /*src2 */ { FP64_V(1, 0, FP32_EXP_NORM_MIN + 1), FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_V(1, 0, 2) } }, { /*src1 */ { FP64_NORM_MIN(1), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MIN(1) } }, { /* => */ { FP64_NORM_MIN(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_NORM_MIN(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_NORM_MIN(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_NORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_MIN(0), FP64_NORM_MIN(0), FP64_NORM_MIN(1), FP64_NORM_MIN(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /* => */ { FP64_V(0,0xffffffffffffe,0x7fe), FP64_V(0,0xffffffffffffe,0x7fe), FP64_V(1,0xffffffffffffe,0x7fe), FP64_V(0,0xffffffffffffe,0x7fe) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM) | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM) | X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM) | X86_MXCSR_RC_ZERO | X86_MXCSR_PE }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_MAX(0), FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MAX(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_MAX(1), FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MAX(1) } }, { /* => */ { FP64_V(0,0xffffffffffffe,0x433), FP64_NORM_MAX(1), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE }, /* * Normals. */ /*22*/{ { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_V1(1), FP64_NORM_MAX(1), FP64_NORM_V1(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_V1(1), FP64_NORM_MAX(1), FP64_NORM_V1(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_V(0, 0, 0x409)/*1024*/, FP64_V(0, 0xb800000000000, 0x404)/*55*/, FP64_V(1, 0xc000000000000, 0x401)/* 7*/, FP64_V(0, 0x8000000000000, 0x409)/*1536*/ } }, { /*src1 */ { FP64_V(0, 0x8000000000000, 0x409)/*1536*/, FP64_V(1, 0xc000000000000, 0x401)/* 7*/, FP64_V(0, 0xb800000000000, 0x404)/*55*/, FP64_V(0, 0, 0x409)/*1024*/ } }, { /* => */ { FP64_V(0, 0, 0x408)/* 512*/, FP64_V(1, 0xf000000000000, 0x404)/*62*/, FP64_V(0, 0xf000000000000, 0x404)/*62*/, FP64_V(1, 0, 0x408)/* 512*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_V(0, 0x26580b4800000, 0x41d)/*1234567890*/, FP64_V(0, 0x9000000000000, 0x405)/* 100*/, FP64_0(0), FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/ } }, { /*src1 */ { FP64_V(0, 0x26580b4800000, 0x41d)/*1234567890*/, FP64_V(0, 0xd6f3458800000, 0x41c)/*987654321*/, FP64_0(0), FP64_V(0, 0xcf00348ec5858, 0x432)/*4072598123457580.0*/ } }, { /* => */ { FP64_0(0), FP64_V(0, 0xd6f3426800000, 0x41c)/*987654221*/, FP64_0(0), FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_NORM_SAFE_INT_MAX(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_1(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_1(0), FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_1(0), FP64_1(1), FP64_1(1), FP64_NORM_SAFE_INT_MAX(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_1(0) } }, { /* => */ { FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MAX(0), FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_NORM_SAFE_INT_MAX(1), FP64_0(0), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MIN(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MIN(1), FP64_0(0), FP64_NORM_SAFE_INT_MIN(0) } }, { /* => */ { FP64_0(0), FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(1), FP64_V(0, 0, FP32_EXP_SAFE_INT_MIN + 1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_0(0), FP64_0(1), FP64_NORM_SAFE_INT_MIN(0) } }, { /*src1 */ { FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_0(0), FP64_0(1), FP64_NORM_SAFE_INT_MIN(1) } }, { /* => */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_0(1), FP64_0(1), FP64_V(1, 0, FP32_EXP_SAFE_INT_MIN + 1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_XCPT_MASK }, /* * Denormals. */ /*29*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|30*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*30|31*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK }, /** @todo More denormals. */ /* * Invalids. */ /*33|34*/ FP64_TABLE_D1_PD_INVALIDS /** @todo Underflow; Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_subpd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_subpd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_XMM1_XMM2_XMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_YMM1_YMM2_YMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_YMM1_YMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_subpd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_subpd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_XMM1_XMM2_XMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_YMM1_YMM2_YMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_YMM1_YMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_subpd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_subpd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_XMM1_XMM2_XMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_YMM1_YMM2_YMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_YMM1_YMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_subpd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE2, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_subpd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_XMM8_XMM9_XMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_YMM8_YMM9_YMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vsubpd_YMM8_YMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]SUBSS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_subss(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_0(0), FP32_0_x7(0) } }, { /* => */ { FP32_0(0), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V4 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V7 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V7 } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, /* * Infinity. */ /* 6*/{ { /*src2 */ { FP32_INF(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_INF(1), FP32_0_x7(0) } }, { /* => */ { FP32_INF(1), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*128:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V7 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V7 } }, /*mxcsr:in */ (X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM), /*128:out */ (X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM) | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, /* * Overflow, Precision. */ /*12*/{ { /*src2 */ { FP32_0(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_0(0), FP32_0_x7(0) } }, { /* => */ { FP32_0(0), FP32_0_x7(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_NORM_MAX(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V4 } }, { /* => */ { FP32_NORM_MAX(1), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V6 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V2 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MIN(1), FP32_0_x7(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_0_x7(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_PE, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_0_x7(0) } }, { /* => */ { FP32_NORM_MAX(1), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_0_x7(0) } }, { /* => */ { FP32_NORM_MAX(1), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MIN(1), FP32_0_x7(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_0_x7(0) } }, { /* => */ { FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MAX), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_0_x7(0) } }, { /* => */ { FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(1), FP32_0_x7(0) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(1), FP32_0_x7(0) } }, { /* => */ { FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ -1 }, /* * Normals. */ /*25*/{ { /*src2 */ { FP32_V(0, 0x600000, 0x7f)/*1.75*/, FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_V(0, 0, 0x7d)/*0.25*/, FP32_RAND_x7_V2 } }, { /* => */ { FP32_V(1, 0x400000, 0x7f)/*1.50*/, FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V4 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_V(0, 0x669050, 0x93)/*1888778*/, FP32_RAND_x7_V6 } }, { /* => */ { FP32_V(0, 0x1ea980, 0x8f)/* 81235*/, FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_V(0, 0x253468, 0x93)/*1353357.00*/, FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x712060, 0x92)/* 987654*/, FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_RAND_x7_V1 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_1(0), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V4 } }, { /* => */ { FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(1, 0x600000, 0x7e)/* -0.875*/, FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_V(0, 0x769b50, 0x92)/* 1010101.000*/, FP32_RAND_x7_V6 } }, { /* => */ { FP32_V(0, 0x769b5e, 0x92)/* 1010101.875*/, FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ -1 }, /* * Denormals. */ /*33*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out *AND* different output values */ /*--|34*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }/* result on HW (i7-10700) */, // IEM: { /* => */ { FP32_DENORM_MAX(1), FP32_RAND_x7_V3 } }/* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*34|35*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V7 } }, { /* => */ { FP32_DENORM_MAX(1), FP32_RAND_x7_V7 } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V6 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, /** @todo More denormals. */ /* * Invalids. */ /*37|38*/ FP32_TABLE_D1_SS_INVALIDS /** @todo Underflow; Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_subss_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_subss_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubss_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubss_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_subss_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_subss_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubss_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubss_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_subss_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_subss_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubss_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubss_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_subss_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_subss_XMM8_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubss_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vsubss_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); } /* * [V]SUBSD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_subsd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V3(1), FP64_RAND_V1(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V3(1), FP64_RAND_V1(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V3(1), FP64_RAND_V0(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(1), FP64_RAND_V3(1), FP64_RAND_V0(0), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, /* * Infinity. */ /* 6*/{ { /*src2 */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V1(0), FP64_RAND_V2(0), FP32_RAND_V3(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V1(1), FP32_RAND_V1(1) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V0(0), FP64_RAND_V1(1), FP32_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DM | X86_MXCSR_ZM | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V1(1), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V1(1), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V0(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V1(0) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_INF(1), FP64_0(1), FP64_0(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_QNAN(1), FP64_0(1), FP64_0(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_0(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V1(0) } }, { /* => */ { FP64_INF(1), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V1(0), FP64_RAND_V3(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V1(0) } }, { /* => */ { FP64_INF(0), FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, /* * Overflow, Precision. */ /*14*/{ { /*src2 */ { FP64_NORM_MIN(1), FP64_RAND_V1(0), FP64_RAND_V3(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V1(0) } }, { /* => */ { FP64_NORM_MAX(0), FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V1(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_PE, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MIN(0), FP64_RAND_V0(0), FP64_RAND_V0(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_NORM_MAX(0), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_PE, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_0(0), FP64_0(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_0(0), FP64_0(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_0(0), FP64_0(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_0(0), FP64_0(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_OM | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_V(1, 0, FP32_EXP_NORM_MIN + 1), FP64_NORM_MIN(1) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MIN(1) } }, { /* => */ { FP64_INF(1), FP64_NORM_MAX(0), FP64_NORM_MIN(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_V(1, 0, FP32_EXP_NORM_MIN + 1), FP64_NORM_MIN(1) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MIN(1) } }, { /* => */ { FP64_INF(1), FP64_NORM_MAX(0), FP64_NORM_MIN(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(1), FP64_RAND_V0(0), FP64_RAND_V0(0), FP64_RAND_V0(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_NORM_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(1), FP64_RAND_V0(0), FP64_RAND_V0(0), FP64_RAND_V0(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_NORM_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OM, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_NORM_MIN(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_NORM_MIN(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_NORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MIN(0), FP64_NORM_MIN(0), FP64_NORM_MIN(1), FP64_NORM_MIN(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /* => */ { FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MAX), FP64_NORM_MAX(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_MAX(0), FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MAX(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_MAX(1), FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MAX(1) } }, { /* => */ { FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_NORM_MAX(1), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ -1 }, /* * Normals. */ /*27*/{ { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_V1(1), FP64_NORM_MAX(0), FP64_NORM_V2(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_V1(1), FP64_NORM_MAX(1), FP64_NORM_V1(0) } }, { /* => */ { FP64_0(0), FP64_NORM_V1(1), FP64_NORM_MAX(1), FP64_NORM_V1(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MIN(0), FP64_NORM_V2(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_NORM_MIN(0), FP64_NORM_V1(1), FP64_RAND_V0(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(0), FP64_NORM_V1(1), FP64_RAND_V0(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0, 0x409)/*1024*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x8000000000000, 0x409)/*1536*/, FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_V(0, 0, 0x408)/* 512*/, FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xc000000000000, 0x401)/* 7*/, FP64_RAND_V2(0), FP64_RAND_V2(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_V(0, 0xf000000000000, 0x404)/*62*/, FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_V(0, 0xb800000000000, 0x404)/*55*/, FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0x26580b4800000, 0x41d)/*1234567890*/, FP64_RAND_V3(0), FP64_RAND_V0(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x26580b4800000, 0x41d)/*1234567890*/, FP64_RAND_V3(1), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V3(1), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0x9000000000000, 0x405)/* 100*/, FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_V(1, 0xd6f3426800000, 0x41c)/*-987654221*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_V(1, 0xd6f3458800000, 0x41c)/*-987654321*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/, FP64_RAND_V0(0), FP64_RAND_V0(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_V(0, 0xcf00348ec5858, 0x432)/*4072598123457580.0*/, FP64_RAND_V1(1), FP64_RAND_V1(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/, FP64_RAND_V1(1), FP64_RAND_V1(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V0(1), FP64_RAND_V3(1), FP64_RAND_V2(0) } }, { /* => */ { FP64_1(0), FP64_RAND_V0(1), FP64_RAND_V3(1), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_1(0), FP64_RAND_V3(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V1(0), FP64_RAND_V0(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_RAND_V1(0), FP64_RAND_V0(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MAX(1), FP64_RAND_V0(0), FP64_RAND_V0(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(1), FP64_RAND_V1(1), FP64_RAND_V1(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V1(1), FP64_RAND_V1(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_RAND_V0(0), FP64_RAND_V0(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_RAND_V1(1), FP64_RAND_V1(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_RAND_V1(1), FP64_RAND_V1(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, /* * Denormals. */ /*38*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out */ /*--|39*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*39|40*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_RAND_V1(0), FP64_RAND_V0(0), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, /** @todo More Denormals. */ /* * Invalids. */ /*42|43*/ FP64_TABLE_D1_SD_INVALIDS /** @todo Underflow; Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_subsd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_subsd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubsd_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubsd_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_subsd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_subsd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubsd_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubsd_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_subsd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_subsd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubsd_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vsubsd_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_subsd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_subsd_XMM8_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vsubsd_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vsubsd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); } /* * [V]HSUBPS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_hsubps(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 5*/{ { /*src2 */ { FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1) } }, { /*src1 */ { FP32_INF(0), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_INF(1), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_IM, /*128:out */ X86_MXCSR_IM, /*256:out */ X86_MXCSR_IM }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(1), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_QNAN(1), FP32_QNAN(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_INF(1), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, { /* => */ { FP32_INF(1), FP32_0(0), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_QNAN(1), FP32_QNAN(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_0(0) } }, { /*src1 */ { FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_QNAN(1), FP32_INF(1), FP32_QNAN(1), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_QNAN(1), FP32_INF(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_IE, /*256:out */ X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(0), FP32_QNAN(1), FP32_INF(1), FP32_QNAN(0), FP32_INF(1), FP32_INF(1), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_INF(0), FP32_QNAN(0), FP32_INF(1), FP32_QNAN(0), FP32_INF(1), FP32_QNAN(1), FP32_INF(0), FP32_INF(0) } }, { /* => */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN(1), FP32_QNAN(0), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, /* * Overflow, Precision. */ /*10*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MIN(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_PE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MAX(0), FP32_NORM_MIN(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MAX(1), FP32_NORM_MIN(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE }, { { /*src2 */ { FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_PM, /*128:out */ X86_MXCSR_PM | X86_MXCSR_PE, /*256:out */ X86_MXCSR_PM | X86_MXCSR_PE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_INF(0), FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_INF(0), FP32_0(0), FP32_NORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_INF(0), FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_INF(0), FP32_0(0), FP32_NORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO | X86_MXCSR_OM, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OM, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, /* * Normals. */ /*21*/{ { /*src2 */ { FP32_V(0, 0, 0x7d)/*0.25*/, FP32_V(0, 0x400000, 0x7e)/*0.75*/, FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_V(0, 0x600000, 0x7f)/*1.75*/, FP32_V(0, 0, 0x7d)/*0.25*/ } }, { /*src1 */ { FP32_V(0, 0x600000, 0x7f)/*1.75*/, FP32_V(0, 0, 0x7d)/*0.25*/, FP32_NORM_MAX(1), FP32_0(0), FP32_V(1, 0, 0x7e)/*-0.50*/, FP32_V(0, 0, 0x7d)/*-0.25*/, FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_V(0, 0x400000, 0x7f)/*1.50*/, FP32_NORM_MAX(1), FP32_V(1, 0, 0x7e)/*-0.50*/, FP32_NORM_MAX(0), FP32_V(1, 0x400000, 0x7e)/*-0.75*/, FP32_0(0), FP32_NORM_MAX(1), FP32_V(0, 0x400000, 0x7f)/*1.50*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_V(0, 0, 0x7d)/*0.25*/, FP32_V(0, 0x400000, 0x7e)/*0.75*/, FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_V(0, 0x600000, 0x7f)/*1.75*/, FP32_V(0, 0, 0x7d)/*0.25*/ } }, { /*src1 */ { FP32_V(0, 0x600000, 0x7f)/*1.75*/, FP32_V(0, 0, 0x7d)/*0.25*/, FP32_NORM_MAX(1), FP32_0(0), FP32_V(1, 0, 0x7e)/*-0.50*/, FP32_V(0, 0, 0x7d)/*-0.25*/, FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_V(0, 0x400000, 0x7f)/*1.50*/, FP32_NORM_MAX(1), FP32_V(1, 0, 0x7e)/*-0.50*/, FP32_NORM_MAX(0), FP32_V(1, 0x400000, 0x7e)/*-0.75*/, FP32_0(1), FP32_NORM_MAX(1), FP32_V(0, 0x400000, 0x7f)/*1.50*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_NORM_V1(0), FP32_NORM_V1(0), FP32_NORM_V4(0), FP32_NORM_V4(0), FP32_NORM_V1(0), FP32_NORM_V1(0), FP32_NORM_V2(0), FP32_NORM_V2(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_NORM_V3(0), FP32_NORM_V3(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_NORM_V3(0), FP32_NORM_V3(0), FP32_NORM_V4(0), FP32_NORM_V4(0), FP32_NORM_V6(0), FP32_NORM_V6(0), FP32_NORM_V7(0), FP32_NORM_V7(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_NORM_V5(0), FP32_NORM_V5(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ }, { { /*src2 */ { FP32_V(1, 0x5c0000, 0x84)/* -55*/, FP32_V(0, 0x600000, 0x81)/* 7.00*/, FP32_0(0), FP32_V(0, 0x5c0000, 0x84)/* 55.00*/, FP32_V(0, 0x253468, 0x93)/*1353357*/, FP32_V(0, 0x7c9000, 0x88)/*1010.25*/, FP32_0(0), FP32_V(0, 0x534000, 0x86)/* 211.25*/ } }, { /*src1 */ { FP32_V(0, 0x669050, 0x93)/*1888778*/, FP32_V(0, 0x1ea980, 0x8f)/* 81235.00*/, FP32_V(0, 0x253468, 0x93)/*1353357*/, FP32_V(0, 0x7c9000, 0x88)/*1010.25*/, FP32_V(0, 0x780000, 0x84)/* 62*/, FP32_V(0, 0x600000, 0x81)/*7*/, FP32_V(0, 0x534000, 0x86)/* 211.25*/, FP32_1(0) } }, { /* => */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_V(1, 0x780000, 0x84)/* -62*/, FP32_V(1, 0x5c0000, 0x84)/* -55.00*/, FP32_V(0, 0x5c0000, 0x84)/* 55*/, FP32_V(0, 0x524000, 0x86)/*210.25*/, FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_V(1, 0x534000, 0x86)/*-211.25*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_V(0, 0x3c614e, 0x97)/*24691356*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_0(0), FP32_NORM_V1(0), FP32_V(0, 0x3c614e, 0x97)/*24691356*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_2(0), FP32_1(0) } }, { /*src1 */ { FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_V(0, 0x712060, 0x92)/* 987654*/, FP32_NORM_V5(0), FP32_0(0), FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_V(0, 0x712060, 0x92)/* 987654*/, FP32_0(0), FP32_1(0) } }, { /* => */ { FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_NORM_V5(0), FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_NORM_V1(1), FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_1(1), FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_V(0, 0x6423f2, 0x92)/* 934463.125*/, FP32_V(0, 0x0a19f0, 0x8f)/* 70707.875*/, FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(1), FP32_1(1), FP32_1(0), FP32_V(0, 0x769b5e, 0x92)/*1010101.875*/, FP32_V(0, 0x600000, 0x7e)/* 0.875*/ } }, { /*src1 */ { FP32_V(0, 0x769b5e, 0x92)/*1010101.875*/, FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_V(0, 0x10c030, 0x92)/*592899.000*/, FP32_V(0, 0x3ce348, 0x90)/*193421.125*/, FP32_V(1, 0x16b43a, 0x93)/*-1234567.25*/, FP32_V(0, 0x00c6d3, 0x94)/*2109876.75*/, FP32_V(0, 0x792318, 0x91)/*510232.750*/, FP32_V(0, 0x316740, 0x8e)/* 45415.250*/ } }, { /* => */ { FP32_V(0, 0x769b50, 0x92)/*1010101.000*/, FP32_V(0, 0x430ebc, 0x91)/*399477.875*/, FP32_V(0, 0x52e0b4, 0x92)/*863755.250*/, FP32_0(0), FP32_V(1, 0x4c20f0, 0x94)/*-3344444.00*/, FP32_V(0, 0x62f630, 0x91)/* 464817.50*/, FP32_2(1), FP32_V(0, 0x769b50, 0x92)/*1010101.000*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_2(0), FP32_1(0), FP32_1(1), FP32_1(0), FP32_2(0), FP32_1(0), FP32_1(0), FP32_1(0) } }, { /*src1 */ { FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_NORM_SAFE_INT_MAX(0), FP32_1(0) } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(1), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_2(1), FP32_NORM_SAFE_INT_MAX(1), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_2(0), FP32_1(0), FP32_1(1), FP32_1(0), FP32_2(0), FP32_1(0), FP32_1(0), FP32_1(0) } }, { /*src1 */ { FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_NORM_SAFE_INT_MAX(0), FP32_1(0) } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(1), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_2(1), FP32_NORM_SAFE_INT_MAX(1), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_0(0), FP32_1(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1), FP32_0(0), FP32_1(1), FP32_0(0) } }, { /*src1 */ { FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_1(0), FP32_V(1, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_1(1), FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_1(0), FP32_V(1, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_1(1) } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(0), FP32_1(1), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(1), FP32_1(1) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ }, /* * Denormals. */ /*31*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out *AND* different output values */ /*--|32*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_0(0) } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*32|33*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_DAZ }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out *AND* different output values */ /*--|37*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*36|38*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, /** @todo More Denormals. */ /* * Invalids. */ /*39|41*/ FP32_TABLE_D1_H_PS_INVALIDS /** @todo Underflow; Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_hsubps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_hsubps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_XMM1_XMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_YMM1_YMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_hsubps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_hsubps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_XMM1_XMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_YMM1_YMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_hsubps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_hsubps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_XMM1_XMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_YMM1_YMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_hsubps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE3, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_hsubps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE3, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_XMM8_XMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_YMM8_YMM9_YMM10_icebp_c64, 255, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vhsubps_YMM8_YMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]HSUBPD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_hsubpd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 7*/{ { /*src2 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /*src1 */ { FP64_INF(1), FP64_INF(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_INF(1), FP64_INF(0), FP64_0(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_IM, /*128:out */ X86_MXCSR_IM, /*256:out */ X86_MXCSR_IM }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_INF(1), FP64_INF(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_INF(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /*src1 */ { FP64_INF(1), FP64_INF(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_INF(1), FP64_INF(0), FP64_0(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ }, { { /*src2 */ { FP64_INF(1), FP64_INF(1), FP64_INF(0), FP64_0(0) } }, { /*src1 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_INF(1), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(0), FP64_QNAN(1), FP64_INF(1), FP64_QNAN(0) } }, { /*src1 */ { FP64_INF(0), FP64_QNAN(0), FP64_INF(1), FP64_QNAN(0) } }, { /* => */ { FP64_QNAN(0), FP64_QNAN(1), FP64_QNAN(0), FP64_QNAN(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, /* * Overflow, Precision. */ /*12*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_NORM_MIN(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_NORM_MIN(1), FP64_NORM_MAX(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_PE }, { { /*src2 */ { FP64_NORM_MIN(1), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MIN(0), FP64_NORM_MAX(0) } }, { /* => */ { FP64_INF(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_OE | X86_MXCSR_PE, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_OE | X86_MXCSR_PE }, { { /*src2 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_2(0), FP64_1(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_1(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(0), FP64_2(0), FP64_1(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_1(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_0(0), FP64_NORM_MIN(1) } }, { /*src1 */ { FP64_0(0), FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MIN(0) } }, { /* => */ { FP64_NORM_MAX(1), FP64_INF(0), FP64_V(1, 0, FP64_EXP_NORM_MIN + 1), FP64_NORM_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_0(0), FP64_NORM_MIN(1) } }, { /*src1 */ { FP64_0(0), FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MIN(0) } }, { /* => */ { FP64_NORM_MAX(1), FP64_INF(0), FP64_V(1, 0, FP64_EXP_NORM_MIN + 1), FP64_NORM_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_0(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MIN(1), FP64_NORM_MAX(0), FP64_NORM_MIN(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_NORM_MAX(1), FP64_0(0), FP64_INF(0), FP64_NORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_UP | X86_MXCSR_PE, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MIN(1), FP64_NORM_MIN(1), FP64_NORM_MIN(0), FP64_NORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MAX), FP64_NORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_PE }, { { /*src2 */ { FP64_0(0), FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MIN(0) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MIN(1), FP64_1(1) } }, { /* => */ { FP64_0(0), FP64_NORM_MAX(1), FP64_1(0), FP64_V(1, 0, FP64_EXP_NORM_MIN + 1) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_PE }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MAX(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MIN(0) } }, { /* => */ { FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_NORM_SAFE_INT_MAX(1), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_PE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_PE }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MAX(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MIN(0) } }, { /* => */ { FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MAX(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_PE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_PE }, /* * Denormals. */ /*23*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_0(0), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out *AND* different output values */ /*--|24*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_0(0), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*24|25*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_0(0), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(1), FP64_DENORM_MIN(1) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_XCPT_MASK }, /*26|27*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out *AND* different output values */ /*--|28*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } } /* result on HW (i7-10700) */, // IEM: { /* => */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_0(0) } } /* result on IEM */, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*27|29*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(1), FP64_DENORM_MAX(1) } }, { /*src1 */ { FP64_0(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(1), FP64_DENORM_MIN(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(1), FP64_DENORM_MIN(1) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_RC_DOWN | X86_MXCSR_DE }, /* * Invalids. */ /*31|33*/ FP64_TABLE_D1_H_PD_INVALIDS /** @todo Underflow; Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_hsubpd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_hsubpd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_XMM1_XMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_YMM1_YMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_hsubpd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_hsubpd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_XMM1_XMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_YMM1_YMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_hsubpd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_hsubpd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_XMM1_XMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_YMM1_YMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_hsubpd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE3, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_hsubpd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE3, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_XMM8_XMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_YMM8_YMM9_YMM10_icebp_c64, 255, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vhsubpd_YMM8_YMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]MULPS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_mulps(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_NORM_V0(0), FP32_NORM_V1(1), FP32_0(0), FP32_NORM_V3(1), FP32_0(0), FP32_NORM_V1(1), FP32_NORM_V4(0), FP32_NORM_V3(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_NORM_V2(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 6*/{ { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*128:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*256:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ }, { { /*src2 */ { FP32_INF(0), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, { /*src1 */ { FP32_INF(1), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_INF(0), FP32_INF(1) } }, { /* => */ { FP32_INF(1), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(1), FP32_INF(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(0), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(1), FP32_INF(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(0), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_IE, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_IE }, /* * Overflow, Precision. */ /*13*/{ { /*src2 */ { FP32_0(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_NORM_MAX(1), FP32_2(0) } }, { /*src1 */ { FP32_0(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_2(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_NORM_MAX(1), FP32_2(0) } }, { /*src1 */ { FP32_0(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_2(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_INF(1), FP32_INF(0), } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM, /*256:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, #ifdef TODO_X86_MXCSR_PE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out or 256:out */ /*--|15*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_INF(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, #endif /* TODO_X86_MXCSR_PE_IEM */ /*15|16*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_INF(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, #ifdef TODO_X86_MXCSR_PE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out or 256:out */ /*--|17*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_1(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_1(1), FP32_0(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_1(0), FP32_0(1), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, #endif /* TODO_X86_MXCSR_PE_IEM */ /*16|18*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_1(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_1(1), FP32_0(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_1(0), FP32_0(1), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, #ifdef TODO_X86_MXCSR_PE_IEM_SSE /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out or 256:out -- in complex circumstances: */ /** @todo PE is not set if any of the following are true on IEM: (1) !OM && !UM; (2) !OM && SSE; (3) !UM && SSE */ /** @todo PE is always set on HW (i7-10700), on both SSE & AVX, with any combination of OM & UM states */ /*--|19*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_V1(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_1(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_INF(0), FP32_0(0), FP32_NORM_V1(0), FP32_INF(0), FP32_INF(0), FP32_0(1), FP32_0(1), FP32_INF(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE, /*256:out */ X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE }, #endif /* TODO_X86_MXCSR_PE_IEM_SSE */ /*17|20*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_V1(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_1(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_INF(0), FP32_0(0), FP32_NORM_V1(0), FP32_INF(0), FP32_INF(0), FP32_0(1), FP32_0(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED | BS3_MXCSR_UM_FIXED }, #ifdef TODO_X86_MXCSR_PE_IEM_SSE /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out or 256:out -- in complex circumstances: */ /** @todo PE is not set if any of the following are true on IEM: (1) !OM && !UM; (2) !OM && SSE; (3) !UM && SSE */ /** @todo PE is always set on HW (i7-10700), on both SSE & AVX, with any combination of OM & UM states */ /*--|21*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_V3(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_NORM_MAX(0), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(1), FP32_0(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE }, #endif /* TODO_X86_MXCSR_PE_IEM_SSE */ /*18|22*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_V3(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0), FP32_NORM_MAX(1) } }, { /* => */ { FP32_NORM_MAX(0), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(1), FP32_0(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED | BS3_MXCSR_UM_FIXED }, #ifdef TODO_X86_MXCSR_PE_IEM_SSE /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out or 256:out -- in complex circumstances: */ /** @todo PE is not set if any of the following are true on IEM: (1) !OM && !UM; (2) !OM && SSE; (3) !UM && SSE */ /** @todo PE is always set on HW (i7-10700), on both SSE & AVX, with any combination of OM & UM states */ /*--|23*/{ { /*src2 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_2(0), FP32_1(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /*src1 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_1(1), FP32_2(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /* => */ { FP32_0(0), FP32_NORM_MAX(0), FP32_INF(1), FP32_2(1), FP32_2(0), FP32_INF(1), FP32_NORM_MAX(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE }, #endif /* TODO_X86_MXCSR_PE_IEM_SSE */ /*19|24*/{ { /*src2 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_2(0), FP32_1(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /*src1 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_1(1), FP32_2(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /* => */ { FP32_0(0), FP32_NORM_MAX(0), FP32_INF(1), FP32_2(1), FP32_2(0), FP32_INF(1), FP32_NORM_MAX(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED | BS3_MXCSR_UM_FIXED }, #ifdef TODO_X86_MXCSR_PE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out or 256:out */ /*--|25*/{ { /*src2 */ { FP32_1(0), FP32_NORM_V2(1), FP32_1(1), FP32_NORM_V6(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_V7(0), FP32_1(1), FP32_NORM_V4(0), FP32_1(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_V7(0), FP32_NORM_V2(0), FP32_NORM_V4(1), FP32_NORM_V6(1), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, #endif /* TODO_X86_MXCSR_PE_IEM */ /*20|26*/{ { /*src2 */ { FP32_1(0), FP32_NORM_V2(1), FP32_1(1), FP32_NORM_V6(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_V7(0), FP32_1(1), FP32_NORM_V4(0), FP32_1(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_V7(0), FP32_NORM_V2(0), FP32_NORM_V4(1), FP32_NORM_V6(1), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, #ifdef TODO_X86_MXCSR_PE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out or 256:out */ /*--|27*/{ { /*src2 */ { FP32_1(0), FP32_NORM_V2(1), FP32_1(1), FP32_NORM_V6(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_V7(0), FP32_1(1), FP32_NORM_V4(0), FP32_1(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_V7(0), FP32_NORM_V2(0), FP32_NORM_V4(1), FP32_NORM_V6(1), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, #endif /* TODO_X86_MXCSR_PE_IEM */ /*21|28*/{ { /*src2 */ { FP32_1(0), FP32_NORM_V2(1), FP32_1(1), FP32_NORM_V6(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_V7(0), FP32_1(1), FP32_NORM_V4(0), FP32_1(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_V7(0), FP32_NORM_V2(0), FP32_NORM_V4(1), FP32_NORM_V6(1), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, /** @todo More Overflow/Precision. */ /* * Normals. */ /*22|29*/{ { /*src2 */ { FP32_V(0, 0x600000, 0x7f)/*1.7500*/, FP32_NORM_V0(0), FP32_NORM_V1(0), FP32_NORM_V2(1), FP32_1(1), FP32_1(0), FP32_1(1), FP32_NORM_V6(1) } }, { /*src1 */ { FP32_V(0, 0, 0x7d)/*0.2500*/, FP32_1(0), FP32_1(1), FP32_0(0), FP32_NORM_V0(1), FP32_NORM_V3(0), FP32_NORM_V4(0), FP32_1(0) } }, { /* => */ { FP32_V(0, 0x600000, 0x7d)/*0.4375*/, FP32_NORM_V0(0), FP32_NORM_V1(1), FP32_0(1), FP32_NORM_V0(0), FP32_NORM_V3(0), FP32_NORM_V4(1), FP32_NORM_V6(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_V(0, 0x61e000, 0x89)/* 1807*/, FP32_V(0, 0x61e000, 0x89)/* 1807*/, FP32_V(0, 0x4a30b8, 0x8f)/* 103521.4375*/, FP32_V(0, 0x1a5200, 0x8c)/* 9876.5*/, FP32_V(0, 0x23b6a0, 0x8e)/*41910.625000*/, FP32_V(0, 0x23b6a0, 0x8e)/*41910.625000*/, FP32_V(0, 0, 0x7d)/*0.2500*/, FP32_V(0, 0x504000, 0x8a)/* 3332*/ } }, { /*src1 */ { FP32_V(0, 0x504000, 0x8a)/* 3332*/, FP32_V(0, 0x504000, 0x8a)/* 3332*/, FP32_V(0, 0x600000, 0x82)/* 14.0000*/, FP32_V(1, 0x1a4000, 0x89)/* -1234.0*/, FP32_V(0, 0, 0x7c)/* 0.125000*/, FP32_V(0, 0, 0x7c)/* 0.125000*/, FP32_V(0, 0x600000, 0x7f)/*1.7500*/, FP32_V(1, 0x61e000, 0x89)/* -1807*/ } }, { /* => */ { FP32_V(0, 0x37be78, 0x95)/*6020924*/, FP32_V(0, 0x37be78, 0x95)/*6020924*/, FP32_V(0, 0x30eaa1, 0x93)/*1449300.1250*/, FP32_V(1, 0x39f7d1, 0x96)/*-12187601.0*/, FP32_V(0, 0x23b6a0, 0x8b)/* 5238.828125*/, FP32_V(0, 0x23b6a0, 0x8b)/* 5238.828125*/, FP32_V(0, 0x600000, 0x7d)/*0.4375*/, FP32_V(1, 0x37be78, 0x95)/*-6020924*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_NORM_SAFE_INT_MAX(1), FP32_1(1), FP32_NORM_SAFE_INT_MIN(1), FP32_1(1), FP32_NORM_SAFE_INT_MIN(0), FP32_0(1) } }, { /*src1 */ { FP32_1(0), FP32_NORM_SAFE_INT_MIN(0), FP32_1(0), FP32_NORM_SAFE_INT_MAX(1), FP32_1(0), FP32_NORM_SAFE_INT_MIN(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(0) } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_1(0), FP32_NORM_MAX(1), FP32_1(1), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_1(0), FP32_1(1) } }, { /*src1 */ { FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_1(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1) } }, { /* => */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, /** @todo More Normals. */ /* * Denormals. */ /*26|33*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|35*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*28|36*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|41*/{ { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*33|42*/{ { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ }, /** @todo More Denormals. */ /* * Invalids. */ /*40|49*/ FP32_TABLE_D1_PS_INVALIDS /** @todo Underflow, Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_mulps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_mulps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulps_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulps_XMM1_XMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulps_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulps_YMM1_YMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_mulps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_mulps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulps_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulps_XMM1_XMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulps_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulps_YMM1_YMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_mulps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_mulps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulps_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulps_XMM1_XMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulps_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulps_YMM1_YMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_mulps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_mulps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulps_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vmulps_XMM8_XMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulps_YMM8_YMM9_YMM10_icebp_c64, 255, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vmulps_YMM8_YMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]MULPD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_mulpd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_NORM_V0(0), FP64_NORM_V1(1), FP64_0(0), FP64_NORM_V3(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_NORM_V2(1), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 7*/{ { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_INF(1), FP64_0(0) } }, { /*src1 */ { FP64_INF(1), FP64_0(0), FP64_INF(0), FP64_0(0) } }, { /* => */ { FP64_INF(1), FP64_0(0), FP64_INF(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*128:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*256:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(1), FP64_INF(0), FP64_INF(1), FP64_INF(0) } }, { /* => */ { FP64_INF(1), FP64_INF(0), FP64_INF(0), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_INF(0), FP64_INF(1), FP64_0(1), FP64_INF(0) } }, { /*src1 */ { FP64_INF(1), FP64_INF(0), FP64_0(1), FP64_INF(0) } }, { /* => */ { FP64_INF(1), FP64_INF(1), FP64_0(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_INF(0), FP64_INF(1), FP64_0(1), FP64_INF(0) } }, { /*src1 */ { FP64_INF(1), FP64_INF(0), FP64_0(1), FP64_INF(0) } }, { /* => */ { FP64_INF(1), FP64_INF(1), FP64_0(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_1(0), FP64_INF(0) } }, { /*src1 */ { FP64_1(0), FP64_NORM_V0(0), FP64_INF(0), FP64_NORM_V1(0) } }, { /* => */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_INF(1), FP64_INF(0), FP64_NORM_V3(0), FP64_INF(1) } }, { /*src1 */ { FP64_1(1), FP64_NORM_V3(1), FP64_INF(1), FP64_NORM_V1(1) } }, { /* => */ { FP64_INF(0), FP64_INF(1), FP64_INF(1), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, /* * Normals. */ /*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*/ } }, { /*src1 */ { FP64_1(0), FP64_V(0, 0x2d69a80000000, 0x413)/* 1234586.50*/, FP64_V(1, 0x4000000000000, 0x400)/* -2.50*/, FP64_V(0, 0xb800000000000, 0x402)/* 13.75000*/ } }, { /* => */ { 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*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_NORM_MAX(1), FP64_NORM_V3(1), FP64_1(0), FP64_1(1) } }, { /*src1 */ { FP64_1(1), FP64_1(0), FP64_NORM_V1(0), FP64_NORM_MIN(1) } }, { /* => */ { FP64_NORM_MAX(0), FP64_NORM_V3(1), FP64_NORM_V1(0), FP64_NORM_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*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*/ } }, { /*src1 */ { FP64_V(0, 0x8000000000000, 0x3fe)/* 0.75*/, FP64_V(1, 0, 0x400)/* -2.0000000*/, FP64_1(0), FP64_V(0, 0x8000000000000, 0x400)/* 3.00*/ } }, { /* => */ { 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*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_1(0), FP64_1(0), FP64_NORM_SAFE_INT_MIN(0), FP64_1(0) } }, { /*src1 */ { 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) } }, { /* => */ { 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) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_NORM_V0(0), FP64_NORM_V1(1), FP64_NORM_V2(0), FP64_NORM_V3(1) } }, { /*src1 */ { FP64_1(0), FP64_1(1), FP64_1(1), FP64_1(1) } }, { /* => */ { FP64_NORM_V0(0), FP64_NORM_V1(0), FP64_NORM_V2(1), FP64_NORM_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, /** @todo More Normals. */ /* * Denormals. */ /*18*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_DE }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_1(0), FP64_DENORM_MIN(0), FP64_1(0) } }, { /*src1 */ { FP64_1(0), FP64_DENORM_MAX(0), FP64_1(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ }, { { /*src2 */ { FP64_DENORM_MIN(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, { /*src1 */ { FP64_DENORM_MAX(1), FP64_DENORM_MIN(1), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_1(0), FP64_NORM_V1(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_1(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_NORM_V0(0), FP64_NORM_V1(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_DE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1), FP64_DENORM_MIN(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(0), } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_PE_FUZZY /* IEM */, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1), FP64_DENORM_MIN(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_PE_FUZZY /* IEM */, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_PE_FUZZY /* IEM */ }, /* * Overflow, Precision. */ /*26*/{ { /*src2 */ { FP64_NORM_V3(1), FP64_1(0), FP64_NORM_MAX(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_1(0), FP64_1(0), FP64_1(0), FP64_NORM_MAX(0) } }, { /* => */ { FP64_NORM_V3(1), FP64_1(0), FP64_NORM_MAX(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_V3(1), FP64_1(0) } }, { /*src1 */ { FP64_1(0), FP64_NORM_MAX(0), FP64_1(0), FP64_1(0) } }, { /* => */ { FP64_NORM_MAX(0), FP64_INF(0), FP64_NORM_V3(1), FP64_1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src2 */ { FP64_NORM_V3(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_1(0) } }, { /*src1 */ { FP64_1(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_V1(0) } }, { /* => */ { FP64_NORM_V3(0), FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_V1(0) } }, /*mxcsr:in */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */, /*256:out */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MIN(1), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /* => */ { FP64_INF(0), FP64_0(0), FP64_V(0, FP64_FRAC_NORM_MAX, RTFLOAT64U_EXP_BIAS + 1), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_OE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src2 */ { FP64_NORM_V3(0), FP64_1(1), FP64_NORM_MAX(1), FP64_NORM_MIN(0) } }, { /*src1 */ { FP64_1(0), FP64_NORM_V2(1), FP64_NORM_MAX(1), FP64_NORM_MAX(1) } }, { /* => */ { FP64_NORM_V3(0), FP64_NORM_V2(0), FP64_NORM_MAX(0), FP64_V(1, FP64_FRAC_NORM_MAX, RTFLOAT64U_EXP_BIAS + 1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM) | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM) | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM) | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_MAX(0), FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MIN(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_MAX(1), FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MAX(0) } }, { /* => */ { 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) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_MAX(0), FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MIN(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_MAX(1), FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MAX(0) } }, { /* => */ { FP64_V(0, FP64_FRAC_NORM_MAX, FP64_FRAC_BITS + 1), FP64_INF(1), FP64_V(0, FP64_FRAC_NORM_MAX - 1, 0x468), FP64_V(0, FP64_FRAC_NORM_MAX, 0x035) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_PE }, /* * Invalids. */ /*33*/ FP64_TABLE_D1_PD_INVALIDS /** @todo Underflow, Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_mulpd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_mulpd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_XMM1_XMM2_XMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_YMM1_YMM2_YMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_YMM1_YMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_mulpd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_mulpd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_XMM1_XMM2_XMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_YMM1_YMM2_YMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_YMM1_YMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_mulpd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_mulpd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_XMM1_XMM2_XMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_YMM1_YMM2_YMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_YMM1_YMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_mulpd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE2, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_mulpd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_XMM8_XMM9_XMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_YMM8_YMM9_YMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vmulpd_YMM8_YMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]MULSS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_mulss(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_0(0), FP32_0_x7(0) } }, { /* => */ { FP32_0(0), FP32_0_x7(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_0(0), FP32_0_x7(0) } }, { /* => */ { FP32_0(0), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V5 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V7 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V7 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_1(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, /* * Infinity. */ /* 7*/{ { /*src2 */ { FP32_INF(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_1(1), FP32_0_x7(0) } }, { /* => */ { FP32_INF(1), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*128:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_0_x7(0) } }, { /*src1 */ { FP32_1(1), FP32_0_x7(0) } }, { /* => */ { FP32_INF(0), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ (X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM) | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ (X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM) | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_1(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_1(1), FP32_RAND_x7_V0 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, /* * Normals. */ /*14*/{ { /*src2 */ { FP32_V(0, 0x600000, 0x7f)/*1.7500*/, FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_V(0, 0, 0x7d)/*0.2500*/, FP32_RAND_x7_V4 } }, { /* => */ { FP32_V(0, 0x600000, 0x7d)/*0.4375*/, FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x61e000, 0x89)/* 1807*/, FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_V(0, 0x504000, 0x8a)/* 3332*/, FP32_RAND_x7_V5 } }, { /* => */ { FP32_V(0, 0x37be78, 0x95)/*6020924*/, FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_1(0), FP32_RAND_x7_V6 } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x61e000, 0x89)/* 1807*/, FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_V(0, 0x504000, 0x8a)/* 3332*/, FP32_RAND_x7_V2 } }, { /* => */ { FP32_V(0, 0x37be78, 0x95)/*6020924*/, FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x4a30b8, 0x8f)/* 103521.4375*/, FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_V(0, 0x600000, 0x82)/* 14.0000*/, FP32_RAND_x7_V2 } }, { /* => */ { FP32_V(0, 0x30eaa1, 0x93)/*1449300.1250*/, FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x1a5200, 0x8c)/* 9876.5*/, FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_V(1, 0x1a4000, 0x89)/* -1234.0*/, FP32_RAND_x7_V5 } }, { /* => */ { FP32_V(1, 0x39f7d1, 0x96)/*-12187601.0*/, FP32_RAND_x7_V5 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_1(1), FP32_RAND_x7_V4 } }, { /* => */ { FP32_NORM_MAX(1), FP32_RAND_x7_V4 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x23b6a0, 0x8e)/*41910.625000*/, FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_V(0, 0, 0x7c)/* 0.125000*/, FP32_RAND_x7_V5 } }, { /* => */ { FP32_V(0, 0x23b6a0, 0x8b)/* 5238.828125*/, FP32_RAND_x7_V5 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_1(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, /** @todo More Normals. */ /* * Denormals. */ /*23*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, /** @todo More Denormals. */ /* * Invalids. */ /*27*/ FP32_TABLE_D1_SS_INVALIDS /** @todo Overflow, Underflow, Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_mulss_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_mulss_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulss_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulss_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_mulss_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_mulss_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulss_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulss_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_mulss_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_mulss_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulss_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulss_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_mulss_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_mulss_XMM8_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulss_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vmulss_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); } /* * [V]MULSD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_mulsd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_NORM_V3(0), FP64_NORM_V2(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_NORM_V1(0) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_NORM_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_0(1), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_0(1), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_1(0), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, /* * Infinity. */ /* 8*/{ { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_1(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*128:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_1(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_INF(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ (X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM) | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ (X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM) | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V0(0) } }, { /* => */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_1(0), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_1(1), FP64_INF(1), FP64_INF(1), FP64_INF(0) } }, { /* => */ { FP64_INF(1), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_QNAN(0), FP64_SNAN(0), FP64_RAND_V0(0) } }, { /*src1 */ { FP64_INF(0), FP64_QNAN(0), FP64_SNAN(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_INF(1), FP64_QNAN(0), FP64_SNAN(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, /* * Normals. */ /*15*/{ { /*src2 */ { FP64_V(0, 0xe66f500000000, 0x40d)/*31131.828125*/, FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_1(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_V(0, 0xe66f500000000, 0x40d)/*31131.828125*/, FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xaf00000000000, 0x406)/* 215.50*/, FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_V(0, 0x2d69a80000000, 0x413)/* 1234586.50*/, FP64_RAND_V1(0), FP64_RAND_V1(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_V(0, 0xfb74e1d800000, 0x41a)/*266053390.75*/, FP64_RAND_V1(0), FP64_RAND_V1(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(1, 0x107526e749f80, 0x42b)/*-18723145413791.50*/, FP64_RAND_V3(0), FP64_RAND_V1(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(1, 0x4000000000000, 0x400)/* -2.50*/, FP64_RAND_V0(0), FP64_RAND_V2(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_V(0, 0x549270a11c760, 0x42c)/* 46807863534478.75*/, FP64_RAND_V0(0), FP64_RAND_V2(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0x6fee0e4bd0000, 0x420)/* 12345678999.62500*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0xb800000000000, 0x402)/* 13.75000*/, FP64_RAND_V2(0), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, { /* => */ { FP64_V(0, 0x3c30944926c00, 0x424)/*169753086244.84375*/, FP64_RAND_V2(0), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(1), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_1(1), FP64_RAND_V1(1), FP64_RAND_V0(0), FP64_RAND_V2(0) } }, { /* => */ { FP64_NORM_MAX(0), FP64_RAND_V1(1), FP64_RAND_V0(0), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_RAND_V2(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x8000000000000, 0x3fe)/* 0.75*/, FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /* => */ { FP64_V(0, 0x4da20a80c6990, 0x42e)/*183416666481484.50*/, FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(1, 0x68b83b1ed4000, 0x41e)/*-3025935759.4140625*/, FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_V(1, 0, 0x400)/* -2.0000000*/, FP64_RAND_V2(0), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, { /* => */ { FP64_V(0, 0x68b83b1ed4000, 0x41f)/* 6051871518.8281250*/, FP64_RAND_V2(0), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x8000000000000, 0x400)/* 3.00*/, FP64_RAND_V1(1), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(0, 0x4a6a82b05f744, 0x42f)/*363296296296308.25*/, FP64_RAND_V1(1), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_1(0), FP64_0(0), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_MAX(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_INF(1), FP64_NORM_SAFE_INT_MIN(1) } }, { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_INF(1), FP64_NORM_SAFE_INT_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_V0(0), FP64_NORM_V1(1), FP64_NORM_V2(0), FP64_NORM_V3(1) } }, { /*src1 */ { FP64_1(0), FP64_SNAN(0), FP64_SNAN(1), FP64_QNAN(0) } }, { /* => */ { FP64_NORM_V0(0), FP64_SNAN(0), FP64_SNAN(1), FP64_QNAN(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, /* * Denormals. */ /*25*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0), FP64_DENORM_MAX(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_0(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V1(1), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_1(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(1), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MAX(1), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_1(1), FP64_RAND_V3(0), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_DE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_1(1), FP64_RAND_V3(0), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DM | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_1(1), FP64_RAND_V3(0), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_DE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, #ifdef TODO_X86_MXCSR_PE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out */ /*--|34*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, #endif /* TODO_X86_MXCSR_PE_IEM */ /*34|35*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1), FP64_DENORM_MIN(1) } }, { /* => */ { FP64_0(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1), FP64_DENORM_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1), FP64_DENORM_MIN(1) } }, { /* => */ { FP64_0(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1), FP64_DENORM_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1), FP64_DENORM_MIN(1) } }, { /* => */ { FP64_0(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1), FP64_DENORM_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, /* * Invalids. */ /*38|39*/ FP64_TABLE_D1_SD_INVALIDS /** @todo Underflow, Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_mulsd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_mulsd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulsd_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulsd_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_mulsd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_mulsd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulsd_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulsd_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_mulsd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_mulsd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulsd_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmulsd_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_mulsd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_mulsd_XMM8_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vmulsd_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vmulsd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); } /* * [V]DIVPS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_divps(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = { /** @todo Improve port from mulps */ /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_IE, /*256:out */ X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP32_NORM_V0(0), FP32_NORM_V1(1), FP32_0(0), FP32_NORM_V3(1), FP32_0(0), FP32_NORM_V1(1), FP32_NORM_V4(0), FP32_NORM_V3(0) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_QNAN(1), FP32_0(1), FP32_QNAN(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE }, /* * Infinity. */ /* 6*/{ { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*128:out */ (X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM) | X86_MXCSR_IE, /*256:out */ (X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM) | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(0), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, { /*src1 */ { FP32_INF(1), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(0), FP32_INF(1), FP32_QNAN(0), FP32_QNAN(1), FP32_INF(0), FP32_QNAN(1), FP32_QNAN(0), FP32_INF(1) } }, { /*src1 */ { FP32_QNAN(0), FP32_QNAN(0), FP32_INF(1), FP32_INF(1), FP32_QNAN(1), FP32_INF(0), FP32_INF(0), FP32_QNAN(1) } }, { /* => */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(0), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_INF(0), FP32_INF(1), FP32_QNAN(0), FP32_QNAN(1), FP32_INF(0), FP32_QNAN(1), FP32_QNAN(0), FP32_INF(1) } }, { /*src1 */ { FP32_QNAN(0), FP32_QNAN(0), FP32_INF(1), FP32_INF(1), FP32_QNAN(1), FP32_INF(0), FP32_INF(0), FP32_QNAN(1) } }, { /* => */ { FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN(0), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(0), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_DAZ }, /* * Overflow, Precision. */ #ifdef TODO_X86_MXCSR_PE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 256:out */ /*--|13*/{ { /*src2 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_NORM_MAX(1), FP32_2(0) } }, { /*src1 */ { FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_2(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_V(1, 0x400000, 0), FP32_V(0, FP32_FRAC_NORM_MAX, FP32_EXP_NORM_MAX - 1) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_PE_IEM */ /*13|14*/{ { /*src2 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_NORM_MAX(1), FP32_2(0) } }, { /*src1 */ { FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_2(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_V(1, 0x400000, 0), FP32_V(0, FP32_FRAC_NORM_MAX, FP32_EXP_NORM_MAX - 1) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM, /*256:out */ X86_MXCSR_UM | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_UM_FIXED }, #ifdef TODO_X86_MXCSR_PE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 256:out */ /*--|15*/{ { /*src2 */ { FP32_V(0,0,0x7e)/*0.50*/, FP32_1(1), FP32_1(0), FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(0) } }, { /* => */ { FP32_INF(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_V(1,0x200000,0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_OM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_PE_IEM */ /*14|16*/{ { /*src2 */ { FP32_V(0,0,0x7e)/*0.50*/, FP32_1(1), FP32_1(0), FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(0) } }, { /* => */ { FP32_INF(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_V(1,0x200000,0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_OE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_OM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_V(0,0,0x7e)/*0.50*/, FP32_1(1), FP32_1(0), FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(0) } }, { /* => */ { FP32_INF(0), FP32_1(1), FP32_0(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_V(1,0x200000,0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_OM_FIXED }, #ifdef TODO_X86_MXCSR_PE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out or 256:out */ /*--|18*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_1(0), FP32_1(0), FP32_NORM_MAX(0), FP32_1(1), FP32_1(0), FP32_NORM_MIN(0) } }, { /*src1 */ { FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_1(0), FP32_1(0), FP32_NORM_MIN(1), FP32_1(0), FP32_1(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_NORM_MAX(1), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(1), FP32_1(1), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_OM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_OM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_PE_IEM */ /*16|19*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_1(0), FP32_1(0), FP32_NORM_MAX(0), FP32_1(1), FP32_1(0), FP32_NORM_MIN(0) } }, { /*src1 */ { FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_1(0), FP32_1(0), FP32_NORM_MIN(1), FP32_1(0), FP32_1(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_NORM_MAX(1), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(1), FP32_1(1), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_1(0), FP32_1(0), FP32_NORM_MAX(0), FP32_1(1), FP32_1(0), FP32_NORM_MIN(0) } }, { /*src1 */ { FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_1(0), FP32_1(0), FP32_NORM_MIN(1), FP32_1(0), FP32_1(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_NORM_MAX(1), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(1), FP32_1(1), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_UM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_UM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_V1(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_INF(0), FP32_0(0), FP32_NORM_V1(0), FP32_INF(0), FP32_INF(0), FP32_0(1), FP32_0(1), FP32_INF(1) } }, { /* => */ { FP32_INF(0), FP32_0(1), FP32_1(0), FP32_INF(0), FP32_INF(1), FP32_0(1), FP32_0(0), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM, /*256:out */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_V3(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(1), FP32_0(1), FP32_INF(1) } }, { /* => */ { FP32_1(0), FP32_0(1), FP32_0(0), FP32_1(0), FP32_1(1), FP32_0(1), FP32_0(0), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_2(0), FP32_1(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /*src1 */ { FP32_0(0), FP32_NORM_MAX(0), FP32_INF(1), FP32_2(1), FP32_2(0), FP32_INF(1), FP32_NORM_MAX(0), FP32_0(0) } }, { /* => */ { FP32_0(1), FP32_1(0), FP32_INF(1), FP32_1(1), FP32_2(1), FP32_INF(1), FP32_1(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_1(0), FP32_NORM_V2(1), FP32_1(1), FP32_NORM_V6(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_V7(0), FP32_NORM_V2(0), FP32_NORM_V4(1), FP32_NORM_V6(1), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, { /* => */ { FP32_NORM_V7(0), FP32_1(1), FP32_NORM_V4(0), FP32_1(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ }, /** @todo More Overflow/Precision. */ /* * Normals. */ /*22|25*/{ { /*src2 */ { FP32_V(0, 0x600000, 0x7f)/*1.7500*/, FP32_NORM_V0(0), FP32_NORM_V1(0), FP32_NORM_V2(1), FP32_1(1), FP32_1(0), FP32_1(1), FP32_NORM_V6(1) } }, { /*src1 */ { FP32_V(0, 0x600000, 0x7d)/*0.4375*/, FP32_NORM_V0(0), FP32_NORM_V1(1), FP32_0(1), FP32_NORM_V0(0), FP32_NORM_V3(0), FP32_NORM_V4(1), FP32_NORM_V6(1) } }, { /* => */ { FP32_V(0, 0, 0x7d)/*0.2500*/, FP32_1(0), FP32_1(1), FP32_0(0), FP32_NORM_V0(1), FP32_NORM_V3(0), FP32_NORM_V4(0), FP32_1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_V(0, 0x61e000, 0x89)/* 1807*/, FP32_V(0, 0x61e000, 0x89)/* 1807*/, FP32_V(0, 0x4a30b8, 0x8f)/* 103521.4375*/, FP32_V(0, 0x1a5200, 0x8c)/* 9876.5*/, FP32_V(0, 0x23b6a0, 0x8e)/*41910.625000*/, FP32_V(0, 0x23b6a0, 0x8e)/*41910.625000*/, FP32_V(0, 0, 0x7d)/*0.2500*/, FP32_V(0, 0x504000, 0x8a)/* 3332*/ } }, { /*src1 */ { FP32_V(0, 0x37be78, 0x95)/*6020924*/, FP32_V(0, 0x37be78, 0x95)/*6020924*/, FP32_V(0, 0x30eaa1, 0x93)/*1449300.1250*/, FP32_V(1, 0x39f7d1, 0x96)/*-12187601.0*/, FP32_V(0, 0x23b6a0, 0x8b)/* 5238.828125*/, FP32_V(0, 0x23b6a0, 0x8b)/* 5238.828125*/, FP32_V(0, 0x600000, 0x7d)/*0.4375*/, FP32_V(1, 0x37be78, 0x95)/*-6020924*/ } }, { /* => */ { FP32_V(0, 0x504000, 0x8a)/* 3332*/, FP32_V(0, 0x504000, 0x8a)/* 3332*/, FP32_V(0, 0x600000, 0x82)/* 14.0000*/, FP32_V(1, 0x1a4000, 0x89)/* -1234.0*/, FP32_V(0, 0, 0x7c)/* 0.125000*/, FP32_V(0, 0, 0x7c)/* 0.125000*/, FP32_V(0, 0x600000, 0x7f)/*1.7500*/, FP32_V(1, 0x61e000, 0x89)/* -1807*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_NORM_SAFE_INT_MAX(1), FP32_1(1), FP32_NORM_SAFE_INT_MIN(1), FP32_1(1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MAX(0) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_1(0), FP32_NORM_SAFE_INT_MIN(0), FP32_1(0), FP32_NORM_SAFE_INT_MAX(1), FP32_1(0), FP32_NORM_SAFE_INT_MIN(1), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_1(0), FP32_NORM_MAX(1), FP32_1(1), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_1(0), FP32_1(1) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(0) } }, { /* => */ { FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_NORM_MAX(1), FP32_1(0), FP32_1(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, /** @todo More Normals. */ /* * Denormals. */ /*26|29*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE | X86_MXCSR_ZE }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 256:out */ /*--|30*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0) } }, { /* => */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*27|31*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0) } }, { /* => */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_IE }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_IE }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE | X86_MXCSR_ZE }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /* => */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0) } }, { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 256:out */ /*--|36*/{ { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /* => */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0) } }, { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*32|37*/{ { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1) } }, { /* => */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0) } }, { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_IE }, { { /*src2 */ { FP32_1(0), FP32_1(0), FP32_1(1), FP32_1(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1) } }, { /*src1 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_IE }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MIN(1) } }, { /* => */ { FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_IE }, /** @todo More Denormals. */ /* * Invalids. */ /*39|44*/ FP32_TABLE_D1_PS_INVALIDS /** @todo Underflow, Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_divps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_divps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivps_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivps_XMM1_XMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivps_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivps_YMM1_YMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_divps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_divps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivps_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivps_XMM1_XMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivps_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivps_YMM1_YMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_divps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_divps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivps_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivps_XMM1_XMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivps_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivps_YMM1_YMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_divps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_divps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivps_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vdivps_XMM8_XMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivps_YMM8_YMM9_YMM10_icebp_c64, 255, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vdivps_YMM8_YMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]DIVPD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_divpd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PD_T const s_aValues[] = { /* * Zero. */ { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_IE }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_IE, /*256:out */ X86_MXCSR_IE }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE }, { { /*src2 */ { FP64_NORM_V0(0), FP64_NORM_V1(1), FP64_0(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_NORM_V2(1), FP64_NORM_V3(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_INF(1), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_ZE }, /* * Infinity. */ /* 7*/{ { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_INF(0), FP64_INF(1), FP64_INF(1), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_1(1), FP64_NORM_V1(1) } }, { /*src1 */ { FP64_1(0), FP64_NORM_V0(1), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_INF(1), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_1(1), FP64_NORM_V2(1) } }, { /*src1 */ { FP64_1(0), FP64_NORM_V3(1), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_INF(1), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, /* * Normals. */ /*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*/ } }, { /*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*/ } }, { /* => */ { FP64_1(0), FP64_V(0, 0x2d69a80000000, 0x413)/* 1234586.50*/, FP64_V(1, 0x4000000000000, 0x400)/* -2.50*/, FP64_V(0, 0xb800000000000, 0x402)/* 13.75000*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_NORM_MAX(1), FP64_NORM_V3(1), FP64_1(0), FP64_1(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_V3(1), FP64_NORM_V1(0), FP64_NORM_MIN(0) } }, { /* => */ { FP64_1(1), FP64_1(0), FP64_NORM_V1(0), FP64_NORM_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*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*/ } }, { /*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*/ } }, { /* => */ { FP64_V(0, 0x8000000000000, 0x3fe)/* 0.75*/, FP64_V(1, 0, 0x400)/* -2.0000000*/, FP64_1(0), FP64_V(0, 0x8000000000000, 0x400)/* 3.00*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_1(0), FP64_1(0), FP64_NORM_SAFE_INT_MIN(0), FP64_1(0) } }, { /*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) } }, { /* => */ { 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) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_NORM_V0(0), FP64_NORM_V1(1), FP64_NORM_V2(0), FP64_NORM_V3(1) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_NORM_V1(0), FP64_NORM_V2(1), FP64_NORM_V3(0) } }, { /* => */ { FP64_1(0), FP64_1(1), FP64_1(1), FP64_1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, /** @todo More Normals. */ /* * Denormals. */ /*18*/{ { /*src2 */ { FP64_DENORM_MAX(1), FP64_DENORM_MIN(0), FP64_DENORM_MIN(1), FP64_DENORM_MAX(0),} }, { /*src1 */ { FP64_0(1), FP64_DENORM_MIN(1), FP64_0(0), FP64_DENORM_MAX(0),} }, { /* => */ { FP64_0(0), FP64_1(1), FP64_0(1), FP64_1(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP64_1(0), FP64_1(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_DE }, { { /*src2 */ { FP64_1(0), FP64_1(1), FP64_1(0), FP64_1(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_DE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */ }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 256:out */ /*--|21*/{ { /*src2 */ { FP64_1(0), FP64_1(1), FP64_1(0), FP64_1(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*21|22*/{ { /*src2 */ { FP64_1(0), FP64_1(1), FP64_1(0), FP64_1(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 256:out */ /*--|23*/{ { /*src2 */ { FP64_1(0), FP64_1(1), FP64_1(0), FP64_1(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*22|24*/{ { /*src2 */ { FP64_1(0), FP64_1(1), FP64_1(0), FP64_1(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_UM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_UM, /*256:out */ X86_MXCSR_DM | X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP64_1(0), FP64_1(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_0(0), FP64_1(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_QNAN(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_IE | X86_MXCSR_ZE }, { { /*src2 */ { FP64_1(0), FP64_1(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0),} }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_1(0), FP64_1(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_INF(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_ZE }, { { /*src2 */ { FP64_DENORM_MIN(1), FP64_DENORM_MIN(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1) } }, { /*src1 */ { FP64_1(0), FP64_1(1), FP64_DENORM_MIN(0), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_INF(1), FP64_INF(0), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_ZE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_ZE | X86_MXCSR_IE }, { { /*src2 */ { FP64_1(0), FP64_NORM_V1(0), FP64_DENORM_MAX(0), FP64_1(0) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_NORM_V1(0), FP64_0(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_NORM_V0(0), FP64_1(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_DE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_INF(1), FP64_INF(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_INF(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE }, /* * Overflow, Precision. */ /*29|31*/{ { /*src2 */ { FP64_NORM_V3(1), FP64_1(0), FP64_NORM_MAX(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_V3(1), FP64_1(0), FP64_NORM_MAX(0), FP64_INF(0) } }, { /* => */ { FP64_1(0), FP64_1(0), FP64_1(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_NORM_V3(1), FP64_1(1), FP64_NORM_MIN(0), FP64_NORM_MIN(0) } }, { /*src1 */ { FP64_NORM_V3(0), FP64_1(1), FP64_NORM_MIN(1), FP64_NORM_MAX(0) } }, { /* => */ { FP64_1(1), FP64_1(0), FP64_1(1), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */ }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_V3(1), FP64_NORM_MAX(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_INF(0), FP64_NORM_V3(1), FP64_NORM_MIN(0) } }, { /* => */ { FP64_1(0), FP64_INF(0), FP64_1(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src2 */ { FP64_NORM_V3(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_V(1, 0, 0x3fe)/*-0.5*/ } }, { /*src1 */ { FP64_NORM_V3(1), FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_1(1), FP64_1(0), FP64_1(1), FP64_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP64_NORM_V3(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_V(1, 0, 0x3fe)/*-0.5*/ } }, { /*src1 */ { FP64_NORM_V3(1), FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_1(1), FP64_1(0), FP64_1(1), FP64_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_V3(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_V(1, 0, 0x3fe)/*-0.5*/ } }, { /*src1 */ { FP64_NORM_V3(1), FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_1(1), FP64_1(0), FP64_1(1), FP64_NORM_MAX(0) } }, /*mxcsr:in */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */ }, { { /*src2 */ { FP64_NORM_V3(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_V(1, 0, 0x3fe)/*-0.5*/ } }, { /*src1 */ { FP64_NORM_V3(1), FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_1(1), FP64_1(0), FP64_1(1), FP64_INF(0) } }, /*mxcsr:in */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ, /*128:out */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ, /*256:out */ (X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM)) | X86_MXCSR_DAZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */ }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_MIN(1), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_INF(0), FP64_0(0), FP64_V(0, FP64_FRAC_NORM_MAX, RTFLOAT64U_EXP_BIAS + 1), FP64_INF(0) } }, { /* => */ { FP64_INF(0), FP64_0(1), FP64_NORM_MAX(1), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OM | X86_MXCSR_UM | X86_MXCSR_PM }, { { /*src2 */ { FP64_NORM_V3(0), FP64_1(1), FP64_V(1, 0, 0x3fe)/*-0.5*/, FP64_NORM_MIN(0) } }, { /*src1 */ { FP64_NORM_V3(0), FP64_NORM_V2(0), FP64_NORM_MAX(0), FP64_V(1, FP64_FRAC_NORM_MAX, RTFLOAT64U_EXP_BIAS + 1) } }, { /* => */ { FP64_1(0), FP64_NORM_V2(1), FP64_NORM_MAX(1), FP64_NORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM) | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM) | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK & ~(X86_MXCSR_OM | X86_MXCSR_PM) | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* i7-10700, IEM */ }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_MAX(0), FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MIN(0) } }, { /*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) } }, { /* => */ { 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) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_PE }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_MAX(0), FP64_V(0, 0x8000000000000, 0x400)/*3.0*/, FP64_1(1) } }, { /*src1 */ { FP64_V(0, FP64_FRAC_NORM_MAX, FP64_FRAC_BITS + 1), FP64_INF(1), FP64_1(1), FP64_1(0) } }, { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_INF(1), FP64_V(1, 0x5555555555556, 0x3fd)/*1/3*/, FP64_1(1) } }, /*mxcsr:in */ X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_PE }, /* * Invalids. */ /*40|42*/ FP64_TABLE_D1_PD_INVALIDS /** @todo Underflow, Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_divpd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_divpd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_XMM1_XMM2_XMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_YMM1_YMM2_YMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_YMM1_YMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_divpd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_divpd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_XMM1_XMM2_XMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_YMM1_YMM2_YMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_YMM1_YMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_divpd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_divpd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_XMM1_XMM2_XMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_YMM1_YMM2_YMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_YMM1_YMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_divpd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE2, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_divpd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_XMM8_XMM9_XMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_YMM8_YMM9_YMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vdivpd_YMM8_YMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]DIVSS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_divss(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_0(0), FP32_0_x7(0) } }, { /* => */ { FP32_QNAN(1), FP32_0_x7(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_0(0), FP32_0_x7(0) } }, { /* => */ { FP32_QNAN(1), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V4 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V5 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_1(0), FP32_RAND_x7_V6 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_FSW_ZE, /*256:out */ -1 }, /* * Infinity. */ /* 7*/{ { /*src2 */ { FP32_INF(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_1(1), FP32_0_x7(0) } }, { /* => */ { FP32_0(1), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*128:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_0_x7(0) } }, { /*src1 */ { FP32_1(1), FP32_0_x7(0) } }, { /* => */ { FP32_0(0), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V0 } }, /*mxcsr:in */ (X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM) | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ (X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM) | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP32_1(0), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V6 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_1(1), FP32_RAND_x7_V5 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, /* * Normals. */ /*14*/{ { /*src2 */ { FP32_V(0, 0x600000, 0x7f)/*1.7500*/, FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_V(0, 0x600000, 0x7d)/*0.4375*/, FP32_RAND_x7_V6 } }, { /* => */ { FP32_V(0, 0, 0x7d)/*0.2500*/, FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x61e000, 0x89)/* 1807*/, FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_V(0, 0x37be78, 0x95)/*6020924*/, FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(0, 0x504000, 0x8a)/* 3332*/, FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_1(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x61e000, 0x89)/* 1807*/, FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_V(0, 0x37be78, 0x95)/*6020924*/, FP32_RAND_x7_V7 } }, { /* => */ { FP32_V(0, 0x504000, 0x8a)/* 3332*/, FP32_RAND_x7_V7 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x4a30b8, 0x8f)/* 103521.4375*/, FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_V(0, 0x30eaa1, 0x93)/*1449300.1250*/, FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(0, 0x600000, 0x82)/* 14.0000*/, FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x1a5200, 0x8c)/* 9876.5*/, FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_V(1, 0x39f7d1, 0x96)/*-12187601.0*/, FP32_RAND_x7_V6 } }, { /* => */ { FP32_V(1, 0x1a4000, 0x89)/* -1234.0*/, FP32_RAND_x7_V6 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_NORM_MAX(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_1(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x23b6a0, 0x8e)/*41910.625000*/, FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_V(0, 0x23b6a0, 0x8b)/* 5238.828125*/, FP32_RAND_x7_V2 } }, { /* => */ { FP32_V(0, 0, 0x7c)/* 0.125000*/, FP32_RAND_x7_V2 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V4 } }, { /* => */ { FP32_1(0), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, /** @todo More Normals. */ /* * Denormals. */ /*23*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_ZE, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V2 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_ZE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V4 } }, { /* => */ { FP32_QNAN(1), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, /*256:out */ -1 }, /** @todo More Denormals. */ /* * Invalids. */ /*27*/ FP32_TABLE_D1_SS_INVALIDS /** @todo Overflow; Underflow; Precision; Rounding, FZ etc. */ }; /** @todo Make cdefs.h 'RT_ELEMENTS(arr), arr' macro? But extra cast, here. */ /** @todo Do this to existing instr-4 tests? instr-3? Beyond? */ #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_divss_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_divss_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivss_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivss_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_divss_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_divss_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivss_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivss_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_divss_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_divss_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivss_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivss_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_divss_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_divss_XMM8_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivss_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vdivss_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); } /* * [V]DIVSD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_divsd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_QNAN(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_NORM_V3(0), FP64_NORM_V2(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_NORM_V1(0) } }, { /* => */ { FP64_QNAN(1), FP64_0(1), FP64_0(1), FP64_NORM_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V1(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_1(0), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_INF(0), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_FSW_ZE, /*256:out */ -1 }, /* * Infinity. */ /* 7*/{ { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_1(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*128:out */ X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_1(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ (X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM) | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ (X86_MXCSR_XCPT_MASK & ~X86_MXCSR_IM) | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V0(0) } }, { /* => */ { FP64_QNAN(1), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, { { /*src2 */ { FP64_1(0), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_1(1), FP64_INF(1), FP64_INF(1), FP64_INF(0) } }, { /* => */ { FP64_0(1), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_QNAN(0), FP64_SNAN(0), FP64_RAND_V0(0) } }, { /*src1 */ { FP64_INF(0), FP64_QNAN(0), FP64_SNAN(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(0), FP64_SNAN(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ -1 }, /* * Normals. */ /*14*/{ { /*src2 */ { FP64_V(0, 0xe66f500000000, 0x40d)/*31131.828125*/, FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_V(0, 0xe66f500000000, 0x40d)/*31131.828125*/, FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_1(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xaf00000000000, 0x406)/* 215.50*/, FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_V(0, 0xfb74e1d800000, 0x41a)/*266053390.75*/, FP64_RAND_V1(0), FP64_RAND_V1(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_V(0, 0x2d69a80000000, 0x413)/* 1234586.50*/, FP64_RAND_V1(0), FP64_RAND_V1(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(1, 0x107526e749f80, 0x42b)/*-18723145413791.50*/, FP64_RAND_V3(0), FP64_RAND_V1(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x549270a11c760, 0x42c)/* 46807863534478.75*/, FP64_RAND_V0(0), FP64_RAND_V2(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_V(1, 0x4000000000000, 0x400)/* -2.50*/, FP64_RAND_V0(0), FP64_RAND_V2(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0x6fee0e4bd0000, 0x420)/* 12345678999.62500*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x3c30944926c00, 0x424)/*169753086244.84375*/, FP64_RAND_V2(0), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, { /* => */ { FP64_V(0, 0xb800000000000, 0x402)/* 13.75000*/, FP64_RAND_V2(0), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(1), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V1(1), FP64_RAND_V0(0), FP64_RAND_V2(0) } }, { /* => */ { FP64_1(1), FP64_RAND_V1(1), FP64_RAND_V0(0), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_RAND_V2(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x4da20a80c6990, 0x42e)/*183416666481484.50*/, FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /* => */ { FP64_V(0, 0x8000000000000, 0x3fe)/* 0.75*/, FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(1, 0x68b83b1ed4000, 0x41e)/*-3025935759.4140625*/, FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_V(0, 0x68b83b1ed4000, 0x41f)/* 6051871518.8281250*/, FP64_RAND_V2(0), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, { /* => */ { FP64_V(1, 0, 0x400)/* -2.0000000*/, FP64_RAND_V2(0), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x4a6a82b05f744, 0x42f)/*363296296296308.25*/, FP64_RAND_V1(1), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(0, 0x8000000000000, 0x400)/* 3.00*/, FP64_RAND_V1(1), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_1(0), FP64_0(0), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_MAX(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_INF(1), FP64_NORM_SAFE_INT_MIN(1) } }, { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_INF(1), FP64_NORM_SAFE_INT_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_V0(0), FP64_NORM_V1(1), FP64_NORM_V2(0), FP64_NORM_V3(1) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_SNAN(0), FP64_SNAN(1), FP64_QNAN(0) } }, { /* => */ { FP64_1(0), FP64_SNAN(0), FP64_SNAN(1), FP64_QNAN(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, /* * Denormals. */ /*24*/{ { /* 0 / DENORM_MAX = 0 &_DE */ /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0), FP64_DENORM_MAX(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ -1 }, { { /* DENORM_MAX / -0 = -INF &_ZE */ /*src2 */ { FP64_0(1), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_0(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_INF(1), FP64_DENORM_MIN(0), FP64_0(0), FP64_DENORM_MAX(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_ZE, /*256:out */ -1 }, { { /* DENORM_MAX / -0 = INF &_ZE */ /*src2 */ { FP64_0(1), FP64_0(0), FP64_DENORM_MIN(0), FP64_0(0) } }, { /*src1 */ { FP64_DENORM_MAX(1), FP64_DENORM_MIN(0), FP64_0(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_INF(0), FP64_DENORM_MIN(0), FP64_0(0), FP64_DENORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_ZE, /*256:out */ -1 }, { { /* -DENORM_MAX / DENORM_MIN = (-huge) &_DE */ /*src2 */ { FP64_DENORM_MIN(0), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MAX(1), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(1, 0xffffffffffffe, 0x432)/*-4503599627370495.0*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP | X86_MXCSR_DE, /*256:out */ -1 }, { { /* -DENORM_MAX / -DENORM_MIN = (huge) &_DE */ /*src2 */ { FP64_DENORM_MIN(1), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MAX(1), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(0, 0xffffffffffffe, 0x432)/*4503599627370495.0*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_DE, /*256:out */ -1 }, { { /* -DENORM_MIN / DENORM_MAX = (-tiny) &_DE &_PE */ /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MIN(1), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(1, 0x0000000000001, 0x3cb)/*-22204460492503135739e-35*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_PE, /*256:out */ -1 }, { { /* -0 / DENORM_MIN = -0 &_DE */ /*src2 */ { FP64_DENORM_MIN(0), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_0(1), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_0(1), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /* -0.25 / DENORM_MAX = (-HUGE) &_DE &_PE */ /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(1, 0, 0x3fd)/*0.25*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(1, 1, 0x7fb)/*1.1XYZe307*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_PE, /*256:out */ -1 }, { { /* 42.0 / DENORM_MIN = INF &_DE &_PE(if OM) &_OE */ /*src2 */ { FP64_DENORM_MIN(0), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x5000000000000, 0x404)/*42.0*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_INF(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /* 42.0 / DENORM_MIN = INF &_DE &_PE(if !DM) &_OE */ /*src2 */ { FP64_DENORM_MIN(0), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x5000000000000, 0x404)/*42.0*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_INF(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_OE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, { { /* 42.0 / DENORM_MIN = INF &_DE &!_PE(if !OM && DM) &_OE */ /*src2 */ { FP64_DENORM_MIN(0), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x5000000000000, 0x404)/*42.0*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_INF(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_OE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /* ~DMASKED: 42.0 / DENORM_MIN = INF &_DE &_OE &!_PE(if !DM)*/ /*src2 */ { FP64_DENORM_MIN(0), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x5000000000000, 0x404)/*42.0*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_INF(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | X86_MXCSR_OE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, { { /* ~OMASKED: 42.0 / DENORM_MIN = INF &_DE &_OE &!_PE(if !OM)*/ /*src2 */ { FP64_DENORM_MIN(0), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x5000000000000, 0x404)/*42.0*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_INF(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /* DOMASKED: 42.0 / DENORM_MIN = INF &_DE &_OE &_PE(if DM && OM) */ /*src2 */ { FP64_DENORM_MIN(0), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x5000000000000, 0x404)/*42.0*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_INF(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_DM | X86_MXCSR_OM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_OM | X86_MXCSR_DE | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_OM_FIXED, /*256:out */ -1 }, { { /* DAZ: 42.0 / DENORM_MIN = INF &_ZE */ /*src2 */ { FP64_DENORM_MIN(0), FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0x5000000000000, 0x404)/*42.0*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_INF(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_ZE | X86_MXCSR_DAZ, /*256:out */ -1 }, { { /* DENORM_MAX / -42.0 = -5e-310 &_DE &_PE(if UM) &_UE */ /*src2 */ { FP64_V(1, 0x5000000000000, 0x404)/*-42.0*/, FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(1, 0x618618618618, 0)/*-5.29XYZe-310*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /* DENORM_MAX / -42.0 = -5e-310 &_DE &_PE(if !DM) &_UE */ /*src2 */ { FP64_V(1, 0x5000000000000, 0x404)/*-42.0*/, FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(1, 0x618618618618, 0)/*-5.29XYZe-310*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, #ifdef TODO_X86_MXCSR_PE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out */ /*--|41*/{ { /* DENORM_MAX / -42.0 = -5e-310 &_DE &!_PE(if DM && !UM) &_UE */ /*src2 */ { FP64_V(1, 0x5000000000000, 0x404)/*-42.0*/, FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(1, 0x618618618618, 0)/*-5.29XYZe-310*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, #endif /* TODO_X86_MXCSR_PE_IEM */ /*41|42*/{ { /* UMASKED: DENORM_MAX / 42.0 = 5e-310 &_DE &_PE(if UM) &_UE */ /*src2 */ { FP64_V(0, 0x5000000000000, 0x404)/*-42.0*/, FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(0, 0x618618618618, 0)/*-5.29XYZe-310*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_PE | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, { { /* ~DMASKED: DENORM_MAX / 42.0 = 5e-310 &_DE &_PE(if !DM) &_UE */ /*src2 */ { FP64_V(0, 0x5000000000000, 0x404)/*-42.0*/, FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(0, 0x618618618618, 0)/*-5.29XYZe-310*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_PE | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED, /*256:out */ -1 }, #ifdef TODO_X86_MXCSR_PE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_PE not set in 128:out */ /*--|44*/{ { /* D~UMASKED: DENORM_MAX / 42.0 = 5e-310 &_DE &!_PE(if DM && !UM) &_UE */ /*src2 */ { FP64_V(0, 0x5000000000000, 0x404)/*-42.0*/, FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(0, 0x618618618618, 0)/*-5.29XYZe-310*/, FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_PE | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ -1 }, #endif /* TODO_X86_MXCSR_PE_IEM */ /*43|45*/{ { /* DAZ: DENORM_MAX / -42.0 = -0 &- */ /*src2 */ { FP64_V(1, 0x5000000000000, 0x404)/*-42.0*/, FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_0(1), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ -1 }, { { /* DAZ+FZ: DENORM_MAX / -42.0 = -0 &- */ /*src2 */ { FP64_V(1, 0x5000000000000, 0x404)/*-42.0*/, FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_0(1), FP64_DENORM_MIN(0), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ -1 }, /** @todo how to usefully test FZ, RC_{NEAREST,UP,DOWN,ZERO} ? */ /* * Invalids. */ /*45|47*/ FP64_TABLE_D1_SD_INVALIDS /** @todo Underflow, Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_divsd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_divsd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivsd_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivsd_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_divsd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_divsd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivsd_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivsd_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_divsd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_divsd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivsd_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vdivsd_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_divsd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_divsd_XMM8_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vdivsd_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vdivsd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); } /* * [V]ADDSUBPS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_addsubps(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /* => */ { FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /* => */ { FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, /* * Infinity. */ /* 8*/{ { /*src2 */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, { /*src1 */ { FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1) } }, { /* => */ { FP32_QNAN(1), FP32_INF(0), FP32_INF(1), FP32_QNAN(1), FP32_INF(0), FP32_QNAN(1), FP32_QNAN(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_IM, /*128:out */ X86_MXCSR_IM | X86_MXCSR_IE, /*256:out */ X86_MXCSR_IM | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, { /*src1 */ { FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1) } }, { /* => */ { FP32_QNAN(1), FP32_INF(0), FP32_INF(1), FP32_QNAN(1), FP32_INF(0), FP32_QNAN(1), FP32_QNAN(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, { /*src1 */ { FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1) } }, { /* => */ { FP32_QNAN(1), FP32_INF(0), FP32_INF(1), FP32_QNAN(1), FP32_INF(0), FP32_QNAN(1), FP32_QNAN(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, { /*src1 */ { FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1) } }, { /* => */ { FP32_QNAN(1), FP32_INF(0), FP32_INF(1), FP32_QNAN(1), FP32_INF(0), FP32_QNAN(1), FP32_QNAN(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_QNAN(1), FP32_QNAN(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, { { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_0(1), FP32_INF(1), FP32_INF(1) } }, { /*src1 */ { FP32_0(0), FP32_INF(0), FP32_INF(1), FP32_0(1), FP32_INF(0), FP32_INF(0), FP32_0(1), FP32_0(1) } }, { /* => */ { FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_INF(0), FP32_NORM_V1(0), FP32_NORM_V2(0), FP32_INF(0), FP32_NORM_V3(1), FP32_NORM_V2(1), FP32_INF(1), FP32_INF(1) } }, { /*src1 */ { FP32_NORM_V0(0), FP32_INF(0), FP32_INF(1), FP32_NORM_V3(1), FP32_INF(0), FP32_INF(0), FP32_NORM_V1(1), FP32_NORM_V0(1) } }, { /* => */ { FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_NORM_V7(0), FP32_NORM_V6(0), FP32_NORM_V5(0), FP32_NORM_V4(0), FP32_NORM_V3(1), FP32_NORM_V2(1), FP32_NORM_V1(1), FP32_NORM_V0(1) } }, { /*src1 */ { FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1) } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, /* * Overflow, Precision. */ /*16*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM, /*128:out */ X86_MXCSR_OM, /*256:out */ X86_MXCSR_OM | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MIN(0), FP32_NORM_MAX(0), FP32_1(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_1(0), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_2(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_1(0), FP32_NORM_V7(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MAX), FP32_NORM_MAX(0), FP32_1(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_2(0), FP32_NORM_V7(1), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_V3(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_V3(0), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_0(0), FP32_INF(0), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MAX), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_0(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_V3(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_V3(0), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_0(0), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_0(0), FP32_INF(0), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MAX), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1), FP32_0(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE }, { { /*src2 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /*src1 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /* => */ { FP32_0(1), FP32_NORM_MAX(0), FP32_INF(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /*src1 */ { FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_0(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MIN(1) } }, { /* => */ { FP32_0(1), FP32_NORM_MAX(0), FP32_INF(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_V(1, 0, FP32_EXP_NORM_MIN + 1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_OM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_RC_ZERO | X86_MXCSR_OE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED, /*256:out */ X86_MXCSR_OM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_OM_FIXED }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_MAX(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1) } }, { /* => */ { FP32_V(0, FP32_FRAC_NORM_MAX, FP32_EXP_SAFE_INT_MAX), FP32_0(0), FP32_0(0), FP32_V(1, FP32_FRAC_NORM_MAX, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(0, FP32_FRAC_NORM_MAX, FP32_EXP_SAFE_INT_MAX), FP32_0(0), FP32_0(0), FP32_V(1, FP32_FRAC_NORM_MAX, FP32_EXP_SAFE_INT_MAX + 1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_PE, /*256:out */ X86_MXCSR_PE }, /* * Normals. */ /*28*/{ { /*src2 */ { FP32_V(0, 0, 0x7d)/*0.25*/, FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_V(0, 0, 0x7d)/*0.25*/, FP32_V(1, 0, 0x7e)/*-0.50*/, FP32_V(0, 0x400000, 0x7e)/* 0.75*/, FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_V(0, 0, 0x7e)/*0.50*/, FP32_V(0, 0x534000, 0x86)/*211.25*/} }, { /*src1 */ { FP32_V(0, 0x600000, 0x7f)/*1.75*/, FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_V(0, 0x400000, 0x7e)/*0.75*/, FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_V(0, 0, 0x7e)/* 0.50*/, FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_V(0, 0x400000, 0x7e)/*0.75*/, FP32_1(1) /*- 1.00*/} }, { /* => */ { FP32_V(0, 0x400000, 0x7f)/*1.50*/, FP32_V(0, 0x400000, 0x7f)/* 1.50*/, FP32_V(0, 0, 0x7e)/*0.50*/, FP32_V(1, 0x400000, 0x7e)/*-0.75*/, FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_V(0, 0x400000, 0x7f)/* 1.50*/, FP32_V(0, 0, 0x7d)/*0.25*/, FP32_V(0, 0x524000, 0x86)/*210.25*/} }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_V(0, 0x600000, 0x81)/* 7*/, FP32_V(0, 0x5c0000, 0x84)/*55*/, FP32_V(0, 0x534000, 0x86)/*211.25*/, FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_V(0, 0x534000, 0x86)/*211.25*/ } }, { /*src1 */ { FP32_V(0, 0x669050, 0x93)/*1888778*/, FP32_V(0, 0x1ea980, 0x8f)/* 81235*/, FP32_V(0, 0x780000, 0x84)/*62*/, FP32_V(0, 0x600000, 0x81)/* 7*/, FP32_1(0) /* 1.00*/, FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_V(0, 0x253468, 0x93)/*1353357.00*/, FP32_1(1) /*- 1.00*/ } }, { /* => */ { FP32_V(0, 0x1ea980, 0x8f)/* 81235*/, FP32_V(0, 0x669050, 0x93)/*1888778*/, FP32_V(0, 0x5c0000, 0x84)/*55*/, FP32_V(0, 0x780000, 0x84)/*62*/, FP32_V(1, 0x524000, 0x86)/*210.25*/, FP32_V(0, 0x253468, 0x93)/*1353357.00*/, FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_V(0, 0x524000, 0x86)/*210.25*/ } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_V(1, 0x3c614e, 0x96)/*-12345678*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_V(0, 0x712060, 0x92)/* 987654*/, FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_V(0, 0x2514d6, 0x93)/* 1352346.75*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/ } }, { /*src1 */ { FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_V(1, 0x712060, 0x92)/*- 987654*/, FP32_V(0, 0x3c614e, 0x96)/* 12345678*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/, FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_V(1, 0x712060, 0x92)/*- 987654*/, FP32_V(1, 0x7c9000, 0x88)/* -1010.25*/, FP32_V(0, 0x3c614e, 0x96)/*12345678*/ } }, { /* => */ { FP32_V(0, 0x712060, 0x92)/* 987654*/, FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_V(0, 0x3c614e, 0x97)/* 24691356*/, FP32_V(0, 0x3c614e, 0x97)/*24691356*/, FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_V(0, 0x6cb99c, 0x97)/*31028024*/, FP32_V(1, 0x253468, 0x93)/*-1353357.00*/, FP32_V(0, 0x3c614e, 0x97)/*24691356*/ } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ }, { { /*src2 */ { FP32_1(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(1), FP32_NORM_SAFE_INT_MAX(0), FP32_1(1), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(0) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(1), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_1(0), FP32_V(0, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_1(1) } }, { /* => */ { FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(0), FP32_1(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_SAFE_INT_MAX) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(0), FP32_0(0), FP32_0(0), FP32_NORM_SAFE_INT_MIN(0), FP32_1(0), FP32_NORM_SAFE_INT_MIN(0) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1), FP32_V(0, 0, FP32_EXP_SAFE_INT_MIN + 1), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(1), FP32_0(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MIN(0) } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_V(1, 0, FP32_EXP_SAFE_INT_MAX + 1), FP32_V(0, 0, FP32_EXP_SAFE_INT_MIN + 1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_V(0, 0x3ce348, 0x90)/*193421.125*/, FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_V(1, 0x0a19f0, 0x8f)/*-70707.875*/, FP32_V(0, 0x3ce348, 0x90)/*193421.125*/, FP32_V(0, 0x00c6d3, 0x94)/*2109876.75*/, FP32_V(0, 0x6423f2, 0x92)/*934463.125*/, FP32_V(0, 0x316740, 0x8e)/* 45415.25*/, FP32_V(0, 0x16b43a, 0x93)/*1234567.25*/ } }, { /*src1 */ { FP32_V(0, 0x10c030, 0x92)/*592899.000*/, FP32_V(0, 0x769b50, 0x92)/*1010101.000*/, FP32_V(0, 0x52e0b4, 0x92)/*863755.250*/, FP32_V(0, 0x430ebc, 0x91)/*399477.875*/, FP32_V(0, 0x4c20f0, 0x94)/*3344444.00*/, FP32_V(1, 0x0a19f0, 0x8f)/*-70707.875*/, FP32_V(0, 0x792318, 0x91)/*510232.75*/, FP32_V(0, 0x00c6d3, 0x94)/*2109876.75*/ } }, { /* => */ { FP32_V(0, 0x430ebc, 0x91)/*399477.875*/, FP32_V(0, 0x769b5e, 0x92)/*1010101.875*/, FP32_V(0, 0x6423f2, 0x92)/*934463.125*/, FP32_V(0, 0x10c030, 0x92)/*592899.000*/, FP32_V(0, 0x16b43a, 0x93)/*1234567.25*/, FP32_V(0, 0x52e0b4, 0x92)/*863755.250*/, FP32_V(0, 0x62f630, 0x91)/*464817.50*/, FP32_V(0, 0x4c20f0, 0x94)/*3344444.00*/ } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_RC_DOWN }, /** @todo More Normals. */ /* * Denormals. */ /*34*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_0(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MIN), FP32_DENORM_MAX(1), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MIN), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|35*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_0(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MIN), FP32_DENORM_MAX(1), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MIN), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*35|36*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_0(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MIN), FP32_DENORM_MAX(1), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MIN), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MIN), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_0(0), FP32_V(0, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MIN), FP32_0(1), FP32_V(1, FP32_FRAC_NORM_MAX - 1, FP32_EXP_NORM_MIN), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_DE | X86_MXCSR_UE | X86_MXCSR_PE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0)} }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0)} }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0)} }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 256:out */ /*--|40*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0)} }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0)} }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0)} }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*39|41*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0)} }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0)} }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0)} }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0) } }, { /* => */ { FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN }, /** @todo More Denormals. */ /* * Invalids. */ /*45|47*/ FP32_TABLE_D1_PS_INVALIDS /** @todo Underflow; Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_addsubps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addsubps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_XMM1_XMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_YMM1_YMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_addsubps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addsubps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_XMM1_XMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_YMM1_YMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_addsubps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addsubps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_XMM1_XMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_YMM1_YMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_addsubps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE3, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_addsubps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE3, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_XMM8_XMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_YMM13_YMM14_YMM15_icebp_c64, 255, RM_REG, T_AVX_256, 13, 14, 15, PASS_s_aValues }, { bs3CpuInstr4_vaddsubps_YMM13_YMM14_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 13, 14, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]ADDSUBPD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_addsubpd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(1) } }, { /*src1 */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(1), FP64_0(1) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, /* * Infinity. */ /* 9*/{ { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(0) } }, { /*src1 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /* => */ { FP64_QNAN(1), FP64_INF(0), FP64_INF(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_IM, /*128:out */ X86_MXCSR_IM | X86_MXCSR_IE, /*256:out */ X86_MXCSR_IM | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(0), FP64_QNAN(1), FP64_QNAN(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_QNAN(1), FP64_QNAN(1), FP64_INF(1) } }, { /* => */ { FP64_QNAN(1), FP64_QNAN(1), FP64_QNAN(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_IM, /*128:out */ X86_MXCSR_IM | X86_MXCSR_IE, /*256:out */ X86_MXCSR_IM | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(0) } }, { /*src1 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /* => */ { FP64_QNAN(1), FP64_INF(0), FP64_INF(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(1), FP64_INF(1), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /* => */ { FP64_INF(0), FP64_QNAN(1), FP64_QNAN(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(0) } }, { /*src1 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /* => */ { FP64_QNAN(1), FP64_INF(0), FP64_INF(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(1), FP64_INF(1), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /* => */ { FP64_INF(0), FP64_QNAN(1), FP64_QNAN(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(0) } }, { /*src1 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /* => */ { FP64_QNAN(1), FP64_INF(0), FP64_INF(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(1), FP64_INF(1), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /* => */ { FP64_INF(0), FP64_QNAN(1), FP64_QNAN(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_INF(0), FP64_INF(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_INF(0), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_IE }, { { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_INF(0), FP64_INF(0), FP64_INF(0) } }, { /* => */ { FP64_INF(1), FP64_INF(0), FP64_INF(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_INF(0), FP64_NORM_V1(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_INF(0), FP64_NORM_V1(1), FP64_NORM_V0(1) } }, { /* => */ { FP64_INF(1), FP64_INF(0), FP64_INF(0), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_NORM_V3(0), FP64_NORM_V3(0), FP64_NORM_V1(1), FP64_NORM_V0(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /* => */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_ZERO }, /* * Overflow, Precision. */ /*21*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_INF(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_MIN(0), FP64_NORM_MAX(0), FP64_1(0), FP64_NORM_MAX(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_2(0), FP64_NORM_MAX(1) } }, { /* => */ { FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MAX), FP64_NORM_MAX(0), FP64_1(0), FP64_NORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_1(0), FP64_0(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MAX(1), FP64_1(0), FP64_NORM_V3(1), FP64_NORM_MAX(0) } }, { /* => */ { FP64_NORM_MAX(1), FP64_2(0), FP64_NORM_V3(1), FP64_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_V3(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_NORM_V3(0), FP64_NORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_V(1, 0, FP64_EXP_NORM_MIN + 1), FP64_0(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(1), FP64_0(0), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MIN(0), FP64_NORM_MIN(1), FP64_0(0), FP64_NORM_MAX(0) } }, { /* => */ { FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MAX), FP64_V(1, 0, FP64_EXP_NORM_MIN + 1), FP64_0(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_PE, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE }, { { /*src2 */ { FP64_NORM_MIN(1), FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_V2(1) } }, { /*src1 */ { FP64_NORM_MIN(1), FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_NORM_MAX(0), FP64_INF(1), FP64_NORM_V2(1) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_INF(1), FP64_0(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_NORM_MAX(1), FP64_0(0), FP64_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_MAX(1), FP64_NORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_NORM_MAX(1), FP64_0(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY, /*256:out */ X86_MXCSR_OM | X86_MXCSR_PM | X86_MXCSR_RC_UP | X86_MXCSR_OE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_MAX(0), FP64_0(0), FP64_NORM_SAFE_INT_MAX(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_MAX(1), FP64_0(0), FP64_NORM_SAFE_INT_MAX(1) } }, { /* => */ { FP64_V(0, FP64_FRAC_NORM_MAX, FP64_EXP_SAFE_INT_MAX), FP64_0(0), FP64_0(0), FP64_V(1, FP64_FRAC_NORM_MAX, FP64_EXP_SAFE_INT_MAX + 1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_PE, /*256:out */ X86_MXCSR_PE }, /* * Normals. */ /*31*/{ { /*src2 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(0), FP64_NORM_V1(0), FP64_NORM_MAX(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MAX(1), FP64_NORM_V1(0), FP64_NORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_V(0, 0, 0x409)/*1024*/, FP64_V(0, 0, 0x409)/*1024*/, FP64_V(1, 0xc000000000000, 0x401)/* 7*/, FP64_V(0, 0xb800000000000, 0x404)/*55*/ } }, { /*src1 */ { FP64_V(0, 0x8000000000000, 0x409)/*1536*/, FP64_V(0, 0, 0x408)/* 512*/, FP64_V(0, 0xb800000000000, 0x404)/*55*/, FP64_V(0, 0xc000000000000, 0x401)/* 7*/ } }, { /* => */ { FP64_V(0, 0, 0x408)/* 512*/, FP64_V(0, 0x8000000000000, 0x409)/*1536*/, FP64_V(0, 0xf000000000000, 0x404)/*62*/, FP64_V(0, 0xf000000000000, 0x404)/*62*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_V(0, 0x9000000000000, 0x405)/* 100*/, FP64_V(0, 0xd6f3458800000, 0x41c)/*987654321*/, FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/, FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/ } }, { /*src1 */ { FP64_V(0, 0xd6f3458800000, 0x41c)/*987654321*/, FP64_V(1, 0x9000000000000, 0x405)/* -100*/, FP64_V(0, 0xcf00348ec5858, 0x432)/*4072598123457580.0*/, FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/ } }, { /* => */ { FP64_V(0, 0xd6f3426800000, 0x41c)/*987654221*/, FP64_V(0, 0xd6f3426800000, 0x41c)/*987654221*/, FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/, FP64_V(0, 0xcf00348ec5858, 0x432)/*4072598123457580.0*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MAX(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_1(0), FP64_1(0), FP64_1(1) } }, { /* => */ { FP64_1(0), FP64_NORM_SAFE_INT_MAX(0), FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_1(0), FP64_NORM_SAFE_INT_MAX(0), FP64_1(1), FP64_1(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_1(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_NORM_SAFE_INT_MAX(1) } }, { /* => */ { FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_SAFE_INT_MAX), FP64_V(0, 0, FP64_EXP_SAFE_INT_MAX + 1), FP64_NORM_SAFE_INT_MAX(0), FP64_V(1, 0, FP64_EXP_SAFE_INT_MAX + 1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(1), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MIN(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_V(0, 0, FP64_EXP_SAFE_INT_MIN + 1), FP64_V(0, 0, FP64_EXP_SAFE_INT_MIN + 1), FP64_NORM_SAFE_INT_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP | X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(0), FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/ } }, { /*src1 */ { FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(1), FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/ } }, { /* => */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_V(1, 0, FP64_EXP_SAFE_INT_MIN + 1), FP64_V(1, 0, FP64_EXP_SAFE_INT_MIN + 1), FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/ } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN | X86_MXCSR_XCPT_MASK }, /** @todo More Normals. */ /* * Denormals. */ /*38*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MIN), FP64_0(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MIN) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MIN), FP64_0(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MIN) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|40*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MIN), FP64_0(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MIN) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*40|41*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_DENORM_MAX(1), FP64_0(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MIN) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_DENORM_MAX(1), FP64_0(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MIN) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|43*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_DENORM_MAX(1), FP64_0(0), FP64_V(0, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MIN) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*42|44*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MIN), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MIN), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|46*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_V(1, FP64_FRAC_NORM_MAX - 1, FP64_EXP_NORM_MIN), FP64_DENORM_MAX(0), FP64_DENORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*44|47*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0)} }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0)} }, { /* => */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0)} }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_DE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0)} }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0)} }, { /* => */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0)} }, /*mxcsr:in */ X86_MXCSR_UM, /*128:out */ X86_MXCSR_UM, /*256:out */ X86_MXCSR_UM | X86_MXCSR_DE | BS3_MXCSR_UM_FIXED }, #ifdef TODO_X86_MXCSR_UE_IEM /** @todo THIS FAILS ON IEM: X86_MXCSR_UE not set in 128:out or 256:out */ /*--|49*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0)} }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0)} }, { /* => */ { FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0)} }, /*mxcsr:in */ X86_MXCSR_DM, /*128:out */ X86_MXCSR_DM, /*256:out */ X86_MXCSR_DM | X86_MXCSR_DE | X86_MXCSR_UE | BS3_MXCSR_DM_FIXED | BS3_MXCSR_UM_FIXED }, #endif /* TODO_X86_MXCSR_UE_IEM */ /*46|50*/{ { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MIN(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MIN(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MIN(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MIN(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_DOWN }, /** @todo More Denormals. */ /* * Invalids. */ /*56|60*/ FP64_TABLE_D1_PD_INVALIDS /** @todo Underflow; Precision; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_addsubpd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addsubpd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_XMM1_XMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_YMM1_YMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_addsubpd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addsubpd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_XMM1_XMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_YMM1_YMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_addsubpd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE3, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_addsubpd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE3, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_XMM1_XMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_YMM1_YMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_addsubpd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE3, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_addsubpd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE3, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_XMM8_XMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_YMM13_YMM14_YMM15_icebp_c64, 255, RM_REG, T_AVX_256, 13, 14, 15, PASS_s_aValues }, { bs3CpuInstr4_vaddsubpd_YMM13_YMM14_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 13, 14, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]MAXPS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_maxps(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 9*/{ { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0) } }, { /*src1 */ { FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(0) } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0) } }, { /*src1 */ { FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(0) } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_INF(0), FP32_NORM_V1(0), FP32_INF(1), FP32_NORM_V3(1), FP32_INF(1), FP32_NORM_V5(0), FP32_INF(1), FP32_NORM_V7(0) } }, { /*src1 */ { FP32_NORM_V0(0), FP32_INF(1), FP32_NORM_V2(0), FP32_INF(1), FP32_NORM_V4(1), FP32_INF(1), FP32_NORM_V6(0), FP32_INF(0) } }, { /* => */ { FP32_INF(0), FP32_NORM_V1(0), FP32_NORM_V2(0), FP32_NORM_V3(1), FP32_NORM_V4(1), FP32_NORM_V5(0), FP32_NORM_V6(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_INF(0), FP32_NORM_V1(0), FP32_INF(1), FP32_NORM_V3(1), FP32_INF(1), FP32_NORM_V5(0), FP32_INF(1), FP32_NORM_V7(0) } }, { /*src1 */ { FP32_NORM_V0(0), FP32_INF(1), FP32_NORM_V2(0), FP32_INF(1), FP32_NORM_V4(1), FP32_INF(1), FP32_NORM_V6(0), FP32_INF(0) } }, { /* => */ { FP32_INF(0), FP32_NORM_V1(0), FP32_NORM_V2(0), FP32_NORM_V3(1), FP32_NORM_V4(1), FP32_NORM_V5(0), FP32_NORM_V6(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_NORM_V7(0), FP32_INF(1), FP32_NORM_V5(1), FP32_INF(1), FP32_NORM_V3(0), FP32_INF(1), FP32_NORM_V1(0), FP32_INF(0) } }, { /*src1 */ { FP32_INF(1), FP32_NORM_V6(0), FP32_INF(1), FP32_NORM_V4(1), FP32_INF(1), FP32_NORM_V2(0), FP32_INF(0), FP32_NORM_V0(0) } }, { /* => */ { FP32_NORM_V7(0), FP32_NORM_V6(0), FP32_NORM_V5(1), FP32_NORM_V4(1), FP32_NORM_V3(0), FP32_NORM_V2(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_NORM_V7(0), FP32_INF(1), FP32_NORM_V5(1), FP32_INF(1), FP32_NORM_V3(0), FP32_INF(1), FP32_NORM_V1(0), FP32_INF(0) } }, { /*src1 */ { FP32_INF(0), FP32_NORM_V6(0), FP32_INF(0), FP32_NORM_V4(1), FP32_INF(0), FP32_NORM_V2(0), FP32_INF(1), FP32_NORM_V0(0) } }, { /* => */ { FP32_INF(0), FP32_NORM_V6(0), FP32_INF(0), FP32_NORM_V4(1), FP32_INF(0), FP32_NORM_V2(0), FP32_NORM_V1(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, /* * Normals. */ /*20*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(1), FP32_0(1), FP32_0(1), FP32_NORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_NORM_MIN(0), FP32_0(0), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_0(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1) } }, { /*src1 */ { FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_0(0), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_0(1), FP32_NORM_MIN(0) } }, { /* => */ { FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_0(0), FP32_NORM_MIN(1), FP32_0(1), FP32_0(1), FP32_NORM_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MIN(0), FP32_NORM_MIN(1) } }, { /* => */ { FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MAX(0), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(1) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1) } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_V(0, 0, 0x7d)/*0.25*/, FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_V(0, 0, 0x7d)/*0.25*/, FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_V(0, 0, 0x7d)/* 0.25*/, FP32_V(0, 0x600000, 0x7f)/*1.75*/, FP32_V(1, 0, 0x7d)/*-0.25*/ } }, { /*src1 */ { FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_V(0, 0, 0x7e)/*0.50*/, FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_V(0, 0, 0x7e)/*0.50*/, FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_V(1, 0, 0x7e)/*-0.50*/, FP32_V(1, 0, 0x7d)/*0.25*/, FP32_V(1, 0, 0x7e)/*-0.50*/ } }, { /* => */ { FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_V(0, 0, 0x7e)/*0.50*/, FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_V(0, 0, 0x7e)/*0.50*/, FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_V(0, 0, 0x7d)/* 0.25*/, FP32_V(0, 0x600000, 0x7f)/*1.75*/, FP32_V(1, 0, 0x7d)/*-0.25*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_V1(0), FP32_NORM_V2(1), FP32_NORM_V3(1), FP32_NORM_V5(0), FP32_0(1), FP32_NORM_V5(1), FP32_0(0) } }, { /*src1 */ { FP32_NORM_V1(0), FP32_NORM_V1(1), FP32_NORM_V2(0), FP32_NORM_V3(1), FP32_0(1), FP32_NORM_V6(0), FP32_0(1), FP32_NORM_V7(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_NORM_V1(0), FP32_NORM_V2(0), FP32_NORM_V3(1), FP32_NORM_V5(0), FP32_NORM_V6(0), FP32_0(1), FP32_NORM_V7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_V(0, 0x5c0000, 0x84)/*55*/, FP32_V(1, 0x2514d6, 0x93)/*-1352346.75*/, FP32_V(1, 0x5c0000, 0x84)/*-55*/, FP32_V(1, 0x2514d6, 0x93)/*-1352346.75*/, FP32_V(1, 0x534000, 0x86)/*-211.25*/, FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_1(1) } }, { /*src1 */ { FP32_V(0, 0x1ea980, 0x8f)/* 81235*/, FP32_V(0, 0x600000, 0x81)/* 7*/, FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_V(0, 0x600000, 0x81)/* 7*/, FP32_V(0, 0x253468, 0x93)/* 1353357.00*/, FP32_1(1), FP32_V(1, 0x712060, 0x92)/*- 987654*/, FP32_1(0) } }, { /* => */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_V(0, 0x5c0000, 0x84)/*55*/, FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_V(0, 0x600000, 0x81)/* 7*/, FP32_V(0, 0x253468, 0x93)/* 1353357.00*/, FP32_1(1), FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_V(0, 0x3ce348, 0x90)/*193421.125*/, FP32_V(0, 0x6423f2, 0x92)/*934463.125*/, FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_V(0, 0x16b43a, 0x93)/*1234567.25*/, FP32_V(0, 0x792318, 0x91)/*510232.75*/, FP32_V(0, 0x600000, 0x7e)/* 0.875*/ } }, { /*src1 */ { FP32_V(0, 0x769b50, 0x92)/*1010101.000*/, FP32_V(0, 0x430ebc, 0x91)/*399477.875*/, FP32_V(0, 0x52e0b4, 0x92)/*863755.250*/, FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MAX(1), FP32_V(0, 0x00c6d3, 0x94)/*2109876.75*/, FP32_V(1, 0x316740, 0x8e)/*-45415.25*/, FP32_V(1, 0, 0x7d)/*-0.250*/ } }, { /* => */ { FP32_V(0, 0x769b50, 0x92)/*1010101.000*/, FP32_V(0, 0x430ebc, 0x91)/*399477.875*/, FP32_V(0, 0x6423f2, 0x92)/*934463.125*/, FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_V(0, 0x00c6d3, 0x94)/*2109876.75*/, FP32_V(0, 0x792318, 0x91)/*510232.75*/, FP32_V(0, 0x600000, 0x7e)/* 0.875*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_V(0, 0x490fda, 0x80)/*3.1415926*/, FP32_V(0, 0x620b2e, 0x92)/*925874.9*/, FP32_V(0, 0x5dd520, 0x8e)/* 56789.125*/, FP32_V(1, 0x40e6b6, 0x8c)/*-12345.678*/, FP32_V(1, 0x490fda, 0x80)/*-3.1415926*/, FP32_V(1, 0x620b2e, 0x92)/*-925874.8*/, FP32_V(0, 0x5dd520, 0x8e)/*56789.125*/, FP32_V(0, 0x40e6b6, 0x8c)/*12345.678*/ } }, { /*src1 */ { FP32_V(0, 0x490fdb, 0x80)/*3.1415927*/, FP32_V(0, 0x620b2d, 0x92)/*925874.8*/, FP32_V(1, 0x5dd521, 0x8e)/*-56789.127*/, FP32_V(1, 0x40e6b7, 0x8c)/*-12345.679*/, FP32_V(1, 0x490fdb, 0x80)/*-3.1415927*/, FP32_V(0, 0x620b2d, 0x92)/* 925874.9*/, FP32_V(0, 0x5dd521, 0x8e)/*56789.127*/, FP32_V(0, 0x40e6b7, 0x8c)/*12345.679*/ } }, { /* => */ { FP32_V(0, 0x490fdb, 0x80)/*3.1415927*/, FP32_V(0, 0x620b2e, 0x92)/*925874.9*/, FP32_V(0, 0x5dd520, 0x8e)/* 56789.125*/, FP32_V(1, 0x40e6b6, 0x8c)/*-12345.678*/, FP32_V(1, 0x490fda, 0x80)/*-3.1415926*/, FP32_V(0, 0x620b2d, 0x92)/* 925874.9*/, FP32_V(0, 0x5dd521, 0x8e)/*56789.127*/, FP32_V(0, 0x40e6b7, 0x8c)/*12345.678*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, /** @todo More Normals. */ /* * Denormals. */ /*29*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, /** @todo More Denormals. */ /*35*/ FP32_TABLE_D9_PS_INVALIDS }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_maxps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_maxps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_XMM1_XMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_YMM1_YMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_maxps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_maxps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_XMM1_XMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_YMM1_YMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_maxps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_maxps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_XMM1_XMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_YMM1_YMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_maxps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_maxps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_XMM8_XMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_YMM8_YMM9_YMM10_icebp_c64, 255, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vmaxps_YMM8_YMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]MAXPD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_maxpd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 9*/{ { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_INF(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_INF(0), FP64_0(1), FP64_INF(0) } }, { /* => */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_INF(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_INF(0), FP64_0(1), FP64_INF(0) } }, { /* => */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_INF(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_INF(0), FP64_0(1), FP64_INF(0) } }, { /* => */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_INF(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_INF(0), FP64_0(1), FP64_INF(0) } }, { /* => */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_INF(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_INF(0), FP64_0(1), FP64_INF(0) } }, { /* => */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_INF(0), FP64_INF(0), FP64_INF(0), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_INF(0), FP64_NORM_V1(0), FP64_INF(1), FP64_NORM_V3(1) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_INF(1), FP64_NORM_V2(0), FP64_INF(1) } }, { /* => */ { FP64_INF(0), FP64_NORM_V1(0), FP64_NORM_V2(0), FP64_NORM_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_INF(0), FP64_NORM_V1(0), FP64_INF(1), FP64_NORM_V3(1) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_INF(1), FP64_NORM_V2(0), FP64_INF(1) } }, { /* => */ { FP64_INF(0), FP64_NORM_V1(0), FP64_NORM_V2(0), FP64_NORM_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_NORM_V1(0), FP64_INF(1), FP64_NORM_V2(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(1), FP64_NORM_V3(0), FP64_INF(1), FP64_NORM_V0(1) } }, { /* => */ { FP64_NORM_V1(0), FP64_NORM_V3(0), FP64_NORM_V2(1), FP64_NORM_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_NORM_V1(0), FP64_INF(1), FP64_NORM_V3(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_NORM_V2(0), FP64_INF(0), FP64_NORM_V0(1) } }, { /* => */ { FP64_INF(0), FP64_NORM_V2(0), FP64_INF(0), FP64_NORM_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, /* * Normals. */ /*20*/{ { /*src2 */ { FP64_NORM_V0(0), FP64_NORM_V1(1), FP64_NORM_V2(0), FP64_NORM_V1(1) } }, { /*src1 */ { FP64_NORM_V3(1), FP64_NORM_V1(0), FP64_NORM_V2(1), FP64_NORM_V1(0) } }, { /* => */ { FP64_NORM_V0(0), FP64_NORM_V1(0), FP64_NORM_V2(0), FP64_NORM_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_NORM_V0(0), FP64_0(1), FP64_NORM_V2(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_NORM_V1(1), FP64_0(0), FP64_NORM_V1(0) } }, { /* => */ { FP64_NORM_V0(0), FP64_0(1), FP64_NORM_V2(0), FP64_NORM_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_V(0, 0, 0x409)/*1024*/, FP64_V(0, 0xb800000000000, 0x404)/*55*/, FP64_V(0, 0x8000000000000, 0x409)/*1536*/, FP64_V(0, 0xf000000000000, 0x404)/* 62*/ } }, { /*src1 */ { FP64_V(0, 0, 0x408)/* 512*/, FP64_V(0, 0xc000000000000, 0x401)/* 7*/, FP64_1(1), FP64_V(1, 0xf000000000000, 0x404)/*-62*/ } }, { /* => */ { FP64_V(0, 0, 0x409)/*1024*/, FP64_V(0, 0xb800000000000, 0x404)/*55*/, FP64_V(0, 0x8000000000000, 0x409)/*1536*/, FP64_V(0, 0xf000000000000, 0x404)/* 62*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ }, { { /*src2 */ { FP64_V(0, 0x26580b4800000, 0x41d)/* 1234567890*/, FP64_V(0, 0xd6f3458800000, 0x41c)/*987654321*/, FP64_V(0, 0xd6f3426800000, 0x41c)/*987654221*/, FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/ } }, { /*src1 */ { FP64_V(1, 0x26580b4800000, 0x41d)/*-1234567890*/, FP64_V(0, 0x9000000000000, 0x405)/* 100*/, FP64_1(0), FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/ } }, { /* => */ { FP64_V(0, 0x26580b4800000, 0x41d)/* 1234567890*/, FP64_V(0, 0xd6f3458800000, 0x41c)/*987654321*/, FP64_V(0, 0xd6f3426800000, 0x41c)/*987654221*/, FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP64_V(0, 0x26580b4800000, 0x41d)/* 1234567890*/, FP64_V(0, 0xd6f3458800000, 0x41c)/*987654321*/, FP64_V(0, 0xd6f3426800000, 0x41c)/*987654221*/, FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/ } }, { /*src1 */ { FP64_V(1, 0x26580b4800000, 0x41d)/*-1234567890*/, FP64_V(0, 0x9000000000000, 0x405)/* -100*/, FP64_1(0), FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/ } }, { /* => */ { FP64_V(0, 0x26580b4800000, 0x41d)/* 1234567890*/, FP64_V(0, 0xd6f3458800000, 0x41c)/*987654321*/, FP64_V(0, 0xd6f3426800000, 0x41c)/*987654221*/, FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/ } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MIN(0) } }, { /*src1 */ { FP64_1(0), FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(0), FP64_0(0) } }, { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_0(0), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MIN(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(1), FP64_0(0), FP64_NORM_SAFE_INT_MIN(0) } }, { /* => */ { FP64_NORM_SAFE_INT_MIN(0), FP64_0(0), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MIN(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_V(1, 0xbcd80e0108cc0, 0x42e)/*-244555555308646.00*/ } }, { /*src1 */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_V(0, 0xb88e0395d49b0, 0x42d)/* 121098765432102.75*/ } }, { /* => */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_V(0, 0xb88e0395d49b0, 0x42d)/* 121098765432102.75*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_V(0, 0xc000000000000, 0x3ff)/*1.75*/, FP64_V(0, 0, 0x3fd)/*0.25*/, FP64_V(0, 0x26580b4c7e6b7, 0x41d)/*1234567891.1234567*/, FP64_V(0, 0xf9b0207d06184, 0x3fb)/*0.1234589833333129*/ } }, { /*src1 */ { FP64_V(0, 0, 0x3fd)/*0.25*/, FP64_V(0, 0, 0x3fe)/*0.50*/, FP64_V(0, 0x26580b4c7e6bc, 0x41d)/*1234567891.1234580*/, FP64_V(0, 0xf9b0207d0617d, 0x3fb)/*0.1234589833333128*/ } }, { /* => */ { FP64_V(0, 0xc000000000000, 0x3ff)/*1.75*/, FP64_V(0, 0, 0x3fe)/*0.50*/, FP64_V(0, 0x26580b4c7e6bc, 0x41d)/*1234567891.1234580*/, FP64_V(0, 0xf9b0207d06184, 0x3fb)/*0.1234589833333129*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Denormals. */ /*29*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_0(0), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_DENORM_MAX(1) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, /** @todo Denormals. */ /* * Invalids. */ /*35*/ FP64_TABLE_D9_PD_INVALIDS }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_maxpd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_maxpd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_XMM1_XMM2_XMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_YMM1_YMM2_YMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_YMM1_YMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_maxpd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_maxpd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_XMM1_XMM2_XMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_YMM1_YMM2_YMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_YMM1_YMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_maxpd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_maxpd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_XMM1_XMM2_XMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_YMM1_YMM2_YMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_YMM1_YMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_maxpd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE2, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_maxpd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_XMM8_XMM9_XMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_YMM8_YMM9_YMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vmaxpd_YMM8_YMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]MAXSS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_maxss(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_0(0), FP32_0_x7(0) } }, { /* => */ { FP32_0(0), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_0(0), FP32_0_x7(0) } }, { /* => */ { FP32_0(0), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V4 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V5 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V6 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V5 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V7 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V7 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V5 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, /* * Infinity. */ /*11*/{ { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V0 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V2 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V2 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_NORM_V0(0), FP32_RAND_x7_V5 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_NORM_V3(0), FP32_RAND_x7_V5 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_V7(0), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_NORM_V7(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_V7(0), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, /* * Normals. */ /*27*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_NORM_MAX(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MIN(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_NORM_MIN(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_NORM_MIN(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MIN(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_NORM_MAX(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_NORM_MAX(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_RAND_x7_V2 } }, { /* => */ { FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0, 0x7d)/*0.25*/, FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_V(0, 0, 0x7e)/*0.50*/, FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(0, 0, 0x7e)/*0.50*/, FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_NORM_V1(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_NORM_MAX(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_V(0, 0x1ea980, 0x8f)/* 81235*/, FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(1, 0x2514d6, 0x93)/*-1352346.75*/, FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(1, 0x2514d6, 0x93)/*-1352346.75*/, FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_V(0, 0x253468, 0x93)/* 1353357.00*/, FP32_RAND_x7_V4 } }, { /* => */ { FP32_V(0, 0x253468, 0x93)/* 1353357.00*/, FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(1, 0x40e6b6, 0x8c)/*-12345.678*/, FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_V(1, 0x40e6b7, 0x8c)/*-12345.679*/, FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(1, 0x40e6b6, 0x8c)/*-12345.678*/, FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x620b2e, 0x92)/*925874.9*/, FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_V(0, 0x620b2d, 0x92)/*925874.8*/, FP32_RAND_x7_V4 } }, { /* => */ { FP32_V(0, 0x620b2e, 0x92)/*925874.9*/, FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x490fda, 0x80)/*3.1415926*/, FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_V(0, 0x490fdb, 0x80)/*3.1415927*/, FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(0, 0x490fdb, 0x80)/*3.1415927*/, FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(1, 0x40e6b6, 0x8c)/*-12345.678*/, FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_V(1, 0x40e6b7, 0x8c)/*-12345.679*/, FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(1, 0x40e6b6, 0x8c)/*-12345.678*/, FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x5dd520, 0x8e)/* 56789.125*/, FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_V(1, 0x5dd521, 0x8e)/*-56789.127*/, FP32_RAND_x7_V4 } }, { /* => */ { FP32_V(0, 0x5dd520, 0x8e)/* 56789.125*/, FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_V(1, 0, 0x7d)/*-0.250*/, FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, /** @todo More Normals. */ /* * Denormals. */ /*46*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V4 } }, { /* => */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_DENORM_MAX(1), FP32_RAND_x7_V4 } }, { /* => */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MAX(1), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, /** @todo More Denormals. */ /*56*/ FP32_TABLE_D9_SS_INVALIDS /** @todo Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_maxss_XMM3_XMM4_icebp_c16, 255, RM_REG, T_SSE, 3, 3, 4, PASS_s_aValues }, { bs3CpuInstr4_maxss_XMM3_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 3, 3, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxss_XMM1_XMM6_XMM7_icebp_c16, 255, RM_REG, T_AVX_128, 1, 6, 7, PASS_s_aValues }, { bs3CpuInstr4_vmaxss_XMM1_XMM6_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 6, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_maxss_XMM3_XMM4_icebp_c32, 255, RM_REG, T_SSE, 3, 3, 4, PASS_s_aValues }, { bs3CpuInstr4_maxss_XMM3_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 3, 3, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxss_XMM1_XMM6_XMM7_icebp_c32, 255, RM_REG, T_AVX_128, 1, 6, 7, PASS_s_aValues }, { bs3CpuInstr4_vmaxss_XMM1_XMM6_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 6, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_maxss_XMM3_XMM4_icebp_c64, 255, RM_REG, T_SSE, 3, 3, 4, PASS_s_aValues }, { bs3CpuInstr4_maxss_XMM3_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 3, 3, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxss_XMM1_XMM6_XMM7_icebp_c64, 255, RM_REG, T_AVX_128, 1, 6, 7, PASS_s_aValues }, { bs3CpuInstr4_vmaxss_XMM1_XMM6_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 6, 255, PASS_s_aValues }, { bs3CpuInstr4_maxss_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_maxss_XMM8_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxss_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vmaxss_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); } /* * [V]MAXSD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_maxsd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_INF(0), FP64_SNAN(0), FP64_SNAN(0) } }, { /*src1 */ { FP64_0(0), FP64_INF(1), FP64_QNAN(0), FP64_SNAN(1) } }, { /* => */ { FP64_0(0), FP64_INF(1), FP64_QNAN(0), FP64_SNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V0(0), FP64_RAND_V0(0) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V0(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_0(1), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, { /* => */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V3(1), FP64_RAND_V1(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V1(0), FP64_RAND_V0(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(1), FP64_RAND_V1(0), FP64_RAND_V0(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, /* * Infinity. */ /*11*/{ { /*src2 */ { FP64_INF(0), FP64_RAND_V3(1), FP64_RAND_V1(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V1(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V1(1), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_INF(1), FP64_SNAN(1), FP64_QNAN(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V3(1), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V0(0) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V0(1), FP64_RAND_V0(1), FP64_RAND_V3(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V0(1), FP64_RAND_V0(1), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_INF(1), FP64_QNAN_V(1, 1), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, { /* => */ { FP64_INF(1), FP64_QNAN_V(1, 1), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V2(1), FP64_RAND_V1(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V1(1), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V2(1), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_RAND_V1(1), FP64_RAND_V3(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V1(1), FP64_RAND_V3(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_SNAN(1), FP64_INF(1) } }, { /*src1 */ { FP64_NORM_V3(0), FP64_INF(1), FP64_QNAN(1), FP64_SNAN(1) } }, { /* => */ { FP64_INF(0), FP64_INF(1), FP64_QNAN(1), FP64_SNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_V2(0), FP64_RAND_V3(1), FP64_QNAN(1), FP64_SNAN(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_NORM_V2(0), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_V2(0), FP64_SNAN(0), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V2(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V2(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, /* * Normals. */ /*27*/{ { /*src2 */ { FP64_NORM_MAX(0), FP64_RAND_V2(1), FP64_RAND_V0(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_NORM_MAX(0), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MIN(0), FP64_RAND_V3(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_NORM_MIN(0), FP64_RAND_V2(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_NORM_MIN(0), FP64_RAND_V2(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MIN(0), FP64_RAND_V3(1), FP64_RAND_V0(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V1(0), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_NORM_MAX(0), FP64_RAND_V1(0), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V1(1) } }, { /* => */ { FP64_NORM_MAX(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V1(0), FP64_RAND_V1(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V1(0), FP64_RAND_V1(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_INF(0), FP64_QNAN(1), FP64_QNAN(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0, 0x409)/*1024*/, FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_V(0, 0, 0x408)/* 512*/, FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /* => */ { FP64_V(0, 0, 0x409)/*1024*/, FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_RAND_V2(1), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_RAND_V0(0), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_RAND_V0(0), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_NORM_V1(0), FP64_RAND_V0(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, { /* => */ { FP64_NORM_MAX(0), FP64_RAND_V0(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xc000000000000, 0x3ff)/*1.75*/, FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_V(0, 0, 0x3fd)/*0.25*/, FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V1(0) } }, { /* => */ { FP64_V(0, 0xc000000000000, 0x3ff)/*1.75*/, FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_V(1, 0, 0x3fd)/*-0.25*/, FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_V(1, 0, 0x3fe)/*-0.50*/, FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V1(1) } }, { /* => */ { FP64_V(1, 0, 0x3fd)/*-0.25*/, FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0x26580b4c7e6b7, 0x41d)/*1234567891.1234567*/, FP64_RAND_V2(1), FP64_RAND_V3(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_V(0, 0x26580b4c7e6bc, 0x41d)/*1234567891.1234580*/, FP64_RAND_V3(0), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, { /* => */ { FP64_V(0, 0x26580b4c7e6bc, 0x41d)/*1234567891.1234580*/, FP64_RAND_V3(0), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xf9b0207d06184, 0x3fb)/*0.1234589833333129*/, FP64_RAND_V3(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_V(0, 0xf9b0207d0617d, 0x3fb)/*0.1234589833333128*/, FP64_RAND_V1(1), FP64_RAND_V0(0), FP64_RAND_V0(1) } }, { /* => */ { FP64_V(0, 0xf9b0207d06184, 0x3fb)/*0.1234589833333129*/, FP64_RAND_V1(1), FP64_RAND_V0(0), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/* 121098765432102.75*/, FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_V(1, 0xbcd80e0108cc0, 0x42e)/*-244555555308646.00*/, FP64_RAND_V3(0), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/* 121098765432102.75*/, FP64_RAND_V3(0), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/, FP64_RAND_V3(1), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_V(1, 0xbcd80e0108cc0, 0x42e)/*-244555555308646.00*/, FP64_INF(1), FP64_SNAN(1), FP64_INF(1) } }, { /*src1 */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/* 121098765432102.75*/, FP64_INF(1), FP64_QNAN(0), FP64_SNAN(0) } }, { /* => */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/* 121098765432102.75*/, FP64_INF(1), FP64_QNAN(0), FP64_SNAN(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xbcd80e0108cc0, 0x42e)/* 244555555308646.00*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_V(1, 0xb88e0395d49b0, 0x42d)/*-121098765432102.75*/, FP64_RAND_V0(0), FP64_RAND_V0(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_V(0, 0xbcd80e0108cc0, 0x42e)/* 244555555308646.00*/, FP64_RAND_V0(0), FP64_RAND_V0(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(1, 0xcf0033a34f337, 0x432)/*-4072598000007579.5*/, FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, { /*src1 */ { FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/, FP64_RAND_V2(0), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/, FP64_RAND_V2(0), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, /** @todo More Normals. */ /* * Denormals. */ /*46*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(0), FP64_RAND_V0(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_SNAN(0), FP64_QNAN(1), FP64_QNAN(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(0), FP64_RAND_V3(1), FP64_RAND_V2(0) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_RAND_V2(0), FP64_RAND_V3(1), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_INF(1), FP64_SNAN(0), FP64_INF(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_INF(0), FP64_QNAN(1), FP64_SNAN(1) } }, { /* => */ { FP64_0(0), FP64_INF(0), FP64_QNAN(1), FP64_SNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(1), FP64_RAND_V0(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V2(0) } }, { /*src1 */ { FP64_DENORM_MAX(1), FP64_RAND_V0(0), FP64_RAND_V3(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_RAND_V0(0), FP64_RAND_V3(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MAX(1), FP64_RAND_V3(1), FP64_RAND_V0(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(1), FP64_RAND_V3(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_RAND_V2(1), FP64_RAND_V3(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(1), FP64_RAND_V0(1), FP64_RAND_V3(1), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_DENORM_MIN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(1), FP64_INF(0), FP64_QNAN(1), FP64_SNAN(1) } }, { /*src1 */ { FP64_DENORM_MIN(1), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_DENORM_MIN(1), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(1), FP64_SNAN(1), FP64_SNAN(0), FP64_QNAN(0) } }, { /*src1 */ { FP64_DENORM_MIN(1), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_0(1), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, { /* => */ { FP64_DENORM_MIN(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, /** @todo More Denormals. */ /* * Invalids. */ /*56*/ FP64_TABLE_D9_SD_INVALIDS }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_maxsd_XMM3_XMM4_icebp_c16, 255, RM_REG, T_SSE2, 3, 3, 4, PASS_s_aValues }, { bs3CpuInstr4_maxsd_XMM3_FSxBX_icebp_c16, 255, RM_MEM, T_SSE2, 3, 3, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxsd_XMM1_XMM6_XMM7_icebp_c16, 255, RM_REG, T_AVX_128, 1, 6, 7, PASS_s_aValues }, { bs3CpuInstr4_vmaxsd_XMM1_XMM6_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 6, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_maxsd_XMM3_XMM4_icebp_c32, 255, RM_REG, T_SSE2, 3, 3, 4, PASS_s_aValues }, { bs3CpuInstr4_maxsd_XMM3_FSxBX_icebp_c32, 255, RM_MEM, T_SSE2, 3, 3, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxsd_XMM1_XMM6_XMM7_icebp_c32, 255, RM_REG, T_AVX_128, 1, 6, 7, PASS_s_aValues }, { bs3CpuInstr4_vmaxsd_XMM1_XMM6_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 6, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_maxsd_XMM3_XMM4_icebp_c64, 255, RM_REG, T_SSE2, 3, 3, 4, PASS_s_aValues }, { bs3CpuInstr4_maxsd_XMM3_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 3, 3, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxsd_XMM1_XMM6_XMM7_icebp_c64, 255, RM_REG, T_AVX_128, 1, 6, 7, PASS_s_aValues }, { bs3CpuInstr4_vmaxsd_XMM1_XMM6_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 6, 255, PASS_s_aValues }, { bs3CpuInstr4_maxsd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE2, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_maxsd_XMM8_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_SSE2, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vmaxsd_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vmaxsd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); } /* * [V]MINPS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_minps(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, { /*src1 */ { FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, { /*src1 */ { FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 9*/{ { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_0(0), FP32_INF(1), FP32_0(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_INF(0), FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(1), FP32_0(0), FP32_INF(1), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_INF(0), FP32_0(1), FP32_INF(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_INF(1) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0) } }, { /*src1 */ { FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(0) } }, { /* => */ { FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_INF(0), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0) } }, { /*src1 */ { FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(0) } }, { /* => */ { FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_INF(0), FP32_NORM_V1(0), FP32_INF(1), FP32_NORM_V3(1), FP32_INF(1), FP32_NORM_V5(0), FP32_INF(1), FP32_NORM_V7(0) } }, { /*src1 */ { FP32_NORM_V0(0), FP32_INF(1), FP32_NORM_V2(0), FP32_INF(1), FP32_NORM_V4(1), FP32_INF(1), FP32_NORM_V6(0), FP32_INF(0) } }, { /* => */ { FP32_NORM_V0(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_NORM_V7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_INF(0), FP32_NORM_V1(0), FP32_INF(1), FP32_NORM_V3(1), FP32_INF(0), FP32_NORM_V5(0), FP32_INF(1), FP32_NORM_V7(0) } }, { /*src1 */ { FP32_NORM_V0(0), FP32_INF(1), FP32_NORM_V2(0), FP32_INF(0), FP32_NORM_V4(1), FP32_INF(1), FP32_NORM_V6(0), FP32_INF(0) } }, { /* => */ { FP32_NORM_V0(0), FP32_INF(1), FP32_INF(1), FP32_NORM_V3(1), FP32_NORM_V4(1), FP32_INF(1), FP32_INF(1), FP32_NORM_V7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_NORM_V7(0), FP32_INF(0), FP32_NORM_V5(0), FP32_INF(0), FP32_NORM_V3(0), FP32_INF(0), FP32_NORM_V1(0), FP32_INF(0) } }, { /*src1 */ { FP32_INF(1), FP32_NORM_V6(1), FP32_INF(0), FP32_NORM_V4(0), FP32_INF(0), FP32_NORM_V2(1), FP32_INF(1), FP32_NORM_V0(1) } }, { /* => */ { FP32_INF(1), FP32_NORM_V6(1), FP32_NORM_V5(0), FP32_NORM_V4(0), FP32_NORM_V3(0), FP32_NORM_V2(1), FP32_INF(1), FP32_NORM_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_NORM_V7(0), FP32_INF(0), FP32_NORM_V5(1), FP32_INF(0), FP32_NORM_V3(1), FP32_INF(0), FP32_NORM_V1(1), FP32_INF(0) } }, { /*src1 */ { FP32_INF(0), FP32_NORM_V6(1), FP32_INF(0), FP32_NORM_V4(1), FP32_INF(0), FP32_NORM_V2(1), FP32_INF(0), FP32_NORM_V0(1) } }, { /* => */ { FP32_NORM_V7(0), FP32_NORM_V6(1), FP32_NORM_V5(1), FP32_NORM_V4(1), FP32_NORM_V3(1), FP32_NORM_V2(1), FP32_NORM_V1(1), FP32_NORM_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, /* * Normals. */ /*20*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_0(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_0(1), FP32_NORM_MAX(0) } }, { /* => */ { FP32_NORM_MAX(0), FP32_0(0), FP32_0(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_NORM_MIN(0), FP32_0(0), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_0(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1) } }, { /*src1 */ { FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_0(0), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_0(1), FP32_NORM_MIN(0) } }, { /* => */ { FP32_NORM_MIN(0), FP32_0(0), FP32_0(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_NORM_MIN(0), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MIN(1), FP32_NORM_MAX(0), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(1) } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MAX(0), FP32_NORM_MAX(1), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MIN(0), FP32_NORM_MIN(1) } }, { /* => */ { FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_MAX(1), FP32_NORM_MIN(0), FP32_NORM_MIN(1), FP32_NORM_MAX(1), FP32_NORM_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(1) } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1) } }, { /* => */ { FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MAX(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_V(0, 0, 0x7d)/*0.25*/, FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_V(0, 0, 0x7d)/*0.25*/, FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_V(0, 0, 0x7d)/* 0.25*/, FP32_V(0, 0x600000, 0x7f)/*1.75*/, FP32_V(1, 0, 0x7d)/*-0.25*/ } }, { /*src1 */ { FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_V(0, 0, 0x7e)/*0.50*/, FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_V(0, 0, 0x7e)/*0.50*/, FP32_V(1, 0x600000, 0x7f)/*-1.75*/, FP32_V(1, 0, 0x7e)/*-0.50*/, FP32_V(1, 0, 0x7d)/*0.25*/, FP32_V(1, 0, 0x7e)/*-0.50*/ } }, { /* => */ { FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_V(0, 0, 0x7d)/*0.25*/, FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_V(0, 0, 0x7d)/*0.25*/, FP32_V(1, 0x600000, 0x7f)/*-1.75*/, FP32_V(1, 0, 0x7e)/*-0.50*/, FP32_V(1, 0, 0x7d)/*0.25*/, FP32_V(1, 0, 0x7e)/*-0.50*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_NORM_V1(0), FP32_NORM_V2(1), FP32_NORM_V3(1), FP32_NORM_V5(0), FP32_0(1), FP32_NORM_V5(1), FP32_0(0) } }, { /*src1 */ { FP32_NORM_V1(0), FP32_NORM_V1(1), FP32_NORM_V2(0), FP32_NORM_V3(1), FP32_0(1), FP32_NORM_V6(0), FP32_0(1), FP32_NORM_V7(1) } }, { /* => */ { FP32_NORM_V1(0), FP32_NORM_V1(1), FP32_NORM_V2(1), FP32_NORM_V3(1), FP32_0(1), FP32_0(1), FP32_NORM_V5(1), FP32_NORM_V7(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_V(0, 0x600000, 0x81)/* 7*/, FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_V(0, 0x5c0000, 0x84)/* 55*/, FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_V(1, 0x534000, 0x86)/*-211.25*/, FP32_V(0, 0x74429f, 0x97)/*32015678*/, FP32_1(1) } }, { /*src1 */ { FP32_V(0, 0x1ea980, 0x8f)/* 81235*/, FP32_V(0, 0x5c0000, 0x84)/*55*/, FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_V(1, 0x600000, 0x81)/* -7*/, FP32_V(0, 0x253468, 0x93)/*1353357.00*/, FP32_1(1), FP32_V(0, 0x712060, 0x92)/* 987654*/, FP32_1(0) } }, { /* => */ { FP32_V(0, 0x1ea980, 0x8f)/* 81235*/, FP32_V(0, 0x600000, 0x81)/* 7*/, FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_V(1, 0x600000, 0x81)/* -7*/, FP32_V(0, 0x2514d6, 0x93)/*1352346.75*/, FP32_V(1, 0x534000, 0x86)/*-211.25*/, FP32_V(0, 0x712060, 0x92)/* 987654*/, FP32_1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_V(0, 0x3ce348, 0x90)/*193421.125*/, FP32_V(0, 0x6423f2, 0x92)/*934463.125*/, FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MIN(0), FP32_V(0, 0x16b43a, 0x93)/*1234567.25*/, FP32_V(0, 0x792318, 0x91)/*510232.75*/, FP32_V(0, 0x600000, 0x7e)/* 0.875*/ } }, { /*src1 */ { FP32_V(0, 0x769b50, 0x92)/*1010101.000*/, FP32_V(0, 0x430ebc, 0x91)/*399477.875*/, FP32_V(0, 0x52e0b4, 0x92)/*863755.250*/, FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MAX(1), FP32_V(0, 0x00c6d3, 0x94)/*2109876.75*/, FP32_V(1, 0x316740, 0x8e)/*-45415.25*/, FP32_V(1, 0, 0x7d)/*-0.250*/ } }, { /* => */ { FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_V(0, 0x3ce348, 0x90)/*193421.125*/, FP32_V(0, 0x52e0b4, 0x92)/*863755.250*/, FP32_NORM_SAFE_INT_MIN(1), FP32_NORM_SAFE_INT_MAX(1), FP32_V(0, 0x16b43a, 0x93)/*1234567.25*/, FP32_V(1, 0x316740, 0x8e)/*-45415.25*/, FP32_V(1, 0, 0x7d)/*-0.250*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP32_V(0, 0x490fda, 0x80)/*3.1415926*/, FP32_V(0, 0x620b2e, 0x92)/*925874.9*/, FP32_V(0, 0x5dd520, 0x8e)/* 56789.125*/, FP32_V(1, 0x40e6b6, 0x8c)/*-12345.678*/, FP32_V(1, 0x490fda, 0x80)/*-3.1415926*/, FP32_V(1, 0x620b2e, 0x92)/*-925874.8*/, FP32_V(0, 0x5dd520, 0x8e)/*56789.125*/, FP32_V(0, 0x40e6b6, 0x8c)/*12345.678*/ } }, { /*src1 */ { FP32_V(0, 0x490fdb, 0x80)/*3.1415927*/, FP32_V(0, 0x620b2d, 0x92)/*925874.8*/, FP32_V(1, 0x5dd521, 0x8e)/*-56789.127*/, FP32_V(1, 0x40e6b7, 0x8c)/*-12345.679*/, FP32_V(1, 0x490fdb, 0x80)/*-3.1415927*/, FP32_V(0, 0x620b2d, 0x92)/* 925874.9*/, FP32_V(0, 0x5dd521, 0x8e)/*56789.127*/, FP32_V(0, 0x40e6b7, 0x8c)/*12345.679*/ } }, { /* => */ { FP32_V(0, 0x490fda, 0x80)/*3.1415926*/, FP32_V(0, 0x620b2d, 0x92)/*925874.8*/, FP32_V(1, 0x5dd521, 0x8e)/*-56789.127*/, FP32_V(1, 0x40e6b7, 0x8c)/*-12345.679*/, FP32_V(1, 0x490fdb, 0x80)/*-3.1415927*/, FP32_V(1, 0x620b2e, 0x92)/*-925874.8*/, FP32_V(0, 0x5dd520, 0x8e)/*56789.125*/, FP32_V(0, 0x40e6b6, 0x8c)/*12345.678*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, /** @todo More Normals. */ /* * Denormals. */ /*29*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /* => */ { FP32_0(0), FP32_DENORM_MAX(1), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(1) } }, { /*src1 */ { FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_DENORM_MIN(0) } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, /** @todo More Denormals. */ /*35*/ FP32_TABLE_D9_PS_INVALIDS }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_minps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_minps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vminps_XMM1_XMM2_XMM3_icebp_c16, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vminps_XMM1_XMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vminps_YMM1_YMM2_YMM3_icebp_c16, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vminps_YMM1_YMM2_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_minps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_minps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vminps_XMM1_XMM2_XMM3_icebp_c32, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vminps_XMM1_XMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vminps_YMM1_YMM2_YMM3_icebp_c32, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vminps_YMM1_YMM2_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_minps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_minps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vminps_XMM1_XMM2_XMM3_icebp_c64, 255, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vminps_XMM1_XMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vminps_YMM1_YMM2_YMM3_icebp_c64, 255, RM_REG, T_AVX_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vminps_YMM1_YMM2_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_minps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_minps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vminps_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vminps_XMM8_XMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vminps_YMM8_YMM9_YMM10_icebp_c64, 255, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vminps_YMM8_YMM9_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]MINPD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_minpd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, { { /*src2 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(1), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 9*/{ { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_INF(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_INF(0), FP64_0(1), FP64_INF(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_INF(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_INF(1), FP64_0(1), FP64_INF(1) } }, { /* => */ { FP64_0(0), FP64_INF(1), FP64_0(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_INF(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_INF(1), FP64_0(1), FP64_INF(1) } }, { /* => */ { FP64_0(0), FP64_INF(1), FP64_0(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_INF(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_INF(1), FP64_0(1), FP64_INF(1) } }, { /* => */ { FP64_0(0), FP64_INF(1), FP64_0(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_INF(0), FP64_0(0), FP64_INF(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_INF(0), FP64_0(1), FP64_INF(1) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_INF(0), FP64_INF(1), FP64_INF(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_INF(1), FP64_INF(1) } }, { /*src1 */ { FP64_INF(0), FP64_INF(1), FP64_INF(0), FP64_INF(1) } }, { /* => */ { FP64_INF(0), FP64_INF(1), FP64_INF(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_INF(0), FP64_NORM_V1(0), FP64_INF(1), FP64_NORM_V3(1) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_INF(1), FP64_NORM_V2(0), FP64_INF(1) } }, { /* => */ { FP64_NORM_V0(0), FP64_INF(1), FP64_INF(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_INF(0), FP64_NORM_V1(0), FP64_INF(1), FP64_NORM_V3(1) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_INF(1), FP64_NORM_V2(0), FP64_INF(1) } }, { /* => */ { FP64_NORM_V0(0), FP64_INF(1), FP64_INF(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_INF(0), FP64_NORM_V1(0), FP64_INF(1), FP64_NORM_V3(1) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_INF(1), FP64_NORM_V2(0), FP64_INF(1) } }, { /* => */ { FP64_NORM_V0(0), FP64_INF(1), FP64_INF(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_INF(0), FP64_NORM_V1(0), FP64_INF(1), FP64_NORM_V3(1) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_INF(1), FP64_NORM_V2(0), FP64_INF(1) } }, { /* => */ { FP64_NORM_V0(0), FP64_INF(1), FP64_INF(1), FP64_INF(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, /* * Normals. */ /*20*/{ { /*src2 */ { FP64_NORM_V0(0), FP64_NORM_V1(1), FP64_NORM_V2(0), FP64_NORM_V1(1) } }, { /*src1 */ { FP64_NORM_V3(1), FP64_NORM_V1(0), FP64_NORM_V2(1), FP64_NORM_V1(0) } }, { /* => */ { FP64_NORM_V3(1), FP64_NORM_V1(1), FP64_NORM_V2(1), FP64_NORM_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src2 */ { FP64_NORM_V0(0), FP64_0(1), FP64_NORM_V2(0), FP64_0(1) } }, { /*src1 */ { FP64_0(0), FP64_NORM_V1(1), FP64_0(0), FP64_NORM_V1(0) } }, { /* => */ { FP64_0(0), FP64_NORM_V1(1), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_V(0, 0, 0x409)/*1024*/, FP64_V(0, 0xb800000000000, 0x404)/*55*/, FP64_V(1, 0x8000000000000, 0x409)/*-1536*/, FP64_V(0, 0xf000000000000, 0x404)/* 62*/ } }, { /*src1 */ { FP64_V(0, 0, 0x408)/* 512*/, FP64_V(0, 0xc000000000000, 0x401)/* 7*/, FP64_1(1), FP64_V(1, 0xf000000000000, 0x404)/*-62*/ } }, { /* => */ { FP64_V(0, 0, 0x408)/* 512*/, FP64_V(0, 0xc000000000000, 0x401)/* 7*/, FP64_V(1, 0x8000000000000, 0x409)/*-1536*/, FP64_V(1, 0xf000000000000, 0x404)/*-62*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ }, { { /*src2 */ { FP64_V(0, 0x26580b4800000, 0x41d)/* 1234567890*/, FP64_V(0, 0xd6f3458800000, 0x41c)/*987654321*/, FP64_V(1, 0xd6f3426800000, 0x41c)/*-987654221*/, FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/ } }, { /*src1 */ { FP64_V(1, 0x26580b4800000, 0x41d)/*-1234567890*/, FP64_V(0, 0x9000000000000, 0x405)/* 100*/, FP64_1(0), FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/ } }, { /* => */ { FP64_V(1, 0x26580b4800000, 0x41d)/*-1234567890*/, FP64_V(0, 0x9000000000000, 0x405)/* 100*/, FP64_V(1, 0xd6f3426800000, 0x41c)/*-987654221*/, FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP64_V(0, 0x26580b4800000, 0x41d)/* 1234567890*/, FP64_V(0, 0xd6f3458800000, 0x41c)/*987654321*/, FP64_V(0, 0xd6f3426800000, 0x41c)/*987654221*/, FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/ } }, { /*src1 */ { FP64_V(1, 0x26580b4800000, 0x41d)/*-1234567890*/, FP64_V(0, 0x9000000000000, 0x405)/* -100*/, FP64_1(0), FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/ } }, { /* => */ { FP64_V(1, 0x26580b4800000, 0x41d)/*-1234567890*/, FP64_V(0, 0x9000000000000, 0x405)/* -100*/, FP64_1(0), FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/ } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MAX(0), FP64_NORM_SAFE_INT_MIN(0) } }, { /*src1 */ { FP64_1(0), FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(0), FP64_0(0) } }, { /* => */ { FP64_1(0), FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_0(0), FP64_NORM_SAFE_INT_MIN(0), FP64_NORM_SAFE_INT_MIN(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(1), FP64_0(0), FP64_NORM_SAFE_INT_MIN(0) } }, { /* => */ { FP64_NORM_SAFE_INT_MIN(1), FP64_NORM_SAFE_INT_MIN(1), FP64_0(0), FP64_NORM_SAFE_INT_MIN(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src2 */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_V(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646.00*/, FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_V(1, 0xbcd80e0108cc0, 0x42e)/*-244555555308646.00*/ } }, { /*src1 */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_V(0, 0xb88e0395d49b0, 0x42d)/* 121098765432102.75*/ } }, { /* => */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_V(1, 0xbcd80e0108cc0, 0x42e)/*-244555555308646.00*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_V(0, 0xc000000000000, 0x3ff)/*1.75*/, FP64_V(0, 0, 0x3fd)/*0.25*/, FP64_V(0, 0x26580b4c7e6b7, 0x41d)/*1234567891.1234567*/, FP64_V(0, 0xf9b0207d06184, 0x3fb)/*0.1234589833333129*/ } }, { /*src1 */ { FP64_V(0, 0, 0x3fd)/*0.25*/, FP64_V(0, 0, 0x3fe)/*0.50*/, FP64_V(0, 0x26580b4c7e6bc, 0x41d)/*1234567891.1234580*/, FP64_V(0, 0xf9b0207d0617d, 0x3fb)/*0.1234589833333128*/ } }, { /* => */ { FP64_V(0, 0, 0x3fd)/*0.25*/, FP64_V(0, 0, 0x3fd)/*0.25*/, FP64_V(0, 0x26580b4c7e6b7, 0x41d)/*1234567891.1234567*/, FP64_V(0, 0xf9b0207d0617d, 0x3fb)/*0.1234589833333128*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Denormals. */ /*29*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_0(0), FP64_DENORM_MAX(1) } }, { /* => */ { FP64_0(0), FP64_DENORM_MAX(1), FP64_0(0), FP64_DENORM_MAX(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_0(0), FP64_DENORM_MAX(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_DENORM_MAX(1) } }, { /*src1 */ { FP64_0(0), FP64_DENORM_MAX(0), FP64_DENORM_MAX(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, /** @todo Denormals. */ /* * Invalids. */ /*35*/ FP64_TABLE_D9_PD_INVALIDS }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_minpd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_minpd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vminpd_XMM1_XMM2_XMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vminpd_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vminpd_YMM1_YMM2_YMM3_icebp_c16, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vminpd_YMM1_YMM2_FSxBX_icebp_c16, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_minpd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_minpd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vminpd_XMM1_XMM2_XMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vminpd_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vminpd_YMM1_YMM2_YMM3_icebp_c32, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vminpd_YMM1_YMM2_FSxBX_icebp_c32, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_minpd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE2, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_minpd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vminpd_XMM1_XMM2_XMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vminpd_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vminpd_YMM1_YMM2_YMM3_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX2_256, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vminpd_YMM1_YMM2_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX2_256, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_minpd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE2, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_minpd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vminpd_XMM8_XMM9_XMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vminpd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, { bs3CpuInstr4_vminpd_YMM8_YMM9_YMM10_icebp_c64, X86_XCPT_GP, RM_REG, T_AVX_256, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vminpd_YMM8_YMM9_FSxBX_icebp_c64, X86_XCPT_GP, RM_MEM, T_AVX_256, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]MINSS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_minss(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP32_0(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_0(0), FP32_0_x7(0) } }, { /* => */ { FP32_0(0), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_0_x7(0) } }, { /*src1 */ { FP32_0(0), FP32_0_x7(0) } }, { /* => */ { FP32_0(0), FP32_0_x7(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V6 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V6 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_XCPT_FLAGS | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_XCPT_FLAGS | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP32_0(1), FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_0(1), FP32_RAND_x7_V7 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V7 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, /* * Infinity. */ /*11*/{ { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V7 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V7 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V6 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V4 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V0 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V7 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V7 } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V6 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V5 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V0 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(1), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V5 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_NORM_V0(0), FP32_RAND_x7_V4 } }, { /* => */ { FP32_NORM_V0(0), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_INF(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_NORM_V3(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_NORM_V3(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_V7(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_V7(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V5 } }, { /* => */ { FP32_NORM_V7(0), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, /* * Normals. */ /*27*/{ { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_NORM_MAX(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MIN(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_NORM_MIN(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_NORM_MIN(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MIN(0), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_NORM_MIN(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_NORM_MAX(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V5 } }, { /* => */ { FP32_NORM_SAFE_INT_MIN(0), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_SAFE_INT_MAX(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_NORM_SAFE_INT_MIN(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_NORM_SAFE_INT_MIN(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x600000, 0x7f)/* 1.75*/, FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(1, 0, 0x7d)/*-0.25*/, FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0, 0x7d)/*0.25*/, FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_V(0, 0, 0x7e)/*0.50*/, FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(0, 0, 0x7d)/*0.25*/, FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_NORM_MAX(0), FP32_RAND_x7_V0 } }, { /*src1 */ { FP32_NORM_V1(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_NORM_V1(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_V(0, 0x1ea980, 0x8f)/* 81235*/, FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(0, 0x1ea980, 0x8f)/* 81235*/, FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(1, 0x2514d6, 0x93)/*-1352346.75*/, FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_V(0, 0x7c9000, 0x88)/* 1010.25*/, FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(1, 0x2514d6, 0x93)/*-1352346.75*/, FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(1, 0x2514d6, 0x93)/*-1352346.75*/, FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_V(0, 0x253468, 0x93)/* 1353357.00*/, FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(1, 0x2514d6, 0x93)/*-1352346.75*/, FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(1, 0x40e6b6, 0x8c)/*-12345.678*/, FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_V(1, 0x40e6b7, 0x8c)/*-12345.679*/, FP32_RAND_x7_V6 } }, { /* => */ { FP32_V(1, 0x40e6b7, 0x8c)/*-12345.679*/, FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x620b2e, 0x92)/*925874.9*/, FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_V(0, 0x620b2d, 0x92)/*925874.8*/, FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(0, 0x620b2d, 0x92)/*925874.8*/, FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x490fda, 0x80)/*3.1415926*/, FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_V(0, 0x490fdb, 0x80)/*3.1415927*/, FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(0, 0x490fda, 0x80)/*3.1415926*/, FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP32_V(1, 0x40e6b6, 0x8c)/*-12345.678*/, FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_V(1, 0x40e6b7, 0x8c)/*-12345.679*/, FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(1, 0x40e6b7, 0x8c)/*-12345.679*/, FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x5dd520, 0x8e)/* 56789.125*/, FP32_RAND_x7_V4 } }, { /*src1 */ { FP32_V(1, 0x5dd521, 0x8e)/*-56789.127*/, FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(1, 0x5dd521, 0x8e)/*-56789.127*/, FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP32_V(0, 0x600000, 0x7e)/* 0.875*/, FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_V(1, 0, 0x7d)/*-0.250*/, FP32_RAND_x7_V6 } }, { /* => */ { FP32_V(1, 0, 0x7d)/*-0.250*/, FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, /** @todo More Normals. */ /* * Denormals. */ /*46*/{ { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V4 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V5 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V4 } }, { /* => */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V1 } }, { /*src1 */ { FP32_DENORM_MAX(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_DENORM_MAX(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MAX(1), FP32_RAND_x7_V3 } }, { /*src1 */ { FP32_DENORM_MAX(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_DENORM_MAX(1), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V7 } }, { /*src1 */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_DENORM_MIN(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ -1 }, { { /*src2 */ { FP32_DENORM_MIN(0), FP32_RAND_x7_V6 } }, { /*src1 */ { FP32_0(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, /** @todo More Denormals. */ /*56*/ FP32_TABLE_D9_SS_INVALIDS /** @todo Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_minss_XMM3_XMM4_icebp_c16, 255, RM_REG, T_SSE, 3, 3, 4, PASS_s_aValues }, { bs3CpuInstr4_minss_XMM3_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 3, 3, 255, PASS_s_aValues }, { bs3CpuInstr4_vminss_XMM1_XMM6_XMM7_icebp_c16, 255, RM_REG, T_AVX_128, 1, 6, 7, PASS_s_aValues }, { bs3CpuInstr4_vminss_XMM1_XMM6_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 6, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_minss_XMM3_XMM4_icebp_c32, 255, RM_REG, T_SSE, 3, 3, 4, PASS_s_aValues }, { bs3CpuInstr4_minss_XMM3_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 3, 3, 255, PASS_s_aValues }, { bs3CpuInstr4_vminss_XMM1_XMM6_XMM7_icebp_c32, 255, RM_REG, T_AVX_128, 1, 6, 7, PASS_s_aValues }, { bs3CpuInstr4_vminss_XMM1_XMM6_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 6, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_minss_XMM3_XMM4_icebp_c64, 255, RM_REG, T_SSE, 3, 3, 4, PASS_s_aValues }, { bs3CpuInstr4_minss_XMM3_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 3, 3, 255, PASS_s_aValues }, { bs3CpuInstr4_vminss_XMM1_XMM6_XMM7_icebp_c64, 255, RM_REG, T_AVX_128, 1, 6, 7, PASS_s_aValues }, { bs3CpuInstr4_vminss_XMM1_XMM6_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 6, 255, PASS_s_aValues }, { bs3CpuInstr4_minss_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_minss_XMM8_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vminss_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vminss_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); } /* * [V]MINSD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_minsd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_INF(0), FP64_SNAN(0), FP64_SNAN(0) } }, { /*src1 */ { FP64_0(0), FP64_INF(1), FP64_QNAN(0), FP64_SNAN(1) } }, { /* => */ { FP64_0(0), FP64_INF(1), FP64_QNAN(0), FP64_SNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V0(0), FP64_RAND_V0(0) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V0(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V2(1), FP64_RAND_V3(0), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_0(1), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, { /* => */ { FP64_0(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src2 */ { FP64_0(1), FP64_RAND_V3(1), FP64_RAND_V1(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_0(1), FP64_RAND_V1(0), FP64_RAND_V0(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(1), FP64_RAND_V1(0), FP64_RAND_V0(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, /* * Infinity. */ /*11*/{ { /*src2 */ { FP64_INF(0), FP64_RAND_V3(1), FP64_RAND_V1(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V1(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V1(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V1(1), FP64_RAND_V1(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_INF(1), FP64_SNAN(1), FP64_QNAN(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, { /* => */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V3(1), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V0(0) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V0(1), FP64_RAND_V0(1), FP64_RAND_V3(1) } }, { /* => */ { FP64_INF(0), FP64_RAND_V0(1), FP64_RAND_V0(1), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_INF(1), FP64_QNAN_V(1, 1), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, { /* => */ { FP64_INF(1), FP64_QNAN_V(1, 1), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V2(1), FP64_RAND_V1(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V1(1), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_INF(1), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(1), FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V2(1), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, { /* => */ { FP64_INF(1), FP64_RAND_V2(0), FP64_RAND_V3(0), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_INF(1), FP64_RAND_V0(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_RAND_V0(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /*src1 */ { FP64_NORM_V0(0), FP64_RAND_V1(1), FP64_RAND_V3(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_NORM_V0(0), FP64_RAND_V1(1), FP64_RAND_V3(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_INF(0), FP64_INF(0), FP64_SNAN(1), FP64_INF(1) } }, { /*src1 */ { FP64_NORM_V3(0), FP64_INF(1), FP64_QNAN(1), FP64_SNAN(1) } }, { /* => */ { FP64_NORM_V3(0), FP64_INF(1), FP64_QNAN(1), FP64_SNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_V2(0), FP64_RAND_V3(1), FP64_QNAN(1), FP64_SNAN(1) } }, { /*src1 */ { FP64_INF(1), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /* => */ { FP64_INF(1), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_V2(0), FP64_SNAN(0), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_INF(0), FP64_RAND_V2(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_NORM_V2(0), FP64_RAND_V2(0), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, /* * Normals. */ /*27*/{ { /*src2 */ { FP64_NORM_MAX(0), FP64_RAND_V2(1), FP64_RAND_V0(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_NORM_MAX(0), FP64_RAND_V3(1), FP64_RAND_V2(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MIN(0), FP64_RAND_V3(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_NORM_MIN(0), FP64_RAND_V2(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_NORM_MIN(0), FP64_RAND_V2(0), FP64_RAND_V1(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MIN(0), FP64_RAND_V3(1), FP64_RAND_V0(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V1(0), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, { /* => */ { FP64_NORM_MIN(0), FP64_RAND_V1(0), FP64_RAND_V3(0), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_NORM_MAX(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V1(1) } }, { /* => */ { FP64_NORM_MAX(0), FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V1(0), FP64_RAND_V1(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_NORM_SAFE_INT_MIN(0), FP64_RAND_V1(0), FP64_RAND_V1(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /* => */ { FP64_NORM_SAFE_INT_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_SAFE_INT_MAX(0), FP64_INF(0), FP64_QNAN(1), FP64_QNAN(0) } }, { /*src1 */ { FP64_NORM_SAFE_INT_MIN(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_NORM_SAFE_INT_MIN(0), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0, 0x409)/*1024*/, FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_V(0, 0, 0x408)/* 512*/, FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /* => */ { FP64_V(0, 0, 0x408)/* 512*/, FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, FP64_RAND_V2(1), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_RAND_V0(0), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, FP64_RAND_V0(0), FP64_RAND_V2(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_NORM_MAX(0), FP64_RAND_V0(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_NORM_V1(0), FP64_RAND_V0(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, { /* => */ { FP64_NORM_V1(0), FP64_RAND_V0(1), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xc000000000000, 0x3ff)/*1.75*/, FP64_RAND_V3(0), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_V(0, 0, 0x3fd)/*0.25*/, FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V1(0) } }, { /* => */ { FP64_V(0, 0, 0x3fd)/*0.25*/, FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V1(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_V(1, 0, 0x3fd)/*-0.25*/, FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_V(1, 0, 0x3fe)/*-0.50*/, FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V1(1) } }, { /* => */ { FP64_V(1, 0, 0x3fe)/*-0.50*/, FP64_RAND_V0(0), FP64_RAND_V1(0), FP64_RAND_V1(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0x26580b4c7e6b7, 0x41d)/*1234567891.1234567*/, FP64_RAND_V2(1), FP64_RAND_V3(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_V(0, 0x26580b4c7e6bc, 0x41d)/*1234567891.1234580*/, FP64_RAND_V3(0), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, { /* => */ { FP64_V(0, 0x26580b4c7e6b7, 0x41d)/*1234567891.1234567*/, FP64_RAND_V3(0), FP64_RAND_V1(0), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xf9b0207d06184, 0x3fb)/*0.1234589833333129*/, FP64_RAND_V3(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_V(0, 0xf9b0207d0617d, 0x3fb)/*0.1234589833333128*/, FP64_RAND_V1(1), FP64_RAND_V0(0), FP64_RAND_V0(1) } }, { /* => */ { FP64_V(0, 0xf9b0207d0617d, 0x3fb)/*0.1234589833333128*/, FP64_RAND_V1(1), FP64_RAND_V0(0), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/* 121098765432102.75*/, FP64_RAND_V2(1), FP64_RAND_V2(1), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_V(1, 0xbcd80e0108cc0, 0x42e)/*-244555555308646.00*/, FP64_RAND_V3(0), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_V(1, 0xbcd80e0108cc0, 0x42e)/*-244555555308646.00*/, FP64_RAND_V3(0), FP64_RAND_V3(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/, FP64_RAND_V3(1), FP64_RAND_V2(1), FP64_RAND_V1(1) } }, { /*src1 */ { FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src2 */ { FP64_V(1, 0xbcd80e0108cc0, 0x42e)/*-244555555308646.00*/, FP64_INF(1), FP64_SNAN(1), FP64_INF(1) } }, { /*src1 */ { FP64_V(0, 0xb88e0395d49b0, 0x42d)/* 121098765432102.75*/, FP64_INF(1), FP64_QNAN(0), FP64_SNAN(0) } }, { /* => */ { FP64_V(1, 0xbcd80e0108cc0, 0x42e)/*-244555555308646.00*/, FP64_INF(1), FP64_QNAN(0), FP64_SNAN(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src2 */ { FP64_V(0, 0xbcd80e0108cc0, 0x42e)/* 244555555308646.00*/, FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_V(1, 0xb88e0395d49b0, 0x42d)/*-121098765432102.75*/, FP64_RAND_V0(0), FP64_RAND_V0(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_V(1, 0xb88e0395d49b0, 0x42d)/*-121098765432102.75*/, FP64_RAND_V0(0), FP64_RAND_V0(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src2 */ { FP64_V(1, 0xcf0033a34f337, 0x432)/*-4072598000007579.5*/, FP64_RAND_V1(0), FP64_RAND_V2(0), FP64_RAND_V1(0) } }, { /*src1 */ { FP64_V(0, 0xd6eca42000000, 0x419)/* 123450000.5*/, FP64_RAND_V2(0), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, { /* => */ { FP64_V(1, 0xcf0033a34f337, 0x432)/*-4072598000007579.5*/, FP64_RAND_V2(0), FP64_RAND_V2(1), FP64_RAND_V3(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ -1 }, /** @todo More Normals. */ /* * Denormals. */ /*46*/{ { /*src2 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(0), FP64_RAND_V0(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_0(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_0(0), FP64_SNAN(0), FP64_QNAN(1), FP64_QNAN(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(0), FP64_RAND_V3(1), FP64_RAND_V2(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V2(0), FP64_RAND_V3(1), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_INF(1), FP64_SNAN(0), FP64_INF(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_INF(0), FP64_QNAN(1), FP64_SNAN(1) } }, { /* => */ { FP64_0(0), FP64_INF(0), FP64_QNAN(1), FP64_SNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(1), FP64_RAND_V0(1), FP64_RAND_V3(0) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, { /* => */ { FP64_DENORM_MAX(0), FP64_RAND_V3(0), FP64_RAND_V2(0), FP64_RAND_V3(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MAX(0), FP64_RAND_V1(1), FP64_RAND_V2(1), FP64_RAND_V2(0) } }, { /*src1 */ { FP64_DENORM_MAX(1), FP64_RAND_V0(0), FP64_RAND_V3(0), FP64_RAND_V0(0) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_RAND_V0(0), FP64_RAND_V3(0), FP64_RAND_V0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MAX(1), FP64_RAND_V3(1), FP64_RAND_V0(0), FP64_RAND_V3(1) } }, { /*src1 */ { FP64_DENORM_MAX(0), FP64_RAND_V2(1), FP64_RAND_V3(1), FP64_RAND_V2(1) } }, { /* => */ { FP64_DENORM_MAX(1), FP64_RAND_V2(1), FP64_RAND_V3(1), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(1), FP64_RAND_V0(1), FP64_RAND_V3(1), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_DENORM_MIN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /* => */ { FP64_DENORM_MIN(1), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(1), FP64_INF(0), FP64_QNAN(1), FP64_SNAN(1) } }, { /*src1 */ { FP64_DENORM_MIN(1), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_DENORM_MIN(1), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(1), FP64_SNAN(1), FP64_SNAN(0), FP64_QNAN(0) } }, { /*src1 */ { FP64_DENORM_MIN(1), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, { /* => */ { FP64_0(1), FP64_RAND_V1(0), FP64_RAND_V2(1), FP64_RAND_V0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ -1 }, { { /*src2 */ { FP64_DENORM_MIN(0), FP64_RAND_V0(1), FP64_RAND_V1(0), FP64_RAND_V2(1) } }, { /*src1 */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, { /* => */ { FP64_0(0), FP64_RAND_V0(0), FP64_RAND_V1(1), FP64_RAND_V2(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE, /*256:out */ -1 }, /** @todo More Denormals. */ /* * Invalids. */ /*56*/ FP64_TABLE_D9_SD_INVALIDS }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_minsd_XMM3_XMM4_icebp_c16, 255, RM_REG, T_SSE2, 3, 3, 4, PASS_s_aValues }, { bs3CpuInstr4_minsd_XMM3_FSxBX_icebp_c16, 255, RM_MEM, T_SSE2, 3, 3, 255, PASS_s_aValues }, { bs3CpuInstr4_vminsd_XMM1_XMM6_XMM7_icebp_c16, 255, RM_REG, T_AVX_128, 1, 6, 7, PASS_s_aValues }, { bs3CpuInstr4_vminsd_XMM1_XMM6_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 6, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_minsd_XMM3_XMM4_icebp_c32, 255, RM_REG, T_SSE2, 3, 3, 4, PASS_s_aValues }, { bs3CpuInstr4_minsd_XMM3_FSxBX_icebp_c32, 255, RM_MEM, T_SSE2, 3, 3, 255, PASS_s_aValues }, { bs3CpuInstr4_vminsd_XMM1_XMM6_XMM7_icebp_c32, 255, RM_REG, T_AVX_128, 1, 6, 7, PASS_s_aValues }, { bs3CpuInstr4_vminsd_XMM1_XMM6_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 6, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_minsd_XMM3_XMM4_icebp_c64, 255, RM_REG, T_SSE2, 3, 3, 4, PASS_s_aValues }, { bs3CpuInstr4_minsd_XMM3_FSxBX_icebp_c64, 255, RM_MEM, T_SSE2, 3, 3, 255, PASS_s_aValues }, { bs3CpuInstr4_vminsd_XMM1_XMM6_XMM7_icebp_c64, 255, RM_REG, T_AVX_128, 1, 6, 7, PASS_s_aValues }, { bs3CpuInstr4_vminsd_XMM1_XMM6_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 6, 255, PASS_s_aValues }, { bs3CpuInstr4_minsd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE2, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_minsd_XMM8_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_SSE2, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vminsd_XMM8_XMM9_XMM10_icebp_c64, 255, RM_REG, T_AVX_128, 8, 9, 10, PASS_s_aValues }, { bs3CpuInstr4_vminsd_XMM8_XMM9_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 8, 9, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig3, RT_ELEMENTS(g_aXcptConfig3)); } /* * [V]RCPPS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_rcpps(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, { { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_RC_DOWN }, { { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, /* * Infinity. */ /* 4*/{ { /*src1 */ { FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src1 */ { FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src1 */ { FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src1 */ { FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP }, /* * Normals. */ /* 8*/{ { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1) } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ X86_MXCSR_FZ }, { { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1) } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_RC_DOWN }, { { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1) } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_RC_UP }, { { /*src1 */ { FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1), FP32_1(0), FP32_1(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src1 */ { FP32_V(0, 0, RTFLOAT32U_EXP_BIAS + 1)/* 2*/, FP32_V(1, 0, RTFLOAT32U_EXP_BIAS + 2)/* -4*/, FP32_V(0, 0, RTFLOAT32U_EXP_BIAS + 3)/* 8*/, FP32_V(1, 0, RTFLOAT32U_EXP_BIAS + 4)/*-16*/, FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 2), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 3), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 4), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_BIAS - 5), FP32_0(0), FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_MAX - 3), FP32_0(1), FP32_V(1, 0x7ff000, RTFLOAT32U_EXP_MAX - 3) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src1 */ { FP32_V(0, 0x7fe800, RTFLOAT32U_EXP_BIAS - 2)/* 1.11111111110100000000000(bin)*2^0 */, FP32_V(0, 0xc01, RTFLOAT32U_EXP_BIAS - 1)/* 1.00000000000110000000001(bin)*2^1 */, FP32_V(0, 0x7fe800, RTFLOAT32U_EXP_MAX - 3)/* 1.11111111110100000000000(bin)*2^125 */, FP32_V(0, 0xc01, RTFLOAT32U_EXP_MAX - 2)/* 1.00000000000110000000001(bin)*2^126 */, FP32_V(0, 0xc01, RTFLOAT32U_EXP_MAX - 3)/* 1.00000000000110000000001(bin)*2^125 */, FP32_V(0, 0xc00, RTFLOAT32U_EXP_MAX - 2)/* 1.00000000000110000000000(bin)*2^126 */, FP32_V(0, 0xc02, RTFLOAT32U_EXP_MAX - 2)/* 1.00000000000110000000010(bin)*2^126 */, FP32_V(0, 0x7fe801, RTFLOAT32U_EXP_MAX - 3)/* 1.11111111110100000000001(bin)*2^125 */ } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0, 4096, RTFLOAT32U_EXP_BIAS + 1), FP32_V(0, FP32_FRAC_DENORM_MAX - 4095, RTFLOAT32U_EXP_BIAS), FP32_V(0, 4096, 1), FP32_0(0), FP32_V(0, 0x7ff000, 1), FP32_0(0), FP32_0(0), FP32_V(0, 4096, 1) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src1 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_V(0, 0x1ea980, 0x8f)/*81235*/, FP32_V(0, 0x253468, 0x93)/*1353357*/, FP32_V(0, 0x620b2d, 0x92)/*925874.8*/, FP32_V(0, 0x600000, 0x7e)/*0.875*/, FP32_V(0, 0x490fda, 0x80)/*3.1415926*/, FP32_V(1, 0, 0x7d)/*-0.250*/, FP32_V(1, 0x534000, 0x86)/*-211.25*/ } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0, 1343488, 106), FP32_V(0, 5146624, 110), FP32_V(0, 4610048, 106), FP32_V(0, 1112064, 107), FP32_V(0, 1196032, 127), FP32_V(0, 2293760, 125), FP32_V(1, 8384512, 128), FP32_V(1, 1775616, 119) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ 0 }, /* * Denormals. */ /*15*/{ { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_DENORM_MAX(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src1 */ { FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_RC_DOWN }, { { /*src1 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src1 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(1), FP32_DENORM_MAX(0), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_DENORM_MIN(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_RC_UP | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_RC_UP | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_RC_UP | X86_MXCSR_FZ }, { { /*src1 */ { FP32_DENORM_V0(0), FP32_DENORM_V1(0), FP32_DENORM_V2(0), FP32_DENORM_V3(0), FP32_DENORM_V4(0), FP32_DENORM_V5(0), FP32_DENORM_V6(0), FP32_DENORM_V7(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_RC_UP }, { { /*src1 */ { FP32_DENORM_V0(1), FP32_DENORM_V1(1), FP32_DENORM_V2(1), FP32_DENORM_V3(1), FP32_DENORM_V4(1), FP32_DENORM_V5(1), FP32_DENORM_V6(1), FP32_DENORM_V7(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1), FP32_INF(1) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src1 */ { FP32_DENORM_V7(1), FP32_DENORM_V6(0), FP32_DENORM_V5(1), FP32_DENORM_V4(0), FP32_DENORM_V3(1), FP32_DENORM_V2(0), FP32_DENORM_V1(1), FP32_DENORM_V0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_RC_DOWN }, { { /*src1 */ { FP32_DENORM_V7(1), FP32_DENORM_V6(0), FP32_DENORM_V5(1), FP32_DENORM_V4(0), FP32_DENORM_V3(1), FP32_DENORM_V2(0), FP32_DENORM_V1(1), FP32_DENORM_V0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0), FP32_INF(1), FP32_INF(0) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_DAZ }, /** @todo More Denormals. */ /* * Invalids. */ /*23*/{ { /*src1 */ { FP32_SNAN(0), FP32_SNAN(1), FP32_QNAN(0), FP32_QNAN(1), FP32_SNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_SNAN(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_V(1, 1), FP32_QNAN(0), FP32_QNAN(1), FP32_QNAN_V(1, 1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN_V(1, 1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src1 */ { FP32_SNAN(0), FP32_SNAN(1), FP32_QNAN(0), FP32_QNAN(1), FP32_SNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_SNAN(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_V(1, 1), FP32_QNAN(0), FP32_QNAN(1), FP32_QNAN_V(1, 1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN_V(1, 1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src1 */ { FP32_SNAN(0), FP32_SNAN(1), FP32_QNAN(0), FP32_QNAN(1), FP32_SNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_SNAN(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_V(1, 1), FP32_QNAN(0), FP32_QNAN(1), FP32_QNAN_V(1, 1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN_V(1, 1) } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_RC_UP }, { { /*src1 */ { FP32_SNAN(0), FP32_SNAN(1), FP32_QNAN(0), FP32_QNAN(1), FP32_SNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_SNAN(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_QNAN_V(0, 1), FP32_QNAN_V(1, 1), FP32_QNAN(0), FP32_QNAN(1), FP32_QNAN_V(1, 1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN_V(1, 1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, { { /*src1 */ { FP32_SNAN_V0(0), FP32_SNAN_V1(1), FP32_SNAN_V2(0), FP32_SNAN_V3(1), FP32_SNAN_V4(1), FP32_SNAN_V5(1), FP32_SNAN_V6(1), FP32_SNAN_V7(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_QNAN_V0(0), FP32_QNAN_V1(1), FP32_QNAN_V2(0), FP32_QNAN_V3(1), FP32_QNAN_V4(1), FP32_QNAN_V5(1), FP32_QNAN_V6(1), FP32_QNAN_V7(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_ZERO }, { { /*src1 */ { FP32_QNAN_V0(0), FP32_QNAN_V0(1), FP32_QNAN_V0(0), FP32_QNAN_V0(1), FP32_QNAN_V0(1), FP32_QNAN_V0(0), FP32_QNAN_V0(1), FP32_QNAN_V0(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_QNAN_V0(0), FP32_QNAN_V0(1), FP32_QNAN_V0(0), FP32_QNAN_V0(1), FP32_QNAN_V0(1), FP32_QNAN_V0(0), FP32_QNAN_V0(1), FP32_QNAN_V0(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src1 */ { FP32_QNAN_V0(1), FP32_SNAN_V0(1), FP32_QNAN_V1(1), FP32_SNAN_V0(1), FP32_QNAN_V7(1), FP32_SNAN_V7(1), FP32_QNAN_V3(1), FP32_SNAN_V0(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_QNAN_V0(1), FP32_QNAN_V0(1), FP32_QNAN_V1(1), FP32_QNAN_V0(1), FP32_QNAN_V7(1), FP32_QNAN_V7(1), FP32_QNAN_V3(1), FP32_QNAN_V0(1) } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src1 */ { FP32_QNAN_V0(1), FP32_SNAN_V0(1), FP32_QNAN_V1(1), FP32_SNAN_V3(1), FP32_QNAN_V4(1), FP32_SNAN_V5(1), FP32_QNAN_V6(1), FP32_SNAN_V7(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_QNAN_V0(1), FP32_QNAN_V0(1), FP32_QNAN_V1(1), FP32_QNAN_V3(1), FP32_QNAN_V4(1), FP32_QNAN_V5(1), FP32_QNAN_V6(1), FP32_QNAN_V7(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_DAZ }, }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_rcpps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_rcpps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_AVX_128, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_YMM1_YMM2_icebp_c16, 255, RM_REG, T_AVX_256, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_YMM1_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 1, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_rcpps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_rcpps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_AVX_128, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_YMM1_YMM2_icebp_c32, 255, RM_REG, T_AVX_256, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_YMM1_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 1, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_rcpps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_rcpps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_AVX_128, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_YMM1_YMM2_icebp_c64, 255, RM_REG, T_AVX_256, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_YMM1_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_rcpps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_rcpps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_AVX_128, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_YMM8_YMM9_icebp_c64, 255, RM_REG, T_AVX_256, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_vrcpps_YMM8_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 8, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig4, RT_ELEMENTS(g_aXcptConfig4)); } /* * [V]RCPSS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_rcpss(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_SS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src1 */ { FP32_0(0), FP32_RAND_x7_V7 } }, { /*src2 */ { FP32_RAND_V2(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src1 */ { FP32_0(1), FP32_RAND_x7_V0 } }, { /*src2 */ { FP32_RAND_V3(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src1 */ { FP32_0(1), FP32_RAND_x7_V2 } }, { /*src2 */ { FP32_RAND_V5(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src1 */ { FP32_0(1), FP32_RAND_x7_V0 } }, { /*src2 */ { FP32_RAND_V5(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src1 */ { FP32_0(1), FP32_RAND_x7_V0 } }, { /*src2 */ { FP32_RAND_V1(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_INF(1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src1 */ { FP32_0(0), FP32_RAND_x7_V0 } }, { /*src2 */ { FP32_RAND_V0(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_INF(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ, /*256:out */ -1 }, /* * Infinity. */ /* 6*/{ { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V1 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V3 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V5 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src1 */ { FP32_INF(0), FP32_RAND_x7_V6 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V6 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, { { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V5 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V6 } }, { /*unused */ { FP32_RAND_V3(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V3 } }, { /*unused */ { FP32_RAND_V4(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src1 */ { FP32_INF(1), FP32_RAND_x7_V6 } }, { /*unused */ { FP32_RAND_V5(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_0(1), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_FZ, /*128:out */ X86_MXCSR_FZ, /*256:out */ -1 }, /* * Normals. */ /*15*/{ { /*src1 */ { FP32_1(0), FP32_RAND_x7_V3 } }, { /*unused */ { FP32_RAND_V3(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_RAND_x7_V2 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_1(0), FP32_RAND_x7_V3 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src1 */ { FP32_1(0), FP32_RAND_x7_V3 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src1 */ { FP32_1(0), FP32_RAND_x7_V2 } }, { /*unused */ { FP32_RAND_V1(0), FP32_RAND_x7_V6 } }, { /* => */ { FP32_V(0, 0x7ff000, RTFLOAT32U_EXP_BIAS - 1), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x7fe800, RTFLOAT32U_EXP_BIAS - 2), FP32_RAND_x7_V2 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(0, 4096, RTFLOAT32U_EXP_BIAS + 1), FP32_RAND_x7_V1 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0xc01, RTFLOAT32U_EXP_BIAS - 1), FP32_RAND_x7_V5 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V4 } }, { /* => */ { FP32_V(0, FP32_FRAC_DENORM_MAX - 4095, RTFLOAT32U_EXP_BIAS), FP32_RAND_x7_V4 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x7fe800, RTFLOAT32U_EXP_MAX - 3), FP32_RAND_x7_V5 } }, { /*unused */ { FP32_RAND_V1(1), FP32_RAND_x7_V6 } }, { /* => */ { FP32_V(0, 4096, 1), FP32_RAND_x7_V6 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x7fe800, RTFLOAT32U_EXP_MAX - 3), FP32_RAND_x7_V5 } }, { /*unused */ { FP32_RAND_V1(1), FP32_RAND_x7_V6 } }, { /* => */ { FP32_V(0, 4096, 1), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x7fe800, RTFLOAT32U_EXP_MAX - 3), FP32_RAND_x7_V5 } }, { /*unused */ { FP32_RAND_V1(1), FP32_RAND_x7_V6 } }, { /* => */ { FP32_V(0, 4096, 1), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0xc01, RTFLOAT32U_EXP_MAX - 2), FP32_RAND_x7_V1 } }, { /*unused */ { FP32_RAND_V2(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0xc01, RTFLOAT32U_EXP_MAX - 3), FP32_RAND_x7_V1 } }, { /*unused */ { FP32_RAND_V2(1), FP32_RAND_x7_V6 } }, { /* => */ { FP32_V(0, 0x7ff000, 1), FP32_RAND_x7_V6 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0xc00, RTFLOAT32U_EXP_MAX - 2), FP32_RAND_x7_V0 } }, { /*unused */ { FP32_RAND_V1(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V3 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0xc00, RTFLOAT32U_EXP_MAX - 2), FP32_RAND_x7_V0 } }, { /*unused */ { FP32_RAND_V2(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0xc00, RTFLOAT32U_EXP_MAX - 2), FP32_RAND_x7_V2 } }, { /*unused */ { FP32_RAND_V4(1), FP32_RAND_x7_V4 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0xc02, RTFLOAT32U_EXP_MAX - 2), FP32_RAND_x7_V3 } }, { /*unused */ { FP32_RAND_V6(1), FP32_RAND_x7_V5 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V5 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0xc02, RTFLOAT32U_EXP_MAX - 2), FP32_RAND_x7_V1 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V2 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V2 } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0xc02, RTFLOAT32U_EXP_MAX - 2), FP32_RAND_x7_V0 } }, { /*unused */ { FP32_RAND_V3(1), FP32_RAND_x7_V6 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0xc02, RTFLOAT32U_EXP_MAX - 2), FP32_RAND_x7_V3 } }, { /*unused */ { FP32_RAND_V5(1), FP32_RAND_x7_V5 } }, { /* => */ { FP32_0(0), FP32_RAND_x7_V5 } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x7fe801, RTFLOAT32U_EXP_MAX - 3), FP32_RAND_x7_V7 } }, { /*unused */ { FP32_RAND_V7(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(0, 4096, 1), FP32_RAND_x7_V3 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x7fe801, RTFLOAT32U_EXP_MAX - 3), FP32_RAND_x7_V3 } }, { /*unused */ { FP32_RAND_V4(1), FP32_RAND_x7_V4 } }, { /* => */ { FP32_V(0, 4096, 1), FP32_RAND_x7_V4 } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x7fe801, RTFLOAT32U_EXP_MAX - 3), FP32_RAND_x7_V2 } }, { /*unused */ { FP32_RAND_V3(1), FP32_RAND_x7_V6 } }, { /* => */ { FP32_V(0, 4096, 1), FP32_RAND_x7_V6 } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x7fe801, RTFLOAT32U_EXP_MAX - 3), FP32_RAND_x7_V1 } }, { /*unused */ { FP32_RAND_V2(1), FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(0, 4096, 1), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_RAND_x7_V1 } }, { /*unused */ { FP32_RAND_V3(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(0, 1343488, 106), FP32_RAND_x7_V3 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_RAND_x7_V1 } }, { /*unused */ { FP32_RAND_V3(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(0, 1343488, 106), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x5ca5b8, 0x93)/*1807543*/, FP32_RAND_x7_V1 } }, { /*unused */ { FP32_RAND_V3(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(0, 1343488, 106), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x1ea980, 0x8f)/*81235*/, FP32_RAND_x7_V1 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(0, 5146624, 110), FP32_RAND_x7_V3 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x253468, 0x93)/*1353357*/, FP32_RAND_x7_V2 } }, { /*unused */ { FP32_RAND_V3(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(0, 4610048, 106), FP32_RAND_x7_V0 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x620b2d, 0x92)/*925874.8*/, FP32_RAND_x7_V4 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(0, 1112064, 107), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x620b2d, 0x92)/*925874.8*/, FP32_RAND_x7_V4 } }, { /*unused */ { FP32_RAND_V2(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(0, 1112064, 107), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x600000, 0x7e)/*0.875*/, FP32_RAND_x7_V4 } }, { /*unused */ { FP32_RAND_V3(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(0, 1196032, 127), FP32_RAND_x7_V0 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x490fda, 0x80)/*3.1415926*/, FP32_RAND_x7_V2 } }, { /*unused */ { FP32_RAND_V1(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(0, 2293760, 125), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x490fda, 0x80)/*3.1415926*/, FP32_RAND_x7_V2 } }, { /*unused */ { FP32_RAND_V1(0), FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(0, 2293760, 125), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_RC_UP, /*256:out */ -1 }, { { /*src1 */ { FP32_V(0, 0x490fda, 0x80)/*3.1415926*/, FP32_RAND_x7_V2 } }, { /*unused */ { FP32_RAND_V1(0), FP32_RAND_x7_V0 } }, { /* => */ { FP32_V(0, 2293760, 125), FP32_RAND_x7_V0 } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src1 */ { FP32_V(1, 0, 0x7d)/*-0.250*/, FP32_RAND_x7_V6 } }, { /*unused */ { FP32_RAND_V6(0), FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(1, 8384512, 128), FP32_RAND_x7_V1 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(1, 0, 0x7d)/*-0.250*/, FP32_RAND_x7_V6 } }, { /*unused */ { FP32_RAND_V3(1), FP32_RAND_x7_V1 } }, { /* => */ { FP32_V(1, 8384512, 128), FP32_RAND_x7_V1 } }, /*mxcsr:in */ X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_RC_DOWN, /*256:out */ -1 }, { { /*src1 */ { FP32_V(1, 0x534000, 0x86)/*-211.25*/, FP32_RAND_x7_V2 } }, { /*unused */ { FP32_RAND_V3(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(1, 1775616, 119), FP32_RAND_x7_V3 } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ -1 }, { { /*src1 */ { FP32_V(1, 0x534000, 0x86)/*-211.25*/, FP32_RAND_x7_V2 } }, { /*unused */ { FP32_RAND_V3(1), FP32_RAND_x7_V3 } }, { /* => */ { FP32_V(1, 1775616, 119), FP32_RAND_x7_V3 } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ -1 }, }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_rcpss_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_rcpss_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vrcpss_XMM1_XMM2_XMM3_icebp_c16, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vrcpss_XMM1_XMM2_FSxBX_icebp_c16, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_rcpss_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_rcpss_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vrcpss_XMM1_XMM2_XMM3_icebp_c32, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vrcpss_XMM1_XMM2_FSxBX_icebp_c32, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_rcpss_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_rcpss_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_rcpss_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_rcpss_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vrcpss_XMM1_XMM2_XMM3_icebp_c64, X86_XCPT_AC, RM_REG, T_AVX_128, 1, 2, 3, PASS_s_aValues }, { bs3CpuInstr4_vrcpss_XMM1_XMM2_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 1, 2, 255, PASS_s_aValues }, { bs3CpuInstr4_vrcpss_XMM13_XMM14_XMM15_icebp_c64, X86_XCPT_AC, RM_REG, T_AVX_128, 13, 14, 15, PASS_s_aValues }, { bs3CpuInstr4_vrcpss_XMM13_XMM14_FSxBX_icebp_c64, X86_XCPT_AC, RM_MEM, T_AVX_128, 13, 14, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig5, RT_ELEMENTS(g_aXcptConfig5)); } /* * [V]SQRTPS. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_sqrtps(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PS_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src1 */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 4*/{ { /*src1 */ { FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_INF(1), FP32_0(0), FP32_0(0), FP32_0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_INF(0), FP32_0(0), FP32_0(0), FP32_0(0), FP32_QNAN(1), FP32_0(0), FP32_0(0), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_IE }, /* * Precision (Overflow, Underflow not possible). */ /* 5*/{ { /*src1 */ { FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_0(0), FP32_1(0), FP32_2(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_0(0), FP32_1(0), FP32_V(0, 0x3504f3, 0x7f)/*sqrt(2)*/ } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_PE }, { { /*src1 */ { FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_0(0), FP32_1(0), FP32_2(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_0(0), FP32_1(0), FP32_V(0, 0x3504f3, 0x7f)/*sqrt(2)*/ } }, /*mxcsr:in */ X86_MXCSR_PM | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_PM | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_PM | X86_MXCSR_RC_DOWN | X86_MXCSR_PE }, { { /*src1 */ { FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_0(0), FP32_1(0), FP32_2(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_0(0), FP32_1(0), FP32_V(0, 0x3504f4, 0x7f)/*sqrt^(2)*/ } }, /*mxcsr:in */ X86_MXCSR_PM | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_PM | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_PM | X86_MXCSR_RC_UP | X86_MXCSR_PE }, { { /*src1 */ { FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_0(0), FP32_1(0), FP32_2(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_0(0), FP32_1(0), FP32_V(0, 0x3504f3, 0x7f)/*sqrt(2)*/ } }, /*mxcsr:in */ X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_PE }, { { /*src1 */ { FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_0(0), FP32_1(0), FP32_2(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_1(0), FP32_1(0), FP32_0(1), FP32_1(0), FP32_0(0), FP32_1(0), FP32_V(0, 0x3504f3, 0x7f)/*sqrt(2)*/ } }, /*mxcsr:in */ X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_PE }, /* * Normals. */ /*10*/{ { /*src1 */ { FP32_NORM_V0(0), FP32_NORM_V1(0), FP32_NORM_V2(0), FP32_NORM_V3(0), FP32_NORM_V4(0), FP32_NORM_V5(0), FP32_NORM_V6(0), FP32_NORM_V7(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0,0x1ccf5c,0x40)/*sqrt(FP32_NORM_V0)*/, FP32_V(0,0x293fdb,0x97)/*sqrt(FP32_NORM_V1)*/, FP32_V(0,0x3455c7,0x7e)/*sqrt(FP32_NORM_V2)*/, FP32_V(0,0x27905f,0xbe)/*sqrt(FP32_NORM_V3)*/, FP32_V(0,0x49278b,0x9d)/*sqrt(FP32_NORM_V4)*/, FP32_V(0,0x009150,0xa8)/*sqrt(FP32_NORM_V5)*/, FP32_V(0,0x561776,0x5d)/*sqrt(FP32_NORM_V6)*/, FP32_V(0,0x3504f3,0x68)/*sqrt(FP32_NORM_V7)*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE }, { { /*src1 */ { FP32_V(0,0x44000,0x88)/*529.0*/, FP32_V(0,0x0,0x87)/*256.0*/, FP32_V(0,0x440000,0x7c)/*(7/16)^2*/, FP32_V(0,0x6f4840,0x8c)/*123.75^2*/, FP32_V(0,0x40000,0x88)/*528.0*/, FP32_V(0,0x8000,0x87)/*257.0*/, FP32_V(0,0x43ffff,0x7c)/*(7/16)^2-epsilon*/, FP32_V(0,0x6f4841,0x8c)/*123.75^2+epsilon*/ } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0,0x380000,0x83)/*23.0*/, FP32_V(0,0x0,0x83)/*16.0*/, FP32_V(0,0x600000,0x7d)/*7/16*/, FP32_V(0,0x778000,0x85)/*123.75*/, FP32_V(0,0x37d375,0x83)/*sqrt(528)*/, FP32_V(0,0x3ff0,0x83)/*sqrt(257)*/, FP32_V(0,0x5fffff,0x7d)/*7/16-*/, FP32_V(0,0x778001,0x85)/*123.75+*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE }, { { /*src1 */ { FP32_V(0,0x44000,0x88)/*529.0*/, FP32_V(0,0x0,0x87)/*256.0*/, FP32_V(0,0x440000,0x7c)/*(7/16)^2*/, FP32_V(0,0x6f4840,0x8c)/*123.75^2*/, FP32_V(0,0x40000,0x88)/*528.0*/, FP32_V(0,0x8000,0x87)/*257.0*/, FP32_V(0,0x43ffff,0x7c)/*(7/16)^2-epsilon*/, FP32_V(0,0x6f4841,0x8c)/*123.75^2+epsilon*/ } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0,0x380000,0x83)/*23.0*/, FP32_V(0,0x0,0x83)/*16.0*/, FP32_V(0,0x600000,0x7d)/*7/16*/, FP32_V(0,0x778000,0x85)/*123.75*/, FP32_V(0,0x37d375,0x83)/*sqrt(528)*/, FP32_V(0,0x3ff0,0x83)/*sqrt(257)*/, FP32_V(0,0x5fffff,0x7d)/*7/16-*/, FP32_V(0,0x778000,0x85)/*123.75[DOWN]*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE | X86_MXCSR_RC_DOWN }, { { /*src1 */ { FP32_V(0,0x44000,0x88)/*529.0*/, FP32_V(0,0x0,0x87)/*256.0*/, FP32_V(0,0x440000,0x7c)/*(7/16)^2*/, FP32_V(0,0x6f4840,0x8c)/*123.75^2*/, FP32_V(0,0x40000,0x88)/*528.0*/, FP32_V(0,0x8000,0x87)/*257.0*/, FP32_V(0,0x43ffff,0x7c)/*(7/16)^2-epsilon*/, FP32_V(0,0x6f4841,0x8c)/*123.75^2+epsilon*/ } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0,0x380000,0x83)/*23.0*/, FP32_V(0,0x0,0x83)/*16.0*/, FP32_V(0,0x600000,0x7d)/*7/16*/, FP32_V(0,0x778000,0x85)/*123.75*/, FP32_V(0,0x37d376,0x83)/*sqrt(528)[UP]*/, FP32_V(0,0x3ff1,0x83)/*sqrt(257)[UP]*/, FP32_V(0,0x600000,0x7d)/*7/16[UP]*/, FP32_V(0,0x778001,0x85)/*123.75+*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE | X86_MXCSR_RC_UP }, { { /*src1 */ { FP32_V(0,0x44000,0x88)/*529.0*/, FP32_V(0,0x0,0x87)/*256.0*/, FP32_V(0,0x440000,0x7c)/*(7/16)^2*/, FP32_V(0,0x6f4840,0x8c)/*123.75^2*/, FP32_V(0,0x40000,0x88)/*528.0*/, FP32_V(0,0x8000,0x87)/*257.0*/, FP32_V(0,0x43ffff,0x7c)/*(7/16)^2-epsilon*/, FP32_V(0,0x6f4841,0x8c)/*123.75^2+epsilon*/ } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0,0x380000,0x83)/*23.0*/, FP32_V(0,0x0,0x83)/*16.0*/, FP32_V(0,0x600000,0x7d)/*7/16*/, FP32_V(0,0x778000,0x85)/*123.75*/, FP32_V(0,0x37d375,0x83)/*sqrt(528)*/, FP32_V(0,0x3ff0,0x83)/*sqrt(257)*/, FP32_V(0,0x5fffff,0x7d)/*7/16-*/, FP32_V(0,0x778000,0x85)/*123.75[ZERO=DOWN]*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE | X86_MXCSR_RC_ZERO }, { { /*src1 */ { FP32_NORM_MAX(0), FP32_NORM_MIN(0), FP32_NORM_SAFE_INT_MAX(0), FP32_NORM_SAFE_INT_MIN(0), FP32_NORM_MAX(1), FP32_NORM_MIN(1), FP32_NORM_SAFE_INT_MAX(1), FP32_NORM_SAFE_INT_MIN(1) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0,0x7fffff,0xbe)/*sqrt(FP32_NORM_MAX)*/, FP32_V(0,0x0,0x40)/*sqrt(FP32_NORM_MIN)*/, FP32_V(0,0x7fffff,0x8a)/*sqrt(FP32_NORM_SAFE_INT_MAX)*/, FP32_V(0,0x0,0x40)/*sqrt(FP32_NORM_SAFE_INT_MIN)*/, FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1), FP32_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_PE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_PE | X86_MXCSR_IE | BS3_MXCSR_PE_FUZZY /* IEM */ }, /** @todo More Normals. */ /* * Denormals. */ /*16*/{ { /*src1 */ { FP32_DENORM_MAX(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(1), FP32_DENORM_MAX(1), FP32_DENORM_MAX(1), FP32_0(1), FP32_0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0,0x7fffff,0x3f), FP32_V(0,0x7fffff,0x3f), FP32_0(0), FP32_0(1), FP32_QNAN(1), FP32_QNAN(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | X86_MXCSR_PE, /*256:out */ X86_MXCSR_DE | X86_MXCSR_IE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src1 */ { FP32_DENORM_MIN(0), FP32_DENORM_MIN(0), FP32_0(0), FP32_0(1), FP32_DENORM_MIN(1), FP32_DENORM_MIN(1), FP32_0(1), FP32_0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0,0x3504f3,0x34), FP32_V(0,0x3504f3,0x34), FP32_0(0), FP32_0(1), FP32_QNAN(1), FP32_QNAN(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | X86_MXCSR_PE, /*256:out */ X86_MXCSR_DE | X86_MXCSR_IE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src1 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_0(1), FP32_0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0,0x3504f3+1,0x34), FP32_V(0,0x7fffff,0x3f), FP32_0(0), FP32_0(1), FP32_QNAN(1), FP32_QNAN(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_IE | X86_MXCSR_PE | X86_MXCSR_RC_UP | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src1 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_0(1), FP32_0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0,0x3504f3,0x34), FP32_V(0,0x7fffff-1,0x3f), FP32_0(0), FP32_0(1), FP32_QNAN(1), FP32_QNAN(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_IE | X86_MXCSR_PE | X86_MXCSR_RC_DOWN | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src1 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_0(1), FP32_0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0,0x3504f3,0x34), FP32_V(0,0x7fffff-1,0x3f), FP32_0(0), FP32_0(1), FP32_QNAN(1), FP32_QNAN(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_IE | X86_MXCSR_PE | X86_MXCSR_RC_ZERO | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src1 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_0(1), FP32_0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_V(0,0x3504f3,0x34), FP32_V(0,0x7fffff,0x3f), FP32_0(0), FP32_0(1), FP32_QNAN(1), FP32_QNAN(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_IE | X86_MXCSR_PE | X86_MXCSR_FZ | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src1 */ { FP32_DENORM_MIN(0), FP32_DENORM_MAX(0), FP32_0(0), FP32_0(1), FP32_DENORM_MIN(1), FP32_DENORM_MAX(1), FP32_0(1), FP32_0(0) } }, { /*unused */ { FP32_ROW_UNUSED } }, { /* => */ { FP32_0(0), FP32_0(0), FP32_0(0), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(1), FP32_0(0) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, /** @todo More Denormals. */ /* * Invalids. */ /** @todo Invalids. */ /*23*/ /* FP32_TABLE_D10_PS_INVALIDS */ /** @todo Underflow; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_sqrtps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_sqrtps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_XMM1_XMM2_icebp_c16, 255, RM_REG, T_AVX_128, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_YMM1_YMM2_icebp_c16, 255, RM_REG, T_AVX_256, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_YMM1_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 1, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_sqrtps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_sqrtps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_XMM1_XMM2_icebp_c32, 255, RM_REG, T_AVX_128, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_YMM1_YMM2_icebp_c32, 255, RM_REG, T_AVX_256, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_YMM1_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 1, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_sqrtps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_sqrtps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_XMM1_XMM2_icebp_c64, 255, RM_REG, T_AVX_128, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_YMM1_YMM2_icebp_c64, 255, RM_REG, T_AVX_256, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_YMM1_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_sqrtps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_sqrtps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_XMM8_XMM9_icebp_c64, 255, RM_REG, T_AVX_128, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_YMM8_YMM9_icebp_c64, 255, RM_REG, T_AVX_256, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_vsqrtps_YMM8_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 8, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /* * [V]SQRTPD. */ BS3_DECL_FAR(uint8_t) bs3CpuInstr4_v_sqrtpd(uint8_t bMode) { static BS3CPUINSTR4_TEST1_VALUES_PD_T const s_aValues[] = { /* * Zero. */ /* 0*/{ { /*src1 */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(1) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK }, { { /*src1 */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_0(0), FP64_0(1), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_UP }, { { /*src1 */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_0(1), FP64_0(1), FP64_0(0), FP64_0(0) } }, /*mxcsr:in */ X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_RC_ZERO }, { { /*src1 */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(1) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_0(1), FP64_0(0), FP64_0(0), FP64_0(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_RC_DOWN }, /* * Infinity. */ /* 4*/{ { /*src1 */ { FP64_INF(0), FP64_0(0), FP64_INF(1), FP64_0(0) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_INF(0), FP64_0(0), FP64_QNAN(1), FP64_0(0) } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_IE }, /* * Precision (Overflow, Underflow not possible). */ /* 5*/{ { /*src1 */ { FP64_0(0), FP64_1(0), FP64_0(1), FP64_2(0) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_0(0), FP64_1(0), FP64_0(1), FP64_V(0,0x6a09e667f3bcd,0x3ff)/*sqrt(2)*/ } }, /*mxcsr:in */ 0, /*128:out */ 0, /*256:out */ X86_MXCSR_PE }, { { /*src1 */ { FP64_0(0), FP64_1(0), FP64_0(1), FP64_2(0) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_0(0), FP64_1(0), FP64_0(1), FP64_V(0,0x6a09e667f3bcc,0x3ff)/*sqrt(2)v*/ } }, /*mxcsr:in */ X86_MXCSR_PM | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_PM | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_PM | X86_MXCSR_RC_DOWN | X86_MXCSR_PE }, { { /*src1 */ { FP64_0(0), FP64_1(0), FP64_0(1), FP64_2(0) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_0(0), FP64_1(0), FP64_0(1), FP64_V(0,0x6a09e667f3bcd,0x3ff)/*sqrt(2)*/ } }, /*mxcsr:in */ X86_MXCSR_PM | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_PM | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_PM | X86_MXCSR_RC_UP | X86_MXCSR_PE }, { { /*src1 */ { FP64_0(0), FP64_1(0), FP64_0(1), FP64_2(0) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_0(0), FP64_1(0), FP64_0(1), FP64_V(0,0x6a09e667f3bcc,0x3ff)/*sqrt(2)v*/ } }, /*mxcsr:in */ X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_PM | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_PM | X86_MXCSR_RC_ZERO | X86_MXCSR_PE }, { { /*src1 */ { FP64_0(0), FP64_1(0), FP64_0(1), FP64_2(0) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_0(0), FP64_1(0), FP64_0(1), FP64_V(0,0x6a09e667f3bcd,0x3ff)/*sqrt(2)*/ } }, /*mxcsr:in */ X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_PM | X86_MXCSR_FZ | X86_MXCSR_DAZ | X86_MXCSR_PE }, /* * Normals. */ /*10*/{ { /*src1 */ { FP64_NORM_V0(0), FP64_NORM_V1(0), FP64_NORM_V2(0), FP64_NORM_V3(0) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_V(0,0x4b4cf5d7baa8f,0x200)/*sqrt(FP64_NORM_V0)*/, FP64_V(0,0x64b5ec5f93a20,0x516)/*sqrt(FP64_NORM_V1)*/, FP64_V(0,0x568cddb7b5f47,0x5fe)/*sqrt(FP64_NORM_V2)*/, FP64_V(0,0x4ebe86dd38102,0x440)/*sqrt(FP64_NORM_V3)*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE }, { { /*src1 */ { FP64_V(0,0xf46c4c48b9b90,0x42f)/*23456789^2*/, FP64_V(0,0x153e1f1867880,0x408)/*(12345678/524288)^2*/, FP64_V(0,0xf46c4c48b9ba0,0x42f)/*23456789^2+1*/, FP64_V(0,0x153e1f186787f,0x408)/*(12345678/524288)^2-epsilon*/ } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_V(0,0x65ec150000000,0x417)/*23456789*/, FP64_V(0,0x78c29c0000000,0x403)/*12345678/524288*/, FP64_V(0,0x65ec150000006,0x417)/*23456789+*/, FP64_V(0,0x78c29bfffffff,0x403)/*12345678/524288-*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK, /*128:out */ X86_MXCSR_XCPT_MASK, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE }, { { /*src1 */ { FP64_V(0,0xf46c4c48b9b90,0x42f)/*23456789^2*/, FP64_V(0,0x153e1f1867880,0x408)/*(12345678/524288)^2*/, FP64_V(0,0xf46c4c48b9ba0,0x42f)/*23456789^2+1*/, FP64_V(0,0x153e1f186787f,0x408)/*(12345678/524288)^2-epsilon*/ } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_V(0,0x65ec150000000,0x417)/*23456789*/, FP64_V(0,0x78c29c0000000,0x403)/*12345678/524288*/, FP64_V(0,0x65ec150000005,0x417)/*23456789+[DOWN]*/, FP64_V(0,0x78c29bfffffff,0x403)/*12345678/524288-*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE | X86_MXCSR_RC_DOWN }, { { /*src1 */ { FP64_V(0,0xf46c4c48b9b90,0x42f)/*23456789^2*/, FP64_V(0,0x153e1f1867880,0x408)/*(12345678/524288)^2*/, FP64_V(0,0xf46c4c48b9ba0,0x42f)/*23456789^2+1*/, FP64_V(0,0x153e1f186787f,0x408)/*(12345678/524288)^2-epsilon*/ } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_V(0,0x65ec150000000,0x417)/*23456789*/, FP64_V(0,0x78c29c0000000,0x403)/*12345678/524288*/, FP64_V(0,0x65ec150000006,0x417)/*23456789+*/, FP64_V(0,0x78c29c0000000,0x403)/*12345678/524288[UP]*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE | X86_MXCSR_RC_UP }, { { /*src1 */ { FP64_V(0,0xf46c4c48b9b90,0x42f)/*23456789^2*/, FP64_V(0,0x153e1f1867880,0x408)/*(12345678/524288)^2*/, FP64_V(0,0xf46c4c48b9ba0,0x42f)/*23456789^2+1*/, FP64_V(0,0x153e1f186787f,0x408)/*(12345678/524288)^2-epsilon*/ } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_V(0,0x65ec150000000,0x417)/*23456789*/, FP64_V(0,0x78c29c0000000,0x403)/*12345678/524288*/, FP64_V(0,0x65ec150000005,0x417)/*23456789+[ZERO]*/, FP64_V(0,0x78c29bfffffff,0x403)/*12345678/524288-*/ } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_PE | X86_MXCSR_RC_ZERO }, { { /*src1 */ { FP64_NORM_MAX(0), FP64_NORM_MIN(0), FP64_NORM_MAX(1), FP64_NORM_MIN(1) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_V(0,0xfffffffffffff,0x5fe)/*sqrt(FP64_NORM_MAX)*/, FP64_V(0,0x0,0x200)/*sqrt(FP64_NORM_MIN)*/, FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_PE, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ | X86_MXCSR_FZ | X86_MXCSR_PE | X86_MXCSR_IE | BS3_MXCSR_PE_FUZZY /* IEM */ }, /** @todo More Normals. */ /* * Denormals. */ /*16*/{ { /*src1 */ { FP64_DENORM_MAX(0), FP64_0(0), FP64_0(1), FP64_DENORM_MAX(1) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_V(0,0xfffffffffffff,0x1ff), FP64_0(0), FP64_0(1), FP64_QNAN(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE | X86_MXCSR_PE, /*256:out */ X86_MXCSR_DE | X86_MXCSR_IE | X86_MXCSR_PE | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src1 */ { FP64_DENORM_MIN(0), FP64_0(0), FP64_0(1), FP64_DENORM_MIN(1) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_V(0,0x0,0x1e6), FP64_0(0), FP64_0(1), FP64_QNAN(1) } }, /*mxcsr:in */ 0, /*128:out */ X86_MXCSR_DE, /*256:out */ X86_MXCSR_DE | X86_MXCSR_IE }, { { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(1), FP64_DENORM_MAX(1) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_V(0,0x0,0x1e6), FP64_V(0,0xfffffffffffff,0x1ff), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_UP, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_RC_UP, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_IE | X86_MXCSR_PE | X86_MXCSR_RC_UP | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(1), FP64_DENORM_MAX(1) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_V(0,0x0,0x1e6), FP64_V(0,0xffffffffffffe,0x1ff), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_DOWN, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_RC_DOWN, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_IE | X86_MXCSR_PE | X86_MXCSR_RC_DOWN | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(1), FP64_DENORM_MAX(1) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_V(0,0x0,0x1e6), FP64_V(0,0xffffffffffffe,0x1ff), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_ZERO, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_RC_ZERO, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_IE | X86_MXCSR_PE | X86_MXCSR_RC_ZERO | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(1), FP64_DENORM_MAX(1) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_V(0,0x0,0x1e6), FP64_V(0,0xfffffffffffff,0x1ff), FP64_QNAN(1), FP64_QNAN(1) } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_FZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_PE | X86_MXCSR_FZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DE | X86_MXCSR_IE | X86_MXCSR_PE | X86_MXCSR_FZ | BS3_MXCSR_PE_FUZZY /* IEM */ }, { { /*src1 */ { FP64_DENORM_MIN(0), FP64_DENORM_MAX(0), FP64_DENORM_MIN(1), FP64_DENORM_MAX(1) } }, { /*unused */ { FP64_ROW_UNUSED } }, { /* => */ { FP64_0(0), FP64_0(0), FP64_0(1), FP64_0(1), } }, /*mxcsr:in */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*128:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ, /*256:out */ X86_MXCSR_XCPT_MASK | X86_MXCSR_DAZ }, /** @todo More Denormals. */ /* * Invalids. */ /** @todo Invalids. */ /*23*/ /* FP64_TABLE_D10_PS_INVALIDS */ /** @todo Underflow; Rounding; FZ etc. */ }; #define PASS_s_aValues RT_ELEMENTS(s_aValues), (BS3CPUINSTR4_TEST1_VALUES_T *)s_aValues static BS3CPUINSTR4_TEST1_T const s_aTests16[] = { { bs3CpuInstr4_sqrtpd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_sqrtpd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_XMM1_XMM2_icebp_c16, 255, RM_REG, T_AVX_128, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_XMM1_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_YMM1_YMM2_icebp_c16, 255, RM_REG, T_AVX_256, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_YMM1_FSxBX_icebp_c16, 255, RM_MEM, T_AVX_256, 1, 1, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests32[] = { { bs3CpuInstr4_sqrtpd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_sqrtpd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_XMM1_XMM2_icebp_c32, 255, RM_REG, T_AVX_128, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_XMM1_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_YMM1_YMM2_icebp_c32, 255, RM_REG, T_AVX_256, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_YMM1_FSxBX_icebp_c32, 255, RM_MEM, T_AVX_256, 1, 1, 255, PASS_s_aValues }, }; static BS3CPUINSTR4_TEST1_T const s_aTests64[] = { { bs3CpuInstr4_sqrtpd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_SSE, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_sqrtpd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_XMM1_XMM2_icebp_c64, 255, RM_REG, T_AVX_128, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_XMM1_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_YMM1_YMM2_icebp_c64, 255, RM_REG, T_AVX_256, 1, 1, 2, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_YMM1_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 1, 1, 255, PASS_s_aValues }, { bs3CpuInstr4_sqrtpd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_SSE, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_sqrtpd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_SSE, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_XMM8_XMM9_icebp_c64, 255, RM_REG, T_AVX_128, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_XMM8_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_128, 8, 8, 255, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_YMM8_YMM9_icebp_c64, 255, RM_REG, T_AVX_256, 8, 8, 9, PASS_s_aValues }, { bs3CpuInstr4_vsqrtpd_YMM8_FSxBX_icebp_c64, 255, RM_MEM, T_AVX_256, 8, 8, 255, PASS_s_aValues }, }; #undef PASS_s_aValues static BS3CPUINSTR4_TEST1_MODE_T const s_aTests[3] = BS3CPUINSTR4_TEST1_MODES_INIT(s_aTests16, s_aTests32, s_aTests64); unsigned const iTest = BS3CPUINSTR4_TEST_MODES_INDEX(bMode); return bs3CpuInstr4_WorkerTestType1(bMode, s_aTests[iTest].paTests, s_aTests[iTest].cTests, g_aXcptConfig2, RT_ELEMENTS(g_aXcptConfig2)); } /** * The 32-bit protected mode main function. * * The tests a driven by 32-bit test drivers, even for real-mode tests (though * we'll switch between PE32 and RM for each test step we perform). Given that * we test SSE and AVX here, we don't need to worry about 286 or 8086. * * Some extra steps needs to be taken to properly handle extended state in LM64 * (Bs3ExtCtxRestoreEx & Bs3ExtCtxSaveEx) and when testing real mode * (Bs3RegCtxSaveForMode & Bs3TrapSetJmpAndRestoreWithExtCtxAndRm). */ BS3_DECL(void) Main_pe32() { static const BS3TESTMODEBYONEENTRY g_aTests[] = { #if 1 /*ndef DEBUG_bird*/ # define ALL_TESTS #endif #if defined(ALL_TESTS) { "[v]addps", bs3CpuInstr4_v_addps, 0 }, { "[v]addpd", bs3CpuInstr4_v_addpd, 0 }, { "[v]addss", bs3CpuInstr4_v_addss, 0 }, { "[v]addsd", bs3CpuInstr4_v_addsd, 0 }, { "[v]haddps", bs3CpuInstr4_v_haddps, 0 }, { "[v]haddpd", bs3CpuInstr4_v_haddpd, 0 }, { "[v]subps", bs3CpuInstr4_v_subps, 0 }, { "[v]subpd", bs3CpuInstr4_v_subpd, 0 }, { "[v]subss", bs3CpuInstr4_v_subss, 0 }, { "[v]subsd", bs3CpuInstr4_v_subsd, 0 }, { "[v]hsubps", bs3CpuInstr4_v_hsubps, 0 }, { "[v]hsubpd", bs3CpuInstr4_v_hsubpd, 0 }, { "[v]mulps", bs3CpuInstr4_v_mulps, 0 }, { "[v]mulpd", bs3CpuInstr4_v_mulpd, 0 }, { "[v]mulss", bs3CpuInstr4_v_mulss, 0 }, { "[v]mulsd", bs3CpuInstr4_v_mulsd, 0 }, { "[v]divps", bs3CpuInstr4_v_divps, 0 }, { "[v]divpd", bs3CpuInstr4_v_divpd, 0 }, { "[v]divss", bs3CpuInstr4_v_divss, 0 }, { "[v]divsd", bs3CpuInstr4_v_divsd, 0 }, { "[v]addsubps", bs3CpuInstr4_v_addsubps, 0 }, { "[v]addsubpd", bs3CpuInstr4_v_addsubpd, 0 }, { "[v]maxps", bs3CpuInstr4_v_maxps, 0 }, { "[v]maxpd", bs3CpuInstr4_v_maxpd, 0 }, { "[v]maxss", bs3CpuInstr4_v_maxss, 0 }, { "[v]maxsd", bs3CpuInstr4_v_maxsd, 0 }, { "[v]minps", bs3CpuInstr4_v_minps, 0 }, { "[v]minpd", bs3CpuInstr4_v_minpd, 0 }, { "[v]minss", bs3CpuInstr4_v_minss, 0 }, { "[v]minsd", bs3CpuInstr4_v_minsd, 0 }, { "[v]rcpps", bs3CpuInstr4_v_rcpps, 0 }, { "[v]rcpss", bs3CpuInstr4_v_rcpss, 0 }, { "[v]sqrtps", bs3CpuInstr4_v_sqrtps, 0 }, { "[v]sqrtpd", bs3CpuInstr4_v_sqrtpd, 0 }, #endif }; Bs3TestInit("bs3-cpu-instr-4"); /* * Initialize globals. */ if (g_uBs3CpuDetected & BS3CPU_F_CPUID) { uint32_t fEbx, fEcx, fEdx; ASMCpuIdExSlow(1, 0, 0, 0, NULL, NULL, &fEcx, &fEdx); g_afTypeSupports[T_MMX] = RT_BOOL(fEdx & X86_CPUID_FEATURE_EDX_MMX); g_afTypeSupports[T_MMX_SSE] = RT_BOOL(fEdx & X86_CPUID_FEATURE_EDX_SSE); g_afTypeSupports[T_MMX_SSE2] = RT_BOOL(fEdx & X86_CPUID_FEATURE_EDX_SSE2); g_afTypeSupports[T_MMX_SSSE3] = RT_BOOL(fEdx & X86_CPUID_FEATURE_ECX_SSSE3); g_afTypeSupports[T_SSE] = RT_BOOL(fEdx & X86_CPUID_FEATURE_EDX_SSE); g_afTypeSupports[T_SSE2] = RT_BOOL(fEdx & X86_CPUID_FEATURE_EDX_SSE2); g_afTypeSupports[T_SSE3] = RT_BOOL(fEcx & X86_CPUID_FEATURE_ECX_SSE3); g_afTypeSupports[T_SSSE3] = RT_BOOL(fEcx & X86_CPUID_FEATURE_ECX_SSSE3); g_afTypeSupports[T_SSE4_1] = RT_BOOL(fEcx & X86_CPUID_FEATURE_ECX_SSE4_1); g_afTypeSupports[T_SSE4_2] = RT_BOOL(fEcx & X86_CPUID_FEATURE_ECX_SSE4_2); g_afTypeSupports[T_PCLMUL] = RT_BOOL(fEcx & X86_CPUID_FEATURE_ECX_PCLMUL); g_afTypeSupports[T_AVX_128] = RT_BOOL(fEcx & X86_CPUID_FEATURE_ECX_AVX); g_afTypeSupports[T_AVX_256] = RT_BOOL(fEcx & X86_CPUID_FEATURE_ECX_AVX); g_afTypeSupports[T_AVX_PCLMUL] = RT_BOOL(fEcx & X86_CPUID_FEATURE_ECX_PCLMUL) && RT_BOOL(fEcx & X86_CPUID_FEATURE_ECX_AVX); if (ASMCpuId_EAX(0) >= 7) { ASMCpuIdExSlow(7, 0, 0, 0, NULL, &fEbx, NULL, NULL); g_afTypeSupports[T_AVX2_128] = RT_BOOL(fEbx & X86_CPUID_STEXT_FEATURE_EBX_AVX2); g_afTypeSupports[T_AVX2_256] = RT_BOOL(fEbx & X86_CPUID_STEXT_FEATURE_EBX_AVX2); g_afTypeSupports[T_SHA] = RT_BOOL(fEbx & X86_CPUID_STEXT_FEATURE_EBX_SHA); } if (g_uBs3CpuDetected & BS3CPU_F_CPUID_EXT_LEAVES) { ASMCpuIdExSlow(UINT32_C(0x80000001), 0, 0, 0, NULL, NULL, &fEcx, &fEdx); g_afTypeSupports[T_AXMMX] = RT_BOOL(fEcx & X86_CPUID_AMD_FEATURE_EDX_AXMMX); g_afTypeSupports[T_SSE4A] = RT_BOOL(fEcx & X86_CPUID_AMD_FEATURE_ECX_SSE4A); g_fAmdMisalignedSse = RT_BOOL(fEcx & X86_CPUID_AMD_FEATURE_ECX_MISALNSSE); } g_afTypeSupports[T_AXMMX_OR_SSE] = g_afTypeSupports[T_AXMMX] || g_afTypeSupports[T_SSE]; /* * Figure out FPU save/restore method and support for DAZ bit. */ { /** @todo Add bs3kit API to just get the ext ctx method without needing to * alloc/free a context. Replicating the logic in the bs3kit here, though * doable, runs a risk of not updating this when the other logic is * changed. */ uint64_t fFlags; uint16_t const cbExtCtx = Bs3ExtCtxGetSize(&fFlags); PBS3EXTCTX pExtCtx = Bs3MemAlloc(BS3MEMKIND_TILED, cbExtCtx); if (pExtCtx) { Bs3ExtCtxInit(pExtCtx, cbExtCtx, fFlags); g_enmExtCtxMethod = pExtCtx->enmMethod; if ( ( (g_enmExtCtxMethod == BS3EXTCTXMETHOD_XSAVE && (pExtCtx->Ctx.x.x87.MXCSR_MASK & X86_MXCSR_DAZ))) || ( (g_enmExtCtxMethod == BS3EXTCTXMETHOD_FXSAVE) && (pExtCtx->Ctx.x87.MXCSR_MASK & X86_MXCSR_DAZ))) g_fMxCsrDazSupported = true; } else Bs3TestFailedF("Failed to allocate %u bytes for extended CPU context (tiled addressable)\n", cbExtCtx); } /* * Allocate a buffer for testing. */ g_cbBuf = X86_PAGE_SIZE * 4; g_pbBuf = (uint8_t BS3_FAR *)Bs3MemAlloc(BS3MEMKIND_REAL, g_cbBuf); if (g_pbBuf) { g_pbBufAliasAlloc = (uint8_t BS3_FAR *)Bs3MemAlloc(BS3MEMKIND_TILED, g_cbBuf); if (g_pbBufAliasAlloc) { /* * Poke the PRNG to print the seed before other output. */ (void)bs3CpuInstrX_SimpleRand(); /* * Do the tests. */ Bs3TestDoModesByOne_pe32(g_aTests, RT_ELEMENTS(g_aTests), BS3TESTMODEBYONEENTRY_F_REAL_MODE_READY); #ifdef BS3_SKIPIT_DO_SKIP bs3CpuInstrX_ShowTallies(); #endif } else Bs3TestFailed("Failed to allocate 16K alias buffer (tiled addressable)"); } else Bs3TestFailed("Failed to allocate 16K buffer (real mode addressable)"); } Bs3TestTerm(); }