From 8fd19cda0ea08ae0899c5d2ad732484739ab105e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Franch?= Date: Fri, 2 Oct 2026 06:37:02 +0200 Subject: [PATCH] feat(shader): implement f16 ldexp/frexp/norm/class, v_sat_pk_u8_i16 and v_mul/mac_legacy_f32 v_ldexp_f16, v_frexp_mant_f16, v_frexp_exp_i16_f16, v_cvt_norm_i16/u16_f16, v_cvt_pknorm_i16/u16_f16, v_cmp_class_f16, v_cmpx_class_f16, v_sat_pk_u8_i16 and v_mul/mac_legacy_f32 threw in the decoder. The behaviour was measured on an RDNA2 GPU: ldexp takes the exponent as an i16, the norm conversions round to nearest even (done in integers, as x * 32767 does not fit f32 exactly), and a legacy multiply with a zero operand gives +0 even for an infinite or NaN other operand. v_mac_legacy_f32 adds the rounded product, like v_mac_f32. Co-Authored-By: Claude --- .../tests/execution/Float16Misc.cpp | 393 ++++++++++++++++++ .../include/RdnaDecoder/RdnaOpcode.hpp | 12 + .../recompiler/RdnaDecoder/src/RdnaOpcode.cpp | 12 + .../RdnaDecoder/src/RdnaVectorOpDecoder.cpp | 30 +- .../Translation/TranslationContext.hpp | 9 + .../Translation/src/FloatInstructions.cpp | 119 ++++++ .../Translation/src/VectorInstructions.cpp | 26 ++ 7 files changed, 600 insertions(+), 1 deletion(-) create mode 100644 core/libs/prx/libSceAgcDriver/tests/execution/Float16Misc.cpp diff --git a/core/libs/prx/libSceAgcDriver/tests/execution/Float16Misc.cpp b/core/libs/prx/libSceAgcDriver/tests/execution/Float16Misc.cpp new file mode 100644 index 000000000..bde645947 --- /dev/null +++ b/core/libs/prx/libSceAgcDriver/tests/execution/Float16Misc.cpp @@ -0,0 +1,393 @@ +#include "prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp" +#include "prx/libSceAgcDriver/Graphics/include/Draw.hpp" +#include "Recompiler.hpp" +#include "VulkanTestDevice.hpp" +#include +#include +#include +#include +#include +#include +#include + +namespace { + +using AgcDriver::Graphics::Require; +using ShaderRecompiler::ShaderStage; + +constexpr std::uint32_t Threads = 32; +constexpr std::uint32_t Inputs = 4; +constexpr std::uint32_t Results = 16; +alignas(256) std::array Input{}; +alignas(256) std::array Output{}; + +alignas(256) constexpr std::array MiscCode{ + 0x34020082, 0x34060084, 0xe0302000, 0x80000401, 0xe0302004, 0x80000501, 0xe0302008, 0x80000601, + 0x7e1402ff, 0xabcdabcd, 0x7e1602ff, 0xabcdabcd, 0x7e1802ff, 0xabcdabcd, 0x7e1a02ff, 0xabcdabcd, + 0x7e1c02ff, 0xabcdabcd, 0x7e2402ff, 0xabcdabcd, 0xbf8c3f70, 0x76140b04, 0x7e16b304, 0x7e18b504, + 0x7e1ac704, 0x7e1cc904, 0xd712000f, 0x00020b04, 0xd7130010, 0x00020b04, 0x7d1e0b04, 0xd5010011, + 0x01a90280, 0x7e24c504, 0x0e260b04, 0x7e280306, 0x0c280b04, 0xe0702000, 0x80010a03, 0xe0702004, + 0x80010b03, 0xe0702008, 0x80010c03, 0xe070200c, 0x80010d03, 0xe0702010, 0x80010e03, 0xe0702014, + 0x80010f03, 0xe0702018, 0x80011003, 0xe070201c, 0x80011103, 0xe0702020, 0x80011203, 0xe0702024, + 0x80011303, 0xe0702028, 0x80011403, 0xbf810000, +}; + +struct Vector { + std::uint32_t a, b, c; + std::array expected; +}; + +constexpr Vector Vectors[] = { + {0xfc37bc00u, 0x614fbc00u, 0x781ac78fu, 0xabcd8000u, 0xabcdb800u, 0xabcd0001u, 0xabcd8001u, 0xabcd0000u, 0x80018001u, 0x00000000u, 0x00000000u, 0x00000000u, 0xff800000u, 0xff800000u}, + {0xcac52720u, 0x00000064u, 0x8fe2c3f4u, 0xabcd7c00u, 0xabcd3b20u, 0xabcdfffbu, 0xabcd0390u, 0xabcd0720u, 0x00000390u, 0x00000720u, 0x00000000u, 0x000000ffu, 0x839a0691u, 0x8fe2c3f5u}, + {0x0200c40du, 0x000001e6u, 0x80000000u, 0xabcdfc00u, 0xabcdb80du, 0xabcd0003u, 0xabcd8001u, 0xabcd0000u, 0x00018001u, 0x00020000u, 0x00000000u, 0x0000ff00u, 0x00000000u, 0x00000000u}, + {0x3555dc11u, 0x00000018u, 0x5a66d71au, 0xabcdfc00u, 0xabcdb811u, 0xabcd0009u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x00000000u, 0x5a66d71au}, + {0x0f84fbf2u, 0xffffffd8u, 0xbf800000u, 0xabcd8001u, 0xabcdbbf2u, 0xabcd0010u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0xffffffd8u, 0x7fc00000u}, + {0xfbff8acdu, 0x00000001u, 0x3f800000u, 0xabcd8ecdu, 0xabcdbacdu, 0xabcdfff4u, 0xabcdfff9u, 0xabcd0000u, 0x0000fff9u, 0x00000000u, 0x00000000u, 0x00000000u, 0xb17f8acdu, 0x3f800000u}, + {0x4ca4aaf9u, 0x000003bau, 0x7f800000u, 0xabcdfc00u, 0xabcdbaf9u, 0xabcdfffcu, 0xabcdf907u, 0xabcd0000u, 0x0002f907u, 0x00040000u, 0x00000001u, 0x0000ff00u, 0x07196949u, 0x7f800000u}, + {0x564027cbu, 0xfffffff0u, 0x80000000u, 0xabcd0008u, 0xabcd3bcbu, 0xabcdfffbu, 0xabcd03e5u, 0xabcd07cbu, 0x000003e5u, 0x000007cbu, 0x00000001u, 0x0000ffffu, 0xfffffff0u, 0x7fc00000u}, + {0x0b497e00u, 0x00000003u, 0xbf800000u, 0xabcd7e00u, 0xabcd7e00u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000001u, 0x0000ffffu, 0x00000000u, 0xbf800000u}, + {0x8babb0e6u, 0x25e97c00u, 0x80000000u, 0xabcdfc00u, 0xabcdb8e6u, 0xabcdfffeu, 0xabcdec68u, 0xabcd0000u, 0x7fffec68u, 0xffff0000u, 0x00000000u, 0x00000000u, 0x80000000u, 0x80000000u}, + {0x3f87e362u, 0x80000000u, 0x4475ee53u, 0xabcde362u, 0xabcdbb62u, 0xabcd000au, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x00000000u, 0x4475ee53u}, + {0xfbff7e00u, 0xc0003555u, 0x604b4496u, 0xabcd7e00u, 0xabcd7e00u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x2aa80000u, 0x55500000u, 0x00000000u, 0x000000ffu, 0x7c7fe874u, 0x7c7fe874u}, + {0x006e8000u, 0x00000214u, 0xbf800000u, 0xabcd8000u, 0xabcd8000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00010000u, 0x00020000u, 0x00000000u, 0x00006e00u, 0x00000000u, 0xbf800000u}, + {0x7f800000u, 0x4d0b0d1au, 0x80000000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x000a0000u, 0x00140000u, 0x00000000u, 0x0000ff00u, 0x7f800000u, 0x7f800000u}, + {0x3555e434u, 0x000001b4u, 0x00000000u, 0xabcdfc00u, 0xabcdb834u, 0xabcd000bu, 0xabcd8001u, 0xabcd0000u, 0x00018001u, 0x00020000u, 0x00000000u, 0x0000ff00u, 0x00000000u, 0x00000000u}, + {0x46fdbc00u, 0xffff8000u, 0xce311752u, 0xabcd8000u, 0xabcdb800u, 0xabcd0001u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0xffff8000u, 0x7fc00000u}, + {0x0001bc00u, 0xfbff3c07u, 0x3f800000u, 0xabcdfc00u, 0xabcdb800u, 0xabcd0001u, 0xabcd8001u, 0xabcd0000u, 0x7fff8001u, 0xffff0000u, 0x00000000u, 0x00000100u, 0xb9dd560eu, 0x3f7fe455u}, + {0x10714d51u, 0x7f800001u, 0x80000000u, 0xabcd5151u, 0xabcd3951u, 0xabcd0005u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x7fc00001u, 0x7fc00000u}, + {0x88bc03ffu, 0x0000001bu, 0x3f800000u, 0xabcd6ffeu, 0xabcd3bfeu, 0xabcdfff2u, 0xabcd0002u, 0xabcd0004u, 0x00000002u, 0x00000004u, 0x00000000u, 0x000000ffu, 0x80000000u, 0x3f800000u}, + {0x7f7fffffu, 0xff800000u, 0xbf800000u, 0xabcdffffu, 0xabcdffffu, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0xff800000u, 0xff800000u}, + {0x610591e1u, 0x2e8dfe00u, 0xbf800000u, 0xabcd8000u, 0xabcdb9e1u, 0xabcdfff6u, 0xabcdffe8u, 0xabcd0000u, 0x0000ffe8u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x50142bbfu, 0x50142bbfu}, + {0x4e63fc00u, 0x000002a7u, 0x9f94c755u, 0xabcdfc00u, 0xabcdfc00u, 0xabcd0000u, 0xabcd8001u, 0xabcd0000u, 0x00018001u, 0x00030000u, 0x00000001u, 0x0000ff00u, 0x08972c59u, 0x9f94c755u}, + {0x38007d00u, 0x00000018u, 0x15de2f14u, 0xabcd7f00u, 0xabcd7f00u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x0000ffffu, 0x00000000u, 0x15de2f14u}, + {0xc0000db9u, 0x1e5215ceu, 0x3f800000u, 0xabcd7c00u, 0xabcd39b9u, 0xabcdfff5u, 0xabcd000bu, 0xabcd0017u, 0x002e000bu, 0x005d0017u, 0x00000001u, 0x000000ffu, 0x9ed22c54u, 0x3f800000u}, + {0xca6d6a8au, 0x85c75279u, 0x3f800000u, 0xabcd7c00u, 0xabcd3a8au, 0xabcd000cu, 0xabcd7fffu, 0xabcdffffu, 0x7fff7fffu, 0xffffffffu, 0x00000000u, 0x000000ffu, 0x10b8da4eu, 0x3f800000u}, + {0x56400000u, 0x3b4205e1u, 0xbf800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00030000u, 0x00060000u, 0x00000001u, 0x0000ff00u, 0x52118469u, 0x52118469u}, + {0x546e035au, 0x3f800000u, 0x00000000u, 0xabcd035au, 0xabcd3ab4u, 0xabcdfff2u, 0xabcd0002u, 0xabcd0003u, 0x00000002u, 0x00000003u, 0x00000000u, 0x0000ffffu, 0x546e035au, 0x546e035au}, + {0x8001fbffu, 0xd32e6778u, 0x7f800000u, 0xabcdfc00u, 0xabcdbbffu, 0xabcd0010u, 0xabcd8001u, 0xabcd0000u, 0x7fff8001u, 0xffff0000u, 0x00000001u, 0x00000000u, 0x112d0a52u, 0x7f800000u}, + {0x0001e11bu, 0x0000011au, 0x3f800000u, 0xabcdfc00u, 0xabcdb91bu, 0xabcd000au, 0xabcd8001u, 0xabcd0000u, 0x00018001u, 0x00010000u, 0x00000001u, 0x00000100u, 0x00000000u, 0x3f800000u}, + {0x80019716u, 0x0000037fu, 0x80000000u, 0xabcdfc00u, 0xabcdbb16u, 0xabcdfff7u, 0xabcdffc7u, 0xabcd0000u, 0x0002ffc7u, 0x00030000u, 0x00000001u, 0x00000000u, 0x80000000u, 0x80000000u}, + {0x13272000u, 0x00007fffu, 0x3f800000u, 0xabcd7c00u, 0xabcd3800u, 0xabcdfffau, 0xabcd0100u, 0xabcd0200u, 0x00000100u, 0x00000200u, 0x00000001u, 0x0000ffffu, 0x00000000u, 0x3f800000u}, + {0x32ff74f3u, 0xbc00da74u, 0x7f800000u, 0xabcd0000u, 0xabcd38f3u, 0xabcd000fu, 0xabcd7fffu, 0xabcdffffu, 0x80017fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0xaf809477u, 0x7f800000u}, + {0x77e456b6u, 0xffffffffu, 0x03d61cbfu, 0xabcd52b6u, 0xabcd3ab6u, 0xabcd0007u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000001u, 0x0000ffffu, 0xffffffffu, 0x7fc00000u}, + {0x0390171eu, 0x0000010eu, 0x80000000u, 0xabcd7c00u, 0xabcd3b1eu, 0xabcdfff7u, 0xabcd0039u, 0xabcd0072u, 0x00010039u, 0x00010072u, 0x00000001u, 0x0000ffffu, 0x00000000u, 0x00000000u}, + {0x479d0cdau, 0x7f800001u, 0x00000000u, 0xabcd10dau, 0xabcd38dau, 0xabcdfff5u, 0xabcd000au, 0xabcd0013u, 0x0000000au, 0x00000013u, 0x00000000u, 0x0000ffffu, 0x7fc00001u, 0x7fc00000u}, + {0x0577aea9u, 0x7f800001u, 0x3f800000u, 0xabcdb2a9u, 0xabcdbaa9u, 0xabcdfffdu, 0xabcdf2aeu, 0xabcd0000u, 0x0000f2aeu, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x7fc00001u, 0x7fc00000u}, + {0x348803ffu, 0xffffffffu, 0x7f800000u, 0xabcd0200u, 0xabcd3bfeu, 0xabcdfff2u, 0xabcd0002u, 0xabcd0004u, 0x00000002u, 0x00000004u, 0x00000001u, 0x0000ffffu, 0xffffffffu, 0x7fc00000u}, + {0x355587d2u, 0x00000064u, 0x7f800000u, 0xabcdfc00u, 0xabcdbbd2u, 0xabcdfff3u, 0xabcdfffcu, 0xabcd0000u, 0x0000fffcu, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x00000000u, 0x7f800000u}, + {0xa6a28001u, 0x370b8d24u, 0x80000000u, 0xabcd8000u, 0xabcdb800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0xfff60000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x9e312a30u, 0x9e312a30u}, + {0x7d00bc00u, 0x00000198u, 0xbf800000u, 0xabcdfc00u, 0xabcdb800u, 0xabcd0001u, 0xabcd8001u, 0xabcd0000u, 0x00018001u, 0x00020000u, 0x00000001u, 0x0000ff00u, 0x36cd2ba0u, 0xbf7fff99u}, + {0x00000001u, 0x7fc00000u, 0x80000000u, 0xabcd0001u, 0xabcd3800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000001u, 0x7fc00000u, 0x7fc00000u}, + {0x80010001u, 0x8e6e5f65u, 0xbf800000u, 0xabcd7c00u, 0xabcd3800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x7fff0000u, 0xffff0000u, 0x00000000u, 0x00000001u, 0x00000000u, 0xbf800000u}, + {0xc6de7bffu, 0x0000ffffu, 0x7f800000u, 0xabcd77ffu, 0xabcd3bffu, 0xabcd0010u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000001u, 0x000000ffu, 0x845e7b21u, 0x7f800000u}, + {0x80013800u, 0x00000007u, 0x7f800000u, 0xabcd5400u, 0xabcd3800u, 0xabcd0000u, 0xabcd4000u, 0xabcd8000u, 0x00004000u, 0x00008000u, 0x00000000u, 0x000000ffu, 0x80000000u, 0x7f800000u}, + {0x5aaad556u, 0xffffffffu, 0xe4217251u, 0xabcdd156u, 0xabcdb956u, 0xabcd0007u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0xffffffffu, 0x7fc00000u}, + {0xfbff7bffu, 0x00000001u, 0x00000000u, 0xabcd7c00u, 0xabcd3bffu, 0xabcd0010u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x000000ffu, 0xb17f7bffu, 0xb17f7bffu}, + {0x2434a678u, 0x4f6b58c8u, 0x7f800000u, 0xabcdfc00u, 0xabcdba78u, 0xabcdfffbu, 0xabcdfcc4u, 0xabcd0000u, 0x7ffffcc4u, 0xffff0000u, 0x00000001u, 0x0000ff00u, 0x34261377u, 0x7f800000u}, + {0x7f7fffffu, 0x7630a8a7u, 0xc9bf34cau, 0xabcdffffu, 0xabcdffffu, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xfb590000u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x7f800000u, 0x7f800000u}, + {0x5640d11fu, 0xfe003800u, 0x3f800000u, 0xabcdfc00u, 0xabcdb91fu, 0xabcd0006u, 0xabcd8001u, 0xabcd0000u, 0x40008001u, 0x80000000u, 0x00000000u, 0x0000ff00u, 0xff800000u, 0xff800000u}, + {0xe27738d7u, 0xfc000000u, 0xbf800000u, 0xabcd38d7u, 0xabcd38d7u, 0xabcd0000u, 0xabcd4d6fu, 0xabcd9adfu, 0x00004d6fu, 0x00009adfu, 0x00000000u, 0x000000ffu, 0x7f800000u, 0x7f800000u}, + {0x80000000u, 0x00000001u, 0x80000000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u}, + {0xd494d042u, 0xffffff9cu, 0x00000000u, 0xabcd8000u, 0xabcdb842u, 0xabcd0006u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000001u, 0x00000000u, 0xffffff9cu, 0x7fc00000u}, + {0x5e0a7f07u, 0x000003b2u, 0xbf800000u, 0xabcd7f07u, 0xabcd7f07u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00020000u, 0x00040000u, 0x00000001u, 0x0000ffffu, 0x187fe4b4u, 0xbf800000u}, + {0x00800000u, 0xf2a9dc8au, 0x00000000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x80010000u, 0x00000000u, 0x00000000u, 0x00008000u, 0xb3a9dc8au, 0xb3a9dc8au}, + {0xfc000001u, 0x000003ffu, 0x00000000u, 0xabcd7c00u, 0xabcd3800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x00020000u, 0x00040000u, 0x00000001u, 0x00000001u, 0xb67fc002u, 0xb67fc002u}, + {0x20da0200u, 0x9679c7bfu, 0xbf800000u, 0xabcd0000u, 0xabcd3800u, 0xabcdfff2u, 0xabcd0001u, 0xabcd0002u, 0x80010001u, 0x00000002u, 0x00000001u, 0x0000ffffu, 0x80000035u, 0xbf800000u}, + {0x46422000u, 0x17ea7bffu, 0x80000000u, 0xabcd7c00u, 0xabcd3800u, 0xabcdfffau, 0xabcd0100u, 0xabcd0200u, 0x7fff0100u, 0xffff0200u, 0x00000001u, 0x0000ffffu, 0x1eb1cf47u, 0x1eb1cf47u}, + {0x7ba2a454u, 0x000000fau, 0xbf800000u, 0xabcdfc00u, 0xabcdb854u, 0xabcdfffbu, 0xabcdfdd6u, 0xabcd0000u, 0x0000fdd6u, 0x00010000u, 0x00000001u, 0x0000ff00u, 0x351ed47au, 0xbf7ffff6u}, + {0x4c24a053u, 0x00000000u, 0x00000000u, 0xabcda053u, 0xabcdb853u, 0xabcdfffau, 0xabcdfeebu, 0xabcd0000u, 0x0000feebu, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x00000000u, 0x00000000u}, + {0x51be5005u, 0xfc00dc5bu, 0xbf800000u, 0xabcd0000u, 0xabcd3805u, 0xabcd0006u, 0xabcd7fffu, 0xabcdffffu, 0x80017fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0xff800000u, 0xff800000u}, + {0x1b2e7c00u, 0x1f5d9946u, 0x80000000u, 0xabcd7c00u, 0xabcd7c00u, 0xabcd0000u, 0xabcd7fffu, 0xabcdffffu, 0xffac7fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x000012e1u, 0x000012e1u}, + {0xff800000u, 0x00000000u, 0xbf800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0xbf800000u}, + {0x6e510000u, 0xc38c3800u, 0xbf800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x40000000u, 0x80000000u, 0x00000000u, 0x0000ff00u, 0xf264f370u, 0xf264f370u}, + {0x00000001u, 0xc3affcfeu, 0x7f800000u, 0xabcd0000u, 0xabcd3800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000001u, 0x00000001u, 0x80000160u, 0x7f800000u}, + {0x03ffba37u, 0x53367213u, 0x997f7df0u, 0xabcdfc00u, 0xabcdba37u, 0xabcd0000u, 0xabcd9c91u, 0xabcd0000u, 0x7fff9c91u, 0xffff0000u, 0x00000000u, 0x0000ff00u, 0x17b64057u, 0x9968b5e5u}, + {0x5238c183u, 0x16e68000u, 0x80000000u, 0xabcd8000u, 0xabcdb983u, 0xabcd0002u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x29a65a3cu, 0x29a65a3cu}, + {0x1e5ea74eu, 0x000000b6u, 0x3f800000u, 0xabcdfc00u, 0xabcdbb4eu, 0xabcdfffbu, 0xabcdfc59u, 0xabcd0000u, 0x0000fc59u, 0x00010000u, 0x00000000u, 0x0000ff00u, 0x00000000u, 0x3f800000u}, + {0x7f800000u, 0x390239d9u, 0x77cc40dau, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x5d8f0000u, 0xbb1f0000u, 0x00000001u, 0x0000ff00u, 0x7f800000u, 0x7f800000u}, + {0x56405640u, 0x00000001u, 0xbf800000u, 0xabcd5a40u, 0xabcd3a40u, 0xabcd0007u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x0bc05640u, 0xbf800000u}, + {0x7c00fe00u, 0x000003c4u, 0x3f800000u, 0xabcdfe00u, 0xabcdfe00u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00020000u, 0x00040000u, 0x00000000u, 0x0000ff00u, 0x3672de3cu, 0x3f80001eu}, + {0x03ffbc00u, 0x7e00ea2cu, 0xbf800000u, 0xabcd8000u, 0xabcdb800u, 0xabcd0001u, 0xabcd8001u, 0xabcd0000u, 0x80018001u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x4280c7eeu, 0x427d8fdcu}, + {0x636f8eaau, 0x548c1cf8u, 0xbf800000u, 0xabcdfc00u, 0xabcdbaaau, 0xabcdfff5u, 0xabcdfff3u, 0xabcd0000u, 0x009ffff3u, 0x013e0000u, 0x00000001u, 0x0000ff00u, 0x78831d21u, 0x78831d21u}, + {0x13078000u, 0x000003c7u, 0x6b379413u, 0xabcd8000u, 0xabcd8000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00020000u, 0x00040000u, 0x00000000u, 0x0000ff00u, 0x00000000u, 0x6b379413u}, + {0x409e3c00u, 0x143a446fu, 0x80000000u, 0xabcd7c00u, 0xabcd3800u, 0xabcd0001u, 0xabcd7fffu, 0xabcdffffu, 0x7fff7fffu, 0xffffffffu, 0x00000000u, 0x0000ffffu, 0x156643c9u, 0x156643c9u}, + {0xbc00fc00u, 0x000003f5u, 0x3f800000u, 0xabcdfc00u, 0xabcdfc00u, 0xabcd0000u, 0xabcd8001u, 0xabcd0000u, 0x00028001u, 0x00040000u, 0x00000001u, 0x00000000u, 0x80000008u, 0x3f800000u}, + {0x538d658eu, 0x0000001eu, 0xa2d92973u, 0xabcd7c00u, 0xabcd398eu, 0xabcd000bu, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x0b848f35u, 0xa2d92973u}, + {0x7fc00000u, 0x7fc00000u, 0x00000000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x7fc00000u, 0x7fc00000u}, + {0x00016875u, 0xc8d00001u, 0x00000000u, 0xabcd6c75u, 0xabcd3875u, 0xabcd000cu, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x000001ffu, 0x86926f89u, 0x86926f89u}, + {0x02007bffu, 0x12ef7e00u, 0xaebe1773u, 0xabcd7c00u, 0xabcd3bffu, 0xabcd0010u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x00000000u, 0xaebe1773u}, + {0x7bff0000u, 0x000001a9u, 0x3f800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00010000u, 0x00020000u, 0x00000000u, 0x0000ff00u, 0x35d3ab80u, 0x3f80000du}, + {0x8d49fe3fu, 0xbf800000u, 0x00000000u, 0xabcdfe3fu, 0xabcdfe3fu, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x0d49fe3fu, 0x0d49fe3fu}, + {0x82c57c00u, 0xfc005640u, 0xbf800000u, 0xabcd7c00u, 0xabcd7c00u, 0xabcd0000u, 0xabcd7fffu, 0xabcdffffu, 0x7fff7fffu, 0xffffffffu, 0x00000001u, 0x000000ffu, 0x3f460112u, 0xbe67fbb8u}, + {0x03fff3abu, 0x8164fc00u, 0x80000000u, 0xabcd8000u, 0xabcdbbabu, 0xabcd000eu, 0xabcd8001u, 0xabcd0000u, 0x80018001u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x80000000u, 0x80000000u}, + {0x80000000u, 0xcbbed980u, 0x80000000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x80010000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u}, + {0x7f7fffffu, 0xff800000u, 0xbf800000u, 0xabcdffffu, 0xabcdffffu, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0xff800000u, 0xff800000u}, + {0xbf800000u, 0x9c3de1b0u, 0x80000000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x80010000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x1c3de1b0u, 0x1c3de1b0u}, + {0x3c0070aau, 0xfffffff1u, 0x00000000u, 0xabcd34aau, 0xabcd38aau, 0xabcd000eu, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000001u, 0x0000ffffu, 0xfffffff1u, 0x7fc00000u}, + {0x470889a3u, 0x34040001u, 0xdc97b77eu, 0xabcd8da3u, 0xabcdb9a3u, 0xabcdfff4u, 0xabcdfffau, 0xabcd0000u, 0x0000fffau, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x3b8ccdf1u, 0xdc97b77eu}, + {0x85e3ade5u, 0xd28fcf68u, 0x3f800000u, 0xabcd8000u, 0xabcdb9e5u, 0xabcdfffdu, 0xabcdf436u, 0xabcd0000u, 0x8001f436u, 0x00000000u, 0x00000001u, 0x00000000u, 0x18ffcd32u, 0x3f800000u}, + {0xfe000000u, 0x800003ffu, 0x7f800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00020000u, 0x00040000u, 0x00000001u, 0x00000000u, 0x387fc000u, 0x7f800000u}, + {0x7d0053c9u, 0x00000008u, 0x80000000u, 0xabcd73c9u, 0xabcd3bc9u, 0xabcd0006u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x340053c9u, 0x340053c9u}, + {0x005f0000u, 0x00000309u, 0xbf800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00020000u, 0x00030000u, 0x00000000u, 0x00005f00u, 0x00000000u, 0xbf800000u}, + {0xbc406498u, 0x00017d00u, 0xbf800000u, 0xabcd7c00u, 0xabcd3898u, 0xabcd000bu, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000001u, 0x000000ffu, 0x80000479u, 0xbf800000u}, + {0x7f800000u, 0x00000001u, 0x7f800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x7f800000u, 0x7f800000u}, + {0x3ff68e52u, 0x0000000fu, 0x3f800000u, 0xabcdca52u, 0xabcdba52u, 0xabcdfff5u, 0xabcdfff3u, 0xabcd0000u, 0x0000fff3u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x0000001du, 0x3f800000u}, + {0xcb7b0b3au, 0x00000001u, 0x3f800000u, 0xabcd0f3au, 0xabcd3b3au, 0xabcdfff4u, 0xabcd0007u, 0xabcd000eu, 0x00000007u, 0x0000000eu, 0x00000000u, 0x000000ffu, 0x80fb0b3au, 0x3f800000u}, + {0xb297fbffu, 0x0000016fu, 0xbf800000u, 0xabcdfc00u, 0xabcdbbffu, 0xabcd0010u, 0xabcd8001u, 0xabcd0000u, 0x00018001u, 0x00010000u, 0x00000001u, 0x00000000u, 0x80000000u, 0xbf800000u}, + {0x5b58edc8u, 0x00000018u, 0x3f800000u, 0xabcdfc00u, 0xabcdb9c8u, 0xabcd000du, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x1322b256u, 0x3f800000u}, + {0x0c538001u, 0xffffffd8u, 0x3f800000u, 0xabcd8000u, 0xabcdb800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0xffffffd8u, 0x7fc00000u}, + {0xe2717e00u, 0xfc00fc00u, 0x7f800000u, 0xabcd7e00u, 0xabcd7e00u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x80010000u, 0x00000000u, 0x00000000u, 0x000000ffu, 0x7f800000u, 0x7f800000u}, + {0x8001fbffu, 0xffffffffu, 0x80000000u, 0xabcdf7ffu, 0xabcdbbffu, 0xabcd0010u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000001u, 0x00000000u, 0xffffffffu, 0x7fc00000u}, + {0x9b792afau, 0x2837f418u, 0xbf800000u, 0xabcd0000u, 0xabcd3afau, 0xabcdfffcu, 0xabcd06fau, 0xabcd0df4u, 0x800106fau, 0x00000df4u, 0x00000000u, 0x000000ffu, 0x84330b4du, 0xbf800000u}, + {0x7fc00000u, 0xa005f5e1u, 0x00000000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x80010000u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x7fc00000u, 0x7fc00000u}, + {0x2f542000u, 0x0000017bu, 0x80000000u, 0xabcd7c00u, 0xabcd3800u, 0xabcdfffau, 0xabcd0100u, 0xabcd0200u, 0x00010100u, 0x00010200u, 0x00000001u, 0x0000ffffu, 0x00000000u, 0x00000000u}, + {0x9072bc00u, 0x00000001u, 0x512d126eu, 0xabcdc000u, 0xabcdb800u, 0xabcd0001u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000000u, 0x00000000u, 0x80000000u, 0x512d126eu}, + {0xddecc40bu, 0x929d674du, 0x80000000u, 0xabcdfc00u, 0xabcdb80bu, 0xabcd0003u, 0xabcd8001u, 0xabcd0000u, 0x7fff8001u, 0xffff0000u, 0x00000001u, 0x00000000u, 0x311193c5u, 0x311193c5u}, + {0x8001ecc8u, 0x0000001eu, 0x9621a9d3u, 0xabcdfc00u, 0xabcdb8c8u, 0xabcd000du, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000001u, 0x00000000u, 0x80000000u, 0x9621a9d3u}, + {0xebbb0c9eu, 0xffffffe8u, 0x00000000u, 0xabcd0000u, 0xabcd389eu, 0xabcdfff5u, 0xabcd0009u, 0xabcd0012u, 0x00000009u, 0x00000012u, 0x00000001u, 0x000000ffu, 0xffffffe8u, 0x7fc00000u}, + {0x07693555u, 0xd53ae4b1u, 0x661ce41cu, 0xabcd0000u, 0xabcd3955u, 0xabcdffffu, 0xabcd2aa8u, 0xabcd5550u, 0x80012aa8u, 0x00005550u, 0x00000000u, 0x0000ffffu, 0x9d2a4114u, 0x661ce41cu}, + {0x46237c00u, 0x00000028u, 0xbf800000u, 0xabcd7c00u, 0xabcd7c00u, 0xabcd0000u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x000662d8u, 0xbf800000u}, + {0x80000000u, 0x00000001u, 0x7f800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x7f800000u}, + {0x36ddc000u, 0x00000018u, 0xbf800000u, 0xabcdfc00u, 0xabcdb800u, 0xabcd0002u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x00000000u, 0xbf800000u}, + {0xf3c242dau, 0x35554c7du, 0x00000000u, 0xabcd7c00u, 0xabcd3adau, 0xabcd0002u, 0xabcd7fffu, 0xabcdffffu, 0x7fff7fffu, 0xffffffffu, 0x00000000u, 0x000000ffu, 0xe9a1dbaau, 0xe9a1dbaau}, + {0xb8a60402u, 0x3f800000u, 0x00000000u, 0xabcd0402u, 0xabcd3802u, 0xabcdfff3u, 0xabcd0002u, 0xabcd0004u, 0x00000002u, 0x00000004u, 0x00000000u, 0x000000ffu, 0xb8a60402u, 0xb8a60402u}, + {0x3c009ee3u, 0x87a3de14u, 0xbf800000u, 0xabcd8000u, 0xabcdbae3u, 0xabcdfff9u, 0xabcdff24u, 0xabcd0000u, 0x8001ff24u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x8424a97du, 0xbf800000u}, + {0x7f800000u, 0xbf800000u, 0x9bd2d202u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0xff800000u, 0xff800000u}, + {0x98ab74b7u, 0xfed76f04u, 0x7f800000u, 0xabcd7c00u, 0xabcd38b7u, 0xabcd000fu, 0xabcd7fffu, 0xabcdffffu, 0x7fff7fffu, 0xffffffffu, 0x00000001u, 0x000000ffu, 0x58104960u, 0x7f800000u}, + {0x20001f87u, 0x417b600cu, 0x7f800000u, 0xabcd7c00u, 0xabcd3b87u, 0xabcdfff9u, 0xabcd00f1u, 0xabcd01e2u, 0x7fff00f1u, 0xffff01e2u, 0x00000000u, 0x0000ffffu, 0x21fb9df6u, 0x7f800000u}, + {0x80000000u, 0x7f6bd3c6u, 0xbf800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x80010000u, 0x00000000u, 0x00000001u, 0x00000000u, 0x00000000u, 0xbf800000u}, + {0x78230400u, 0xfe00de92u, 0x80000000u, 0xabcd0000u, 0xabcd3800u, 0xabcdfff3u, 0xabcd0002u, 0xabcd0004u, 0x80010002u, 0x00000004u, 0x00000000u, 0x0000ffffu, 0xff800000u, 0xff800000u}, + {0x8ff50701u, 0x00800000u, 0xa076e64bu, 0xabcd0701u, 0xabcd3b01u, 0xabcdfff3u, 0xabcd0004u, 0xabcd0007u, 0x00000004u, 0x00000007u, 0x00000000u, 0x000000ffu, 0x80000000u, 0xa076e64bu}, + {0x9ea854fcu, 0xb746b776u, 0xb247801du, 0xabcd0000u, 0xabcd38fcu, 0xabcd0007u, 0xabcd7fffu, 0xabcdffffu, 0xc4507fffu, 0x0000ffffu, 0x00000001u, 0x000000ffu, 0x1682aa5du, 0xb247801du}, + {0xf6e5203cu, 0x8c357321u, 0x98a7a86fu, 0xabcd7c00u, 0xabcd383cu, 0xabcdfffau, 0xabcd010fu, 0xabcd021eu, 0x7fff010fu, 0xffff021eu, 0x00000001u, 0x000000ffu, 0x43a266d5u, 0x43a266d5u}, + {0xd6642fe8u, 0x1f8b4af1u, 0x80000000u, 0xabcd7c00u, 0xabcd3be8u, 0xabcdfffdu, 0xabcd0fd0u, 0xabcd1fa0u, 0x7fff0fd0u, 0xffff1fa0u, 0x00000000u, 0x000000ffu, 0xb678519fu, 0xb678519fu}, + {0xc0007354u, 0xffff8000u, 0x0a1afaeau, 0xabcd0000u, 0xabcd3b54u, 0xabcd000eu, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x000000ffu, 0xffff8000u, 0x7fc00000u}, + {0xfc00e1f8u, 0x00000064u, 0xbf800000u, 0xabcdfc00u, 0xabcdb9f8u, 0xabcd000au, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000000u, 0x00000000u, 0xb4c96114u, 0xbf800003u}, + {0x564037a3u, 0x0000001eu, 0x80000000u, 0xabcd7c00u, 0xabcd3ba3u, 0xabcdffffu, 0xabcd3d18u, 0xabcd7a30u, 0x00003d18u, 0x00007a30u, 0x00000000u, 0x0000ffffu, 0x0e343429u, 0x0e343429u}, + {0x7e00ed2eu, 0x000003d3u, 0x19f2d5ffu, 0xabcdfc00u, 0xabcdb92eu, 0xabcd000du, 0xabcd8001u, 0xabcd0000u, 0x00028001u, 0x00040000u, 0x00000000u, 0x0000ff00u, 0x38768583u, 0x38768583u}, + {0x3800214cu, 0x27a17d00u, 0x00000000u, 0xabcd7c00u, 0xabcd394cu, 0xabcdfffau, 0xabcd0153u, 0xabcd02a6u, 0x00000153u, 0x000002a6u, 0x00000001u, 0x0000ffffu, 0x2021a702u, 0x2021a702u}, + {0x00000001u, 0x00000000u, 0x00000000u, 0xabcd0001u, 0xabcd3800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000001u, 0x00000000u, 0x00000000u}, + {0x000195eau, 0x02003555u, 0xea015583u, 0xabcdfc00u, 0xabcdb9eau, 0xabcdfff7u, 0xabcdffd1u, 0xabcd0000u, 0x2aa8ffd1u, 0x55500000u, 0x00000000u, 0x00000100u, 0x00000000u, 0xea015583u}, + {0x515a0001u, 0x000001f1u, 0x3f800000u, 0xabcd7c00u, 0xabcd3800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x00010000u, 0x00020000u, 0x00000001u, 0x0000ff01u, 0x0b539d01u, 0x3f800000u}, + {0xbc00fbffu, 0x7c00a40du, 0x80000000u, 0xabcd8000u, 0xabcdbbffu, 0xabcd0010u, 0xabcd8001u, 0xabcd0000u, 0xfdfa8001u, 0x00000000u, 0x00000001u, 0x00000000u, 0xf881a14fu, 0xf881a14fu}, + {0x3800d5e1u, 0x00000181u, 0x3f800000u, 0xabcdfc00u, 0xabcdb9e1u, 0xabcd0007u, 0xabcd8001u, 0xabcd0000u, 0x00018001u, 0x00020000u, 0x00000000u, 0x0000ff00u, 0x00000000u, 0x3f800000u}, + {0x01b0fe00u, 0xffff8000u, 0x8fe5e1abu, 0xabcdfe00u, 0xabcdfe00u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0xffff8000u, 0x7fc00000u}, + {0x69c965bfu, 0x7c008ebcu, 0x3f800000u, 0xabcd0000u, 0xabcd39bfu, 0xabcd000bu, 0xabcd7fffu, 0xabcdffffu, 0xfff37fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x7f800000u, 0x7f800000u}, + {0x7bff7bd7u, 0x0000024fu, 0xbf800000u, 0xabcd7c00u, 0xabcd3bd7u, 0xabcd0010u, 0xabcd7fffu, 0xabcdffffu, 0x00017fffu, 0x0002ffffu, 0x00000000u, 0x0000ffffu, 0x361373b9u, 0xbf7fffdbu}, + {0xfc005640u, 0xffffffd8u, 0x3f800000u, 0xabcd0000u, 0xabcd3a40u, 0xabcd0007u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000001u, 0x000000ffu, 0xffffffd8u, 0x7fc00000u}, + {0x0200c000u, 0x000003b8u, 0xbf800000u, 0xabcdfc00u, 0xabcdb800u, 0xabcd0002u, 0xabcd8001u, 0xabcd0000u, 0x00028001u, 0x00040000u, 0x00000001u, 0x0000ff00u, 0x00000000u, 0xbf800000u}, + {0xff800000u, 0xff800000u, 0x90fb2d7du, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x7f800000u, 0x7f800000u}, + {0x711dbc00u, 0x7bff7e00u, 0x00000000u, 0xabcdfc00u, 0xabcdb800u, 0xabcd0001u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x7f800000u, 0x7f800000u}, + {0x3800fe00u, 0xffffffd8u, 0x7f800000u, 0xabcdfe00u, 0xabcdfe00u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0xffffffd8u, 0x7fc00000u}, + {0xfe000001u, 0x20005640u, 0x00000000u, 0xabcd7c00u, 0xabcd3800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x7fff0000u, 0xffff0000u, 0x00000000u, 0x00000001u, 0xde805641u, 0xde805641u}, + {0xff800000u, 0xbf800000u, 0x00000000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x7f800000u, 0x7f800000u}, + {0x7d00c1b6u, 0xfffffff0u, 0xbf800000u, 0xabcd82dbu, 0xabcdb9b6u, 0xabcd0002u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0xfffffff0u, 0x7fc00000u}, + {0x30958af0u, 0x59008e44u, 0x93484239u, 0xabcd8000u, 0xabcdbaf0u, 0xabcdfff4u, 0xabcdfff9u, 0xabcd0000u, 0xfff3fff9u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x4a163126u, 0x4a163126u}, + {0xe200b3dau, 0x81330400u, 0xbf800000u, 0xabcdfc00u, 0xabcdbbdau, 0xabcdfffeu, 0xabcde098u, 0xabcd0000u, 0x0002e098u, 0x00040000u, 0x00000000u, 0x00000000u, 0x23b3ff88u, 0xbf800000u}, + {0xfc007e00u, 0xc000fbffu, 0x00000000u, 0xabcd7e00u, 0xabcd7e00u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x80010000u, 0x00000000u, 0x00000001u, 0x000000ffu, 0x7c817af7u, 0x7c817af7u}, + {0x2160446eu, 0x7b1dbca3u, 0x039e0d8bu, 0xabcd0000u, 0xabcd386eu, 0xabcd0003u, 0xabcd7fffu, 0xabcdffffu, 0x80017fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x5d0a2f39u, 0x5d0a2f39u}, + {0xc0007ce4u, 0xfffffff0u, 0x7f800000u, 0xabcd7ee4u, 0xabcd7ee4u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x000000ffu, 0xfffffff0u, 0x7fc00000u}, + {0x02000200u, 0x20008001u, 0x978b6641u, 0xabcd0000u, 0xabcd3800u, 0xabcdfff2u, 0xabcd0001u, 0xabcd0002u, 0x00000001u, 0x00000002u, 0x00000000u, 0x0000ffffu, 0x00000000u, 0x978b6641u}, + {0x9b085640u, 0x00000244u, 0x80000000u, 0xabcd7c00u, 0xabcd3a40u, 0xabcd0007u, 0xabcd7fffu, 0xabcdffffu, 0x00017fffu, 0x0002ffffu, 0x00000000u, 0x000000ffu, 0x80000000u, 0x80000000u}, + {0x5640fc52u, 0x00007fffu, 0xbf800000u, 0xabcdfe52u, 0xabcdfe52u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x1340fad0u, 0xbf800000u}, + {0xcbe62000u, 0x00000010u, 0x00000000u, 0xabcd6000u, 0xabcd3800u, 0xabcdfffau, 0xabcd0100u, 0xabcd0200u, 0x00000100u, 0x00000200u, 0x00000000u, 0x000000ffu, 0x83662000u, 0x83662000u}, + {0xd3432000u, 0x25f41cd4u, 0x153a8e30u, 0xabcd7c00u, 0xabcd3800u, 0xabcdfffau, 0xabcd0100u, 0xabcd0200u, 0x009a0100u, 0x01350200u, 0x00000000u, 0x000000ffu, 0xb9ba1079u, 0xb9ba1079u}, + {0x20008001u, 0x0000000fu, 0x80000000u, 0xabcd9800u, 0xabcdb800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x00000000u, 0x00000000u}, + {0x3c0035b8u, 0x51b3cd25u, 0x80000000u, 0xabcd0000u, 0xabcd39b8u, 0xabcdffffu, 0xabcd2dc0u, 0xabcd5b80u, 0x80012dc0u, 0x00005b80u, 0x00000001u, 0x0000ffffu, 0x4e34189au, 0x4e34189au}, + {0xabcec90fu, 0x7f800000u, 0x00000000u, 0xabcdc90fu, 0xabcdb90fu, 0xabcd0004u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000000u, 0x00000000u, 0xff800000u, 0xff800000u}, + {0x141b9098u, 0xc1785e77u, 0x00000000u, 0xabcdfc00u, 0xabcdb898u, 0xabcdfff6u, 0xabcdffeeu, 0xabcd0000u, 0x7fffffeeu, 0xffff0000u, 0x00000000u, 0x0000ff00u, 0x9616ed7bu, 0x9616ed7bu}, + {0xc4380200u, 0x24cabc00u, 0x026348f7u, 0xabcd0000u, 0xabcd3800u, 0xabcdfff2u, 0xabcd0001u, 0xabcd0002u, 0x80010001u, 0x00000002u, 0x00000000u, 0x000000ffu, 0xa991b8b5u, 0xa991b8b5u}, + {0x80010000u, 0x00000028u, 0x00000000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x80000000u, 0x00000000u}, + {0x7c000400u, 0x67db209cu, 0x00000000u, 0xabcd7c00u, 0xabcd3800u, 0xabcdfff3u, 0xabcd0002u, 0xabcd0004u, 0x01270002u, 0x024e0004u, 0x00000000u, 0x0000ffffu, 0x7f800000u, 0x7f800000u}, + {0x32175640u, 0x0200fbffu, 0x00000000u, 0xabcd0000u, 0xabcd3a40u, 0xabcd0007u, 0xabcd7fffu, 0xabcdffffu, 0x80017fffu, 0x0000ffffu, 0x00000001u, 0x0000ffffu, 0x00000001u, 0x00000001u}, + {0xd21c0037u, 0xdd9d1c15u, 0xbf800000u, 0xabcd7c00u, 0xabcd3ae0u, 0xabcdffeeu, 0xabcd0000u, 0xabcd0000u, 0x00830000u, 0x01050000u, 0x00000000u, 0x00000037u, 0x703f7a7du, 0x703f7a7du}, + {0x88f78000u, 0xfe007807u, 0x3f800000u, 0xabcd8000u, 0xabcd8000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x7fff0000u, 0xffff0000u, 0x00000000u, 0x00000000u, 0x47786816u, 0x47786916u}, + {0xbfda55c9u, 0x7f7fffffu, 0x7f800000u, 0xabcd51c9u, 0xabcd39c9u, 0xabcd0007u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000001u, 0x000000ffu, 0xff800000u, 0x7fc00000u}, + {0x5ea926b0u, 0x00000010u, 0xbf800000u, 0xabcd66b0u, 0xabcd3ab0u, 0xabcdfffbu, 0xabcd0358u, 0xabcd06b0u, 0x00000358u, 0x000006b0u, 0x00000000u, 0x0000ffffu, 0x162926b0u, 0xbf800000u}, + {0x40000a80u, 0x9c48f4c8u, 0xbbca6b41u, 0xabcd0000u, 0xabcd3a80u, 0xabcdfff4u, 0xabcd0006u, 0xabcd000du, 0x80010006u, 0x0000000du, 0x00000000u, 0x0000ffffu, 0x9cc90544u, 0xbbca6b41u}, + {0x56400001u, 0xfffffff0u, 0x00000000u, 0xabcd0000u, 0xabcd3800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000001u, 0x0000ff01u, 0xfffffff0u, 0x7fc00000u}, + {0x1bc22daeu, 0xfffffff1u, 0x5da9e5c9u, 0xabcd002du, 0xabcd39aeu, 0xabcdfffdu, 0xabcd0b5cu, 0xabcd16b8u, 0x00000b5cu, 0x000016b8u, 0x00000001u, 0x0000ffffu, 0xfffffff1u, 0x7fc00000u}, + {0x00d811f2u, 0x00000189u, 0xb6ab58cau, 0xabcd7c00u, 0xabcd39f2u, 0xabcdfff6u, 0xabcd0018u, 0xabcd0030u, 0x00010018u, 0x00020030u, 0x00000001u, 0x0000d8ffu, 0x00000000u, 0xb6ab58cau}, + {0xf7716700u, 0x097ba119u, 0x80000000u, 0xabcd0000u, 0xabcd3b00u, 0xabcd000bu, 0xabcd7fffu, 0xabcdffffu, 0xfeba7fffu, 0x0000ffffu, 0x00000001u, 0x000000ffu, 0xc16d47e6u, 0xc16d47e6u}, + {0x09a18b34u, 0xb79a566bu, 0x00000000u, 0xabcdfc00u, 0xabcdbb34u, 0xabcdfff4u, 0xabcdfff9u, 0xabcd0000u, 0x7ffffff9u, 0xffff0000u, 0x00000001u, 0x0000ff00u, 0x81c2c88bu, 0x81c2c88bu}, + {0x00000000u, 0x7f800000u, 0x4b0b708du, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x4b0b708du}, + {0x60227e00u, 0x7892d390u, 0x8eb7980du, 0xabcd7e00u, 0xabcd7e00u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x80010000u, 0x00000000u, 0x00000000u, 0x0000ffffu, 0x7f800000u, 0x7f800000u}, + {0x0de92f1bu, 0x251adf0eu, 0xbf800000u, 0xabcd0000u, 0xabcd3b1bu, 0xabcdfffdu, 0xabcd0e36u, 0xabcd1c6cu, 0x80010e36u, 0x00001c6cu, 0x00000001u, 0x0000ffffu, 0x00000000u, 0xbf800000u}, + {0x16238d81u, 0x3c003555u, 0x3f800000u, 0xabcdfc00u, 0xabcdb981u, 0xabcdfff5u, 0xabcdfff5u, 0xabcd0000u, 0x2aa8fff5u, 0x55500000u, 0x00000000u, 0x0000ff00u, 0x12a3d1a6u, 0x3f800000u}, + {0x7d000200u, 0xf9f6bf4eu, 0x00000000u, 0xabcd0000u, 0xabcd3800u, 0xabcdfff2u, 0xabcd0001u, 0xabcd0002u, 0x80010001u, 0x00000002u, 0x00000000u, 0x0000ffffu, 0xff800000u, 0xff800000u}, + {0x00010400u, 0x03ff3800u, 0x00000000u, 0xabcd7c00u, 0xabcd3800u, 0xabcdfff3u, 0xabcd0002u, 0xabcd0004u, 0x40000002u, 0x80000004u, 0x00000000u, 0x000001ffu, 0x00000000u, 0x00000000u}, + {0x38004e76u, 0x00000018u, 0x00000000u, 0xabcd7c00u, 0xabcd3a76u, 0xabcd0005u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x00000000u, 0x00000000u}, + {0x92dfc110u, 0x90b302aau, 0x03c55116u, 0xabcdfc00u, 0xabcdb910u, 0xabcd0002u, 0xabcd8001u, 0xabcd0000u, 0x00018001u, 0x00030000u, 0x00000001u, 0x00000000u, 0x00000000u, 0x03c55116u}, + {0xec1b55ddu, 0x80000000u, 0x7f800000u, 0xabcd55ddu, 0xabcd39ddu, 0xabcd0007u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x000000ffu, 0x00000000u, 0x7f800000u}, + {0x9736bb4fu, 0x16a48bfau, 0xbf800000u, 0xabcd8000u, 0xabcdbb4fu, 0xabcd0000u, 0xabcd8b11u, 0xabcd0000u, 0xfff88b11u, 0x00000000u, 0x00000001u, 0x00000000u, 0x80000000u, 0xbf800000u}, + {0xd5907bffu, 0x00007fffu, 0x3f800000u, 0xabcd7c00u, 0xabcd3bffu, 0xabcd0010u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000001u, 0x000000ffu, 0x92907adeu, 0x3f800000u}, + {0x800022afu, 0x00000117u, 0x7f800000u, 0xabcd7c00u, 0xabcd3aafu, 0xabcdfffau, 0xabcd01acu, 0xabcd0357u, 0x000101acu, 0x00010357u, 0x00000001u, 0x000000ffu, 0x80000000u, 0x7f800000u}, + {0x99482ee9u, 0xfbff8b30u, 0xbf800000u, 0xabcd0000u, 0xabcd3ae9u, 0xabcdfffdu, 0xabcd0dd2u, 0xabcd1ba4u, 0xfff90dd2u, 0x00001ba4u, 0x00000001u, 0x000000ffu, 0x55c7d391u, 0x55c7d391u}, + {0x5f7d03ffu, 0x00007fffu, 0x00000000u, 0xabcd7c00u, 0xabcd3bfeu, 0xabcdfff2u, 0xabcd0002u, 0xabcd0004u, 0x00000002u, 0x00000004u, 0x00000001u, 0x0000ffffu, 0x1c7d0205u, 0x1c7d0205u}, + {0x7f800000u, 0x2471a957u, 0x3f800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xfaa90000u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x7f800000u, 0x7f800000u}, + {0x7fc00000u, 0xc12a34f4u, 0x7f800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x27a00000u, 0x4f400000u, 0x00000001u, 0x0000ff00u, 0x7fc00000u, 0x7fc00000u}, + {0x34958001u, 0x0000ffffu, 0xbf800000u, 0xabcd8000u, 0xabcdb800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x00000000u, 0xbf800000u}, + {0x077d2f4du, 0x590b3800u, 0x7844f240u, 0xabcd7c00u, 0xabcd3b4du, 0xabcdfffdu, 0xabcd0e9au, 0xabcd1d34u, 0x40000e9au, 0x80001d34u, 0x00000000u, 0x0000ffffu, 0x2109b011u, 0x7844f240u}, + {0xbf800000u, 0x00000001u, 0x80000000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x80000001u, 0x80000001u}, + {0x56b07c00u, 0xfffffff0u, 0x00000000u, 0xabcd7c00u, 0xabcd7c00u, 0xabcd0000u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000001u, 0x0000ffffu, 0xfffffff0u, 0x7fc00000u}, + {0x80008befu, 0x000003f6u, 0x5cfef954u, 0xabcdfc00u, 0xabcdbbefu, 0xabcdfff4u, 0xabcdfff8u, 0xabcd0000u, 0x0002fff8u, 0x00040000u, 0x00000000u, 0x00000000u, 0x80000000u, 0x5cfef954u}, + {0x000048d0u, 0x594f20d1u, 0x29fd96b2u, 0xabcd7c00u, 0xabcd38d0u, 0xabcd0004u, 0xabcd7fffu, 0xabcdffffu, 0x01347fffu, 0x0268ffffu, 0x00000000u, 0x000000ffu, 0x15eba616u, 0x29fd96b2u}, + {0x1d4d0001u, 0x09910000u, 0xbf800000u, 0xabcd0001u, 0xabcd3800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x0000ff01u, 0x00000000u, 0xbf800000u}, + {0x7fc00000u, 0x4cc6d67eu, 0xbf800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x80010000u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x7fc00000u, 0x7fc00000u}, + {0x09796c09u, 0x22ed1cceu, 0xbf800000u, 0xabcd7c00u, 0xabcd3809u, 0xabcd000du, 0xabcd7fffu, 0xabcdffffu, 0x009a7fffu, 0x0133ffffu, 0x00000000u, 0x0000ffffu, 0x00000000u, 0xbf800000u}, + {0x5105b31au, 0xf69b7990u, 0x3f800000u, 0xabcdfc00u, 0xabcdbb1au, 0xabcdfffeu, 0xabcde398u, 0xabcd0000u, 0x7fffe398u, 0xffff0000u, 0x00000000u, 0x0000ff00u, 0xff800000u, 0xff800000u}, + {0x00000001u, 0xe2643336u, 0x7f800000u, 0xabcd7c00u, 0xabcd3800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x1cd80000u, 0x39b00000u, 0x00000000u, 0x00000001u, 0x97e43336u, 0x7f800000u}, + {0xec51054eu, 0x00010000u, 0x3f800000u, 0xabcd054eu, 0xabcd394eu, 0xabcdfff3u, 0xabcd0003u, 0xabcd0005u, 0x00000003u, 0x00000005u, 0x00000000u, 0x000000ffu, 0xa9d1054eu, 0x3f800000u}, + {0x7f7fffffu, 0xbf800000u, 0x00000000u, 0xabcdffffu, 0xabcdffffu, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0xff7fffffu, 0xff7fffffu}, + {0x38003c00u, 0x7e00fe00u, 0x9f316305u, 0xabcd0000u, 0xabcd3800u, 0xabcd0001u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x76813a77u, 0x76813a77u}, + {0x21c57a88u, 0xbf800000u, 0x7f800000u, 0xabcd7a88u, 0xabcd3a88u, 0xabcd0010u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0xa1c57a88u, 0x7f800000u}, + {0x3c00cc58u, 0xfffffff1u, 0x7f800000u, 0xabcd9058u, 0xabcdb858u, 0xabcd0005u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0xfffffff1u, 0x7fc00000u}, + {0x00800000u, 0x7fc00000u, 0x00000000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00008000u, 0x7fc00000u, 0x7fc00000u}, + {0x042a2f64u, 0x00800000u, 0x80000000u, 0xabcd2f64u, 0xabcd3b64u, 0xabcdfffdu, 0xabcd0ec8u, 0xabcd1d90u, 0x00000ec8u, 0x00001d90u, 0x00000000u, 0x0000ffffu, 0x00000000u, 0x00000000u}, + {0x00800000u, 0xbf800000u, 0x3f800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00008000u, 0x80800000u, 0x3f800000u}, + {0xfc00338au, 0x7e000000u, 0xbf800000u, 0xabcd338au, 0xabcd3b8au, 0xabcdfffeu, 0xabcd1e28u, 0xabcd3c50u, 0x00001e28u, 0x00003c50u, 0x00000000u, 0x000000ffu, 0xff800000u, 0xff800000u}, + {0xbc007820u, 0xffff8000u, 0x80000000u, 0xabcd0000u, 0xabcd3820u, 0xabcd0010u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x000000ffu, 0xffff8000u, 0x7fc00000u}, + {0x3f800000u, 0xe143a0adu, 0xbf800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xfed50000u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0xe143a0adu, 0xe143a0adu}, + {0x0f7c03ffu, 0xfffffff1u, 0xbf800000u, 0xabcd0000u, 0xabcd3bfeu, 0xabcdfff2u, 0xabcd0002u, 0xabcd0004u, 0x00000002u, 0x00000004u, 0x00000001u, 0x0000ffffu, 0xfffffff1u, 0x7fc00000u}, + {0x3c00e290u, 0x7c00bc00u, 0x80000000u, 0xabcd8000u, 0xabcdba90u, 0xabcd000au, 0xabcd8001u, 0xabcd0000u, 0x80018001u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x78819fddu, 0x78819fddu}, + {0xb1c13112u, 0x00000028u, 0xbf800000u, 0xabcd7c00u, 0xabcd3912u, 0xabcdfffeu, 0xabcd1448u, 0xabcd2890u, 0x00001448u, 0x00002890u, 0x00000000u, 0x000000ffu, 0x80000000u, 0xbf800000u}, + {0x35559d69u, 0x5fcf2000u, 0x4886f572u, 0xabcdfc00u, 0xabcdb969u, 0xabcdfff9u, 0xabcdff53u, 0xabcd0000u, 0x0100ff53u, 0x02000000u, 0x00000000u, 0x0000ff00u, 0x55acd4fcu, 0x55acd4fcu}, + {0x4000ff7cu, 0xc523b7a6u, 0x3f800000u, 0xabcdff7cu, 0xabcdff7cu, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xc2d00000u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0xc5a4fe6cu, 0xc5a4f66cu}, + {0x7d008001u, 0x0000001eu, 0x3f800000u, 0xabcdd400u, 0xabcdb800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x34f0f002u, 0x3f800004u}, + {0x80017e00u, 0xfffffff1u, 0x80000000u, 0xabcd7e00u, 0xabcd7e00u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x000000ffu, 0xfffffff1u, 0x7fc00000u}, + {0x869e9ad7u, 0x75cfc000u, 0x00000000u, 0xabcd8000u, 0xabcdbad7u, 0xabcdfff8u, 0xabcdff93u, 0xabcd0000u, 0x8001ff93u, 0x00000000u, 0x00000000u, 0x00000000u, 0xbd00b628u, 0xbd00b628u}, + {0x49b48000u, 0x00000295u, 0x80000000u, 0xabcd8000u, 0xabcd8000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00010000u, 0x00030000u, 0x00000000u, 0x0000ff00u, 0x03e90740u, 0x03e90740u}, + {0x61a938f2u, 0x00000215u, 0x7f800000u, 0xabcd7c00u, 0xabcd38f2u, 0xabcd0000u, 0xabcd4f1fu, 0xabcd9e3fu, 0x00014f1fu, 0x00029e3fu, 0x00000000u, 0x0000ffffu, 0x1bb029c8u, 0x7f800000u}, + {0x03ff3c00u, 0xfffffff0u, 0x3f800000u, 0xabcd0100u, 0xabcd3800u, 0xabcd0001u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000001u, 0x0000ffffu, 0xfffffff0u, 0x7fc00000u}, + {0xfc007bffu, 0x03ff7b18u, 0x7f800000u, 0xabcd7c00u, 0xabcd3bffu, 0xabcd0010u, 0xabcd7fffu, 0xabcdffffu, 0x7fff7fffu, 0xffffffffu, 0x00000001u, 0x000000ffu, 0xc080394bu, 0x7f800000u}, + {0x5fcf5c22u, 0x00000001u, 0xbf800000u, 0xabcd6022u, 0xabcd3822u, 0xabcd0009u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x154f5c22u, 0xbf800000u}, + {0xc2e83555u, 0xffffffe8u, 0x7f800000u, 0xabcd0000u, 0xabcd3955u, 0xabcdffffu, 0xabcd2aa8u, 0xabcd5550u, 0x00002aa8u, 0x00005550u, 0x00000001u, 0x000000ffu, 0xffffffe8u, 0x7fc00000u}, + {0x9ab87925u, 0x57d37c00u, 0x7f800000u, 0xabcd7c00u, 0xabcd3925u, 0xabcd0010u, 0xabcd7fffu, 0xabcdffffu, 0x7fff7fffu, 0xffffffffu, 0x00000000u, 0x000000ffu, 0xb3186534u, 0x7f800000u}, + {0xbe336083u, 0xc8fb61b3u, 0xbf800000u, 0xabcd7c00u, 0xabcd3883u, 0xabcd000au, 0xabcd7fffu, 0xabcdffffu, 0x7fff7fffu, 0xffffffffu, 0x00000001u, 0x000000ffu, 0x47b02415u, 0x47b02395u}, + {0xfbfffc00u, 0xef363c00u, 0xbf800000u, 0xabcdfc00u, 0xabcdfc00u, 0xabcd0000u, 0xabcd8001u, 0xabcd0000u, 0x7fff8001u, 0xffff0000u, 0x00000000u, 0x00000000u, 0x7f800000u, 0x7f800000u}, + {0x8c4528c0u, 0xffffffd8u, 0x334f6a84u, 0xabcd0000u, 0xabcd38c0u, 0xabcdfffcu, 0xabcd04c0u, 0xabcd0980u, 0x000004c0u, 0x00000980u, 0x00000001u, 0x000000ffu, 0xffffffd8u, 0x7fc00000u}, + {0x7bffa87du, 0x4b1c3555u, 0x80000000u, 0xabcdfc00u, 0xabcdb87du, 0xabcdfffcu, 0xabcdfb83u, 0xabcd0000u, 0x2aa8fb83u, 0x55500000u, 0x00000000u, 0x0000ff00u, 0x7f800000u, 0x7f800000u}, + {0x6c0903ffu, 0x0000004cu, 0x7f800000u, 0xabcd7c00u, 0xabcd3bfeu, 0xabcdfff2u, 0xabcd0002u, 0xabcd0004u, 0x00000002u, 0x00000004u, 0x00000000u, 0x0000ffffu, 0x24a2b4bfu, 0x7f800000u}, + {0x00000001u, 0x7f7fffffu, 0x0ebc4be5u, 0xabcd0000u, 0xabcd3800u, 0xabcdffe9u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000001u, 0x00000001u, 0x34ffffffu, 0x34ffffffu}, + {0x80013800u, 0x00010000u, 0xbf800000u, 0xabcd3800u, 0xabcd3800u, 0xabcd0000u, 0xabcd4000u, 0xabcd8000u, 0x00004000u, 0x00008000u, 0x00000000u, 0x000000ffu, 0x80000000u, 0xbf800000u}, + {0x5ce1fbffu, 0xbc00c72fu, 0x80000000u, 0xabcd8000u, 0xabcdbbffu, 0xabcd0010u, 0xabcd8001u, 0xabcd0000u, 0x80018001u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0xd9635ba8u, 0xd9635ba8u}, + {0x3555ce8au, 0x00000028u, 0x3f800000u, 0xabcdfc00u, 0xabcdba8au, 0xabcd0005u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x00000000u, 0x3f800000u}, + {0xf3d503ffu, 0x00000034u, 0x00000000u, 0xabcd7c00u, 0xabcd3bfeu, 0xabcdfff2u, 0xabcd0002u, 0xabcd0004u, 0x00000002u, 0x00000004u, 0x00000000u, 0x000000ffu, 0xac2d133fu, 0xac2d133fu}, + {0x7d007c00u, 0xffffffe2u, 0xbf800000u, 0xabcd7c00u, 0xabcd7c00u, 0xabcd0000u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000001u, 0x0000ffffu, 0xffffffe2u, 0x7fc00000u}, + {0xfe87a17bu, 0xaa94a1d4u, 0x7f800000u, 0xabcd8000u, 0xabcdb97bu, 0xabcdfffau, 0xabcdfea1u, 0xabcd0000u, 0xfe8bfea1u, 0x00000000u, 0x00000000u, 0x00000000u, 0x699d7e30u, 0x7f800000u}, + {0xedd93800u, 0x00000095u, 0x7f800000u, 0xabcd7c00u, 0xabcd3800u, 0xabcd0000u, 0xabcd4000u, 0xabcd8000u, 0x00004000u, 0x00018000u, 0x00000000u, 0x000000ffu, 0xa6fcdb30u, 0x7f800000u}, + {0x3f397c00u, 0x00000147u, 0x3f800000u, 0xabcd7c00u, 0xabcd7c00u, 0xabcd0000u, 0xabcd7fffu, 0xabcdffffu, 0x00017fffu, 0x0001ffffu, 0x00000000u, 0x0000ffffu, 0x000000edu, 0x3f800000u}, + {0xfc003800u, 0xffffffffu, 0x00000000u, 0xabcd3400u, 0xabcd3800u, 0xabcd0000u, 0xabcd4000u, 0xabcd8000u, 0x00004000u, 0x00008000u, 0x00000001u, 0x000000ffu, 0xffffffffu, 0x7fc00000u}, + {0x7d0030c0u, 0xf11affb3u, 0xbf800000u, 0xabcd0000u, 0xabcd38c0u, 0xabcdfffeu, 0xabcd1300u, 0xabcd2600u, 0x00001300u, 0x00002600u, 0x00000001u, 0x0000ffffu, 0xff800000u, 0xff800000u}, + {0x1155581fu, 0xbf800000u, 0x7f800000u, 0xabcd581fu, 0xabcd381fu, 0xabcd0008u, 0xabcd7fffu, 0xabcdffffu, 0x00007fffu, 0x0000ffffu, 0x00000000u, 0x0000ffffu, 0x9155581fu, 0x7f800000u}, + {0x382202aau, 0xffffffe8u, 0x3f800000u, 0xabcd0000u, 0xabcd3954u, 0xabcdfff2u, 0xabcd0001u, 0xabcd0003u, 0x00000001u, 0x00000003u, 0x00000001u, 0x0000ffffu, 0xffffffe8u, 0x7fc00000u}, + {0x000121d6u, 0xffffffe8u, 0x7f800000u, 0xabcd0000u, 0xabcd39d6u, 0xabcdfffau, 0xabcd0175u, 0xabcd02ebu, 0x00000175u, 0x000002ebu, 0x00000001u, 0x000001ffu, 0xffffffe8u, 0x7fc00000u}, + {0xcada2000u, 0x8ad8f526u, 0xbf800000u, 0xabcd0000u, 0xabcd3800u, 0xabcdfffau, 0xabcd0100u, 0xabcd0200u, 0x80010100u, 0x00000200u, 0x00000001u, 0x000000ffu, 0x1638dbe1u, 0xbf800000u}, + {0x00800000u, 0x80000000u, 0x7f800000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00008000u, 0x00000000u, 0x7f800000u}, + {0x0001fbffu, 0x7e009ac0u, 0x80000000u, 0xabcd8000u, 0xabcdbbffu, 0xabcd0010u, 0xabcd8001u, 0xabcd0000u, 0xff948001u, 0x00000000u, 0x00000000u, 0x00000100u, 0x3bff3294u, 0x3bff3294u}, + {0x03ffbc00u, 0x000003ffu, 0x80000000u, 0xabcdfc00u, 0xabcdb800u, 0xabcd0001u, 0xabcd8001u, 0xabcd0000u, 0x00028001u, 0x00040000u, 0x00000001u, 0x0000ff00u, 0x00000000u, 0x00000000u}, + {0x80016cb9u, 0x000002a6u, 0x80000000u, 0xabcd7c00u, 0xabcd38b9u, 0xabcd000du, 0xabcd7fffu, 0xabcdffffu, 0x00017fffu, 0x0003ffffu, 0x00000000u, 0x000000ffu, 0x80000000u, 0x80000000u}, + {0x000103ffu, 0x00000000u, 0xce4d2a2au, 0xabcd03ffu, 0xabcd3bfeu, 0xabcdfff2u, 0xabcd0002u, 0xabcd0004u, 0x00000002u, 0x00000004u, 0x00000000u, 0x000001ffu, 0x00000000u, 0xce4d2a2au}, + {0x7bff7d00u, 0x5a763800u, 0x3f800000u, 0xabcd7f00u, 0xabcd7f00u, 0xabcd0000u, 0xabcd0000u, 0xabcd0000u, 0x40000000u, 0x80000000u, 0x00000000u, 0x0000ffffu, 0x7f800000u, 0x7f800000u}, + {0xa61f1fefu, 0x7c0069ffu, 0x7f800000u, 0xabcd7c00u, 0xabcd3befu, 0xabcdfff9u, 0xabcd00feu, 0xabcd01fcu, 0x7fff00feu, 0xffff01fcu, 0x00000001u, 0x000000ffu, 0xe29fa3b4u, 0x7f800000u}, + {0x085a80dcu, 0x0000001eu, 0xbf800000u, 0xabcdf2e0u, 0xabcdbae0u, 0xabcdfff0u, 0xabcd0000u, 0xabcd0000u, 0x00000000u, 0x00000000u, 0x00000001u, 0x0000ff00u, 0x00000000u, 0xbf800000u}, + {0x4006fc00u, 0x00000010u, 0x7f800000u, 0xabcdfc00u, 0xabcdfc00u, 0xabcd0000u, 0xabcd8001u, 0xabcd0000u, 0x00008001u, 0x00000000u, 0x00000000u, 0x0000ff00u, 0x00000022u, 0x7f800000u}, + {0x46510173u, 0x7f800001u, 0x80000000u, 0xabcd02e6u, 0xabcd39ccu, 0xabcdfff1u, 0xabcd0001u, 0xabcd0001u, 0x00000001u, 0x00000001u, 0x00000000u, 0x0000ffffu, 0x7fc00001u, 0x7fc00000u}, +}; + +constexpr std::array Names{ + "v_ldexp_f16", "v_frexp_mant_f16", "v_frexp_exp_i16_f16", "v_cvt_norm_i16_f16", "v_cvt_norm_u16_f16", "v_cvt_pknorm_i16_f16", + "v_cvt_pknorm_u16_f16", "v_cmp_class_f16", "v_sat_pk_u8_i16", "v_mul_legacy_f32", "v_mac_legacy_f32", +}; + +std::array BufferDescriptor(const void* data, std::uint32_t count) { + const auto address = reinterpret_cast(data); + return {static_cast(address), static_cast((address >> 32u) & 0xffffu) | (4u << 16u), count, 0x01016facu}; +} + +std::string Hex(std::uint32_t value) { + char text[16]; + std::snprintf(text, sizeof(text), "0x%08x", value); + return text; +} + +bool IsNan32(std::uint32_t bits) { + return (bits & 0x7fffffffu) > 0x7f800000u; +} + +bool IsNan16(std::uint32_t bits) { + return (bits & 0x7fffu) > 0x7c00u; +} + +bool IsDenormal32(std::uint32_t bits) { + return (bits & 0x7f800000u) == 0u && (bits & 0x007fffffu) != 0u; +} + +bool Matches(std::uint32_t column, std::uint32_t actual, std::uint32_t expected) { + if (actual == expected) return true; + if (column <= 1u) return (actual >> 16u) == (expected >> 16u) && IsNan16(actual) && IsNan16(expected); + return column >= 9u && IsNan32(actual) && IsNan32(expected); +} + +void Run(AgcDriver::VulkanDevice& device, std::uint32_t first, std::uint32_t count) { + Input.fill(0u); + for (std::uint32_t lane = 0; lane < count; ++lane) { + const auto& vector = Vectors[first + lane]; + Input[lane * Inputs] = vector.a; + Input[lane * Inputs + 1] = vector.b; + Input[lane * Inputs + 2] = vector.c; + } + Output.fill(0xdeadbeefu); + std::vector userData(8, 0u); + const auto input = BufferDescriptor(Input.data(), static_cast(Input.size())); + const auto output = BufferDescriptor(Output.data(), static_cast(Output.size())); + std::copy(input.begin(), input.end(), userData.begin()); + std::copy(output.begin(), output.end(), userData.begin() + 4); + const std::span code(MiscCode); + const std::array memory{{{reinterpret_cast(code.data()), std::as_bytes(code)}}}; + const ShaderRecompiler::ShaderComputeStageInfo compute{{Threads, 1, 1}, 0, {false, false, false}, false, 1}; + ShaderRecompiler::RecompileRequest request{ + {ShaderStage::Compute, reinterpret_cast(code.data()), code, 0, {}}, + {32, 0, userData, compute, std::nullopt, std::nullopt, memory}, + device.Target(), + {0, 0, 0, 128} + }; + request.useCache = false; + const auto result = ShaderRecompiler::Recompile(request); + device.Dispatch(result, 1, 1, 1, {}, reinterpret_cast(code.data())); + device.WaitIdle(); +} + +void Check(std::uint32_t first, std::uint32_t count) { + for (std::uint32_t lane = 0; lane < count; ++lane) { + const auto& vector = Vectors[first + lane]; + const bool denormal = IsDenormal32(vector.a) || IsDenormal32(vector.b) || IsDenormal32(vector.expected[9]); + for (std::uint32_t column = 0; column < Names.size(); ++column) { + if (column >= 9u && denormal) continue; + const auto expected = vector.expected[column]; + const auto actual = Output[lane * Results + column]; + Require(Matches(column, actual, expected), std::string("f16 misc: vector ") + std::to_string(first + lane) + " (" + Hex(vector.a) + ", " + Hex(vector.b) + ", " + Hex(vector.c) + ") " + Names[column] + " is " + Hex(actual) + ", expected " + Hex(expected)); + } + } +} + +} + +int main() { + try { + const auto device = OpenVulkanTestDevice(); + if (!device) return VulkanTestSkipped; + constexpr std::uint32_t total = sizeof(Vectors) / sizeof(Vectors[0]); + for (std::uint32_t first = 0; first < total; first += Threads) { + const auto count = std::min(Threads, total - first); + Run(*device, first, count); + Check(first, count); + } + std::puts("f16 misc tests passed"); + return 0; + } catch (const std::exception& error) { + std::cerr << error.what() << '\n'; + return 1; + } +} diff --git a/core/shader/recompiler/RdnaDecoder/include/RdnaDecoder/RdnaOpcode.hpp b/core/shader/recompiler/RdnaDecoder/include/RdnaDecoder/RdnaOpcode.hpp index 52440fadb..fc8888950 100644 --- a/core/shader/recompiler/RdnaDecoder/include/RdnaDecoder/RdnaOpcode.hpp +++ b/core/shader/recompiler/RdnaDecoder/include/RdnaDecoder/RdnaOpcode.hpp @@ -302,6 +302,18 @@ enum class RdnaOpcode : std::uint16_t { VSubrevI32, VBfmB32, VLdexpF32, + VLdexpF16, + VFrexpMantF16, + VFrexpExpI16F16, + VCvtNormI16F16, + VCvtNormU16F16, + VCvtPknormI16F16, + VCvtPknormU16F16, + VCmpClassF16, + VCmpxClassF16, + VSatPkU8I16, + VMulLegacyF32, + VMacLegacyF32, VCvtPknormI16F32, VCvtPknormU16F32, VCvtPkU16U32, diff --git a/core/shader/recompiler/RdnaDecoder/src/RdnaOpcode.cpp b/core/shader/recompiler/RdnaDecoder/src/RdnaOpcode.cpp index 032c76070..6f4c13ca4 100644 --- a/core/shader/recompiler/RdnaDecoder/src/RdnaOpcode.cpp +++ b/core/shader/recompiler/RdnaDecoder/src/RdnaOpcode.cpp @@ -277,6 +277,18 @@ bool IsVectorAluOpcode(RdnaOpcode opcode) { case RdnaOpcode::VSubrevI32: case RdnaOpcode::VBfmB32: case RdnaOpcode::VLdexpF32: + case RdnaOpcode::VLdexpF16: + case RdnaOpcode::VFrexpMantF16: + case RdnaOpcode::VFrexpExpI16F16: + case RdnaOpcode::VCvtNormI16F16: + case RdnaOpcode::VCvtNormU16F16: + case RdnaOpcode::VCvtPknormI16F16: + case RdnaOpcode::VCvtPknormU16F16: + case RdnaOpcode::VCmpClassF16: + case RdnaOpcode::VCmpxClassF16: + case RdnaOpcode::VSatPkU8I16: + case RdnaOpcode::VMulLegacyF32: + case RdnaOpcode::VMacLegacyF32: case RdnaOpcode::VCvtPknormI16F32: case RdnaOpcode::VCvtPknormU16F32: case RdnaOpcode::VCvtPkU16U32: diff --git a/core/shader/recompiler/RdnaDecoder/src/RdnaVectorOpDecoder.cpp b/core/shader/recompiler/RdnaDecoder/src/RdnaVectorOpDecoder.cpp index a4d6ec2bc..2947a5838 100644 --- a/core/shader/recompiler/RdnaDecoder/src/RdnaVectorOpDecoder.cpp +++ b/core/shader/recompiler/RdnaDecoder/src/RdnaVectorOpDecoder.cpp @@ -98,6 +98,9 @@ constexpr Vop2OpcodeInfo vop2Opcodes[] = { {0x39u, RdnaOpcode::VMaxF16, Vop2SdwaProfile::Float16}, {0x3au, RdnaOpcode::VMinF16, Vop2SdwaProfile::Float16}, {0x3cu, RdnaOpcode::VPkFmacF16}, + {0x06u, RdnaOpcode::VMacLegacyF32}, + {0x07u, RdnaOpcode::VMulLegacyF32}, + {0x3bu, RdnaOpcode::VLdexpF16}, }; constexpr VectorOpcodeInfo vop1Opcodes[] = { @@ -155,6 +158,11 @@ constexpr VectorOpcodeInfo vop1Opcodes[] = { {0x5fu, RdnaOpcode::VFractF16}, {0x60u, RdnaOpcode::VSinF16}, {0x61u, RdnaOpcode::VCosF16}, + {0x59u, RdnaOpcode::VFrexpMantF16}, + {0x5au, RdnaOpcode::VFrexpExpI16F16}, + {0x62u, RdnaOpcode::VSatPkU8I16}, + {0x63u, RdnaOpcode::VCvtNormI16F16}, + {0x64u, RdnaOpcode::VCvtNormU16F16}, }; constexpr VectorOpcodeInfo vop3EncodedVop1Opcodes[] = { @@ -207,6 +215,11 @@ constexpr VectorOpcodeInfo vop3EncodedVop1Opcodes[] = { {0x5fu, RdnaOpcode::VFractF16}, {0x60u, RdnaOpcode::VSinF16}, {0x61u, RdnaOpcode::VCosF16}, + {0x59u, RdnaOpcode::VFrexpMantF16}, + {0x5au, RdnaOpcode::VFrexpExpI16F16}, + {0x62u, RdnaOpcode::VSatPkU8I16}, + {0x63u, RdnaOpcode::VCvtNormI16F16}, + {0x64u, RdnaOpcode::VCvtNormU16F16}, }; constexpr VopcOpcodeInfo vopcOpcodes[] = { @@ -247,6 +260,7 @@ constexpr VopcOpcodeInfo vopcOpcodes[] = { {0x86u, RdnaOpcode::VCmpGeI32}, {0x87u, RdnaOpcode::VCmpTI32}, {0x88u, RdnaOpcode::VCmpClassF32}, + {0x8fu, RdnaOpcode::VCmpClassF16}, {0x89u, RdnaOpcode::VCmpLtI16}, {0x8au, RdnaOpcode::VCmpEqI16}, {0x8bu, RdnaOpcode::VCmpLeI16}, @@ -260,6 +274,7 @@ constexpr VopcOpcodeInfo vopcOpcodes[] = { {0x95u, RdnaOpcode::VCmpxNeI32}, {0x96u, RdnaOpcode::VCmpxGeI32}, {0x98u, RdnaOpcode::VCmpxClassF32}, + {0x9fu, RdnaOpcode::VCmpxClassF16}, {0x99u, RdnaOpcode::VCmpxLtI16}, {0x9au, RdnaOpcode::VCmpxEqI16}, {0x9bu, RdnaOpcode::VCmpxLeI16}, @@ -380,6 +395,8 @@ constexpr VectorOpcodeInfo vop3Opcodes[] = { {0x360u, RdnaOpcode::VReadlaneB32}, {0x361u, RdnaOpcode::VWritelaneB32}, {0x362u, RdnaOpcode::VLdexpF32}, + {0x312u, RdnaOpcode::VCvtPknormI16F16}, + {0x313u, RdnaOpcode::VCvtPknormU16F16}, {0x363u, RdnaOpcode::VBfmB32}, {0x364u, RdnaOpcode::VBcntU32B32}, {0x365u, RdnaOpcode::VMbcntLoU32B32}, @@ -536,6 +553,10 @@ bool isNativeVop3B16BinaryOpcode(RdnaOpcode opcode) { bool isVop1FloatSourceOpcode(RdnaOpcode opcode) { switch (opcode) { + case RdnaOpcode::VFrexpMantF16: + case RdnaOpcode::VFrexpExpI16F16: + case RdnaOpcode::VCvtNormI16F16: + case RdnaOpcode::VCvtNormU16F16: case RdnaOpcode::VMovB32: case RdnaOpcode::VCvtF32F16: case RdnaOpcode::VCvtU32F32: @@ -665,7 +686,9 @@ bool isVopcFloatCompareOpcode(RdnaOpcode opcode) { case RdnaOpcode::VCmpxNeqF16: case RdnaOpcode::VCmpxNltF16: case RdnaOpcode::VCmpClassF32: - case RdnaOpcode::VCmpxClassF32: return true; + case RdnaOpcode::VCmpxClassF32: + case RdnaOpcode::VCmpClassF16: + case RdnaOpcode::VCmpxClassF16: return true; default: return false; } } @@ -1133,6 +1156,7 @@ bool isVopcCompareExec(RdnaOpcode opcode) { case RdnaOpcode::VCmpxNeI32: case RdnaOpcode::VCmpxGeI32: case RdnaOpcode::VCmpxClassF32: + case RdnaOpcode::VCmpxClassF16: case RdnaOpcode::VCmpxLtU32: case RdnaOpcode::VCmpxEqU32: case RdnaOpcode::VCmpxLeU32: @@ -1244,6 +1268,8 @@ std::uint32_t nativeVop3SourceCount(RdnaOpcode opcode) { case RdnaOpcode::VBcntU32B32: case RdnaOpcode::VCvtPknormI16F32: case RdnaOpcode::VCvtPknormU16F32: + case RdnaOpcode::VCvtPknormI16F16: + case RdnaOpcode::VCvtPknormU16F16: case RdnaOpcode::VCvtPkU16U32: case RdnaOpcode::VCvtPkI16I32: return 2; default: return 3; @@ -1344,6 +1370,8 @@ bool supportsNativeVop3SourceModifiers(RdnaOpcode opcode) { return true; } switch (opcode) { + case RdnaOpcode::VMulLegacyF32: + case RdnaOpcode::VMacLegacyF32: case RdnaOpcode::VCndmaskB32: case RdnaOpcode::VAddF32: case RdnaOpcode::VSubF32: diff --git a/core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp b/core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp index f9b643bf7..fbe48d43c 100644 --- a/core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp +++ b/core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp @@ -145,6 +145,15 @@ private: bool floatBinary(const RdnaInstruction& inst, IrOpcode opcode, bool reverse); bool floatTernary(const RdnaInstruction& inst, IrOpcode opcode, bool accumulator, bool mix); bool vFrexpMantF32(const RdnaInstruction& inst); + IrU32 readF16Bits(const RdnaOperand& operand); + IrU32 normF16(IrU32 bits, bool signedValue); + bool vLdexpF16(const RdnaInstruction& inst); + bool vFrexpF16(const RdnaInstruction& inst, bool exponent); + bool vCvtNormF16(const RdnaInstruction& inst, bool signedValue); + bool vCvtPknormF16(const RdnaInstruction& inst, bool signedValue); + bool vSatPkU8I16(const RdnaInstruction& inst); + bool vMulLegacyF32(const RdnaInstruction& inst, bool accumulate); + void emitFloat16ClassCompare(const RdnaInstruction& inst, bool cmpx); bool vDot2cF32F16(const RdnaInstruction& inst); bool vCubeidF32(const RdnaInstruction& inst); bool vCubescF32(const RdnaInstruction& inst); diff --git a/core/shader/recompiler/Translation/src/FloatInstructions.cpp b/core/shader/recompiler/Translation/src/FloatInstructions.cpp index 64ca4ff4e..6b5fdf247 100644 --- a/core/shader/recompiler/Translation/src/FloatInstructions.cpp +++ b/core/shader/recompiler/Translation/src/FloatInstructions.cpp @@ -107,6 +107,125 @@ bool TranslationContext::float16Ternary(const RdnaInstruction& inst, IrOpcode op return true; } +IrU32 TranslationContext::readF16Bits(const RdnaOperand& operand) { + const IrU32 source = readF16SourceBits(operand); + IrU32 bits(ir.BitwiseAnd((operand.opSel ? ir.ShiftRightLogical(source.Value(), ir.Constant(16u)) : source.Value()), ir.Constant(0xffffu))); + if (operand.absolute) bits = IrU32(ir.BitwiseAnd(bits.Value(), ir.Constant(0x7fffu))); + if (operand.negate) bits = IrU32(ir.BitwiseXor(bits.Value(), ir.Constant(0x8000u))); + return bits; +} + +IrU32 TranslationContext::normF16(IrU32 bits, bool signedValue) { + const IrU32 magnitude(ir.BitwiseAnd(bits.Value(), ir.Constant(0x7fffu))); + const IrU1 negative(ir.INotEqual(ir.BitwiseAnd(bits.Value(), ir.Constant(0x8000u)), ir.Constant(0u))); + const IrU1 nan(ir.UGreaterThan(magnitude.Value(), ir.Constant(0x7c00u))); + const IrU1 saturated(ir.Emit(IrOpcode::UGreaterThanEqual32, IrType::U1, {&magnitude.Value(), &ir.Constant(0x3c00u)})); + const std::uint32_t scale = signedValue ? 32767u : 65535u; + const IrU32 exponent(ir.ShiftRightLogical(magnitude.Value(), ir.Constant(10u))); + const IrU1 normal(ir.INotEqual(exponent.Value(), ir.Constant(0u))); + const IrU32 mantissa(ir.BitwiseOr(ir.BitwiseAnd(magnitude.Value(), ir.Constant(0x3ffu)), ir.Select(normal.Value(), ir.Constant(0x400u), ir.Constant(0u)))); + const IrU32 shift(ir.ISub(ir.Constant(25u), ir.Select(normal.Value(), exponent.Value(), ir.Constant(1u)))); + const IrU32 product(ir.IMul(mantissa.Value(), ir.Constant(scale))); + const IrU32 truncated(ir.ShiftRightLogical(product.Value(), shift.Value())); + const IrU32 remainder(ir.BitwiseAnd(product.Value(), ir.ISub(ir.ShiftLeftLogical(ir.Constant(1u), shift.Value()), ir.Constant(1u)))); + const IrU32 half(ir.ShiftLeftLogical(ir.Constant(1u), ir.ISub(shift.Value(), ir.Constant(1u)))); + const IrU1 roundUp(ir.LogicalOr(ir.UGreaterThan(remainder.Value(), half.Value()), + ir.LogicalAnd(ir.IEqual(remainder.Value(), half.Value()), ir.INotEqual(ir.BitwiseAnd(truncated.Value(), ir.Constant(1u)), ir.Constant(0u))))); + IrU32 value(ir.Select(saturated.Value(), ir.Constant(scale), ir.IAdd(truncated.Value(), ir.Select(roundUp.Value(), ir.Constant(1u), ir.Constant(0u))))); + if (signedValue) { + value = IrU32(ir.Select(negative.Value(), ir.ISub(ir.Constant(0u), value.Value()), value.Value())); + } else { + value = IrU32(ir.Select(negative.Value(), ir.Constant(0u), value.Value())); + } + return IrU32(ir.BitwiseAnd(ir.Select(nan.Value(), ir.Constant(0u), value.Value()), ir.Constant(0xffffu))); +} + +bool TranslationContext::vLdexpF16(const RdnaInstruction& inst) { + const IrF32 value = readF16AsF32(sourceAt(inst, 0u)); + const IrU32 exponent(ir.Emit(IrOpcode::BitFieldSExtract, IrType::U32, {&readU32(sourceAt(inst, 1u)).Value(), &ir.Constant(0u), &ir.Constant(16u)})); + const IrU32 clamped(ir.Emit(IrOpcode::SMax32, IrType::U32, {&ir.Emit(IrOpcode::SMin32, IrType::U32, {&exponent.Value(), &ir.Constant(64u)}), &ir.Constant(static_cast(-64))})); + IrValue& power = ir.BitCastF32(ir.ShiftLeftLogical(ir.IAdd(clamped.Value(), ir.Constant(127u)), ir.Constant(23u))); + writeF16(inst.destination, IrF32(ir.Emit(IrOpcode::FPMul32, IrType::F32, {&value.Value(), &power}))); + return true; +} + +bool TranslationContext::vFrexpF16(const RdnaInstruction& inst, bool exponent) { + const IrU32 bits = readF16Bits(sourceAt(inst, 0u)); + const IrF32 value = readF16AsF32(sourceAt(inst, 0u)); + const IrU32 word(ir.BitCastU32(value.Value())); + const IrU1 special(ir.LogicalOr(ir.IEqual(ir.BitwiseAnd(bits.Value(), ir.Constant(0x7fffu)), ir.Constant(0u)), + ir.Emit(IrOpcode::UGreaterThanEqual32, IrType::U1, {&ir.BitwiseAnd(bits.Value(), ir.Constant(0x7fffu)), &ir.Constant(0x7c00u)}))); + if (exponent) { + const IrU32 unbiased(ir.ISub(ir.Emit(IrOpcode::BitFieldUExtract, IrType::U32, {&word.Value(), &ir.Constant(23u), &ir.Constant(8u)}), ir.Constant(126u))); + write16Bits(inst.destination, IrU32(ir.BitwiseAnd(ir.Select(special.Value(), ir.Constant(0u), unbiased.Value()), ir.Constant(0xffffu)))); + return true; + } + const IrU32 mantissa(ir.BitwiseOr(ir.BitwiseAnd(word.Value(), ir.Constant(0x807fffffu)), ir.Constant(126u << 23u))); + const IrF16 half(ir.Emit(IrOpcode::ConvertF16F32, IrType::F16, {&ir.BitCastF32(mantissa.Value())})); + const IrU32 converted(ir.Emit(IrOpcode::ConvertU32U16, IrType::U32, {&ir.Emit(IrOpcode::BitCastU16F16, IrType::U16, {&half.Value()})})); + const IrU1 nan(ir.UGreaterThan(ir.BitwiseAnd(bits.Value(), ir.Constant(0x7fffu)), ir.Constant(0x7c00u))); + const IrU32 kept(ir.Select(nan.Value(), ir.BitwiseOr(bits.Value(), ir.Constant(0x200u)), bits.Value())); + write16Bits(inst.destination, IrU32(ir.Select(special.Value(), kept.Value(), converted.Value()))); + return true; +} + +bool TranslationContext::vCvtNormF16(const RdnaInstruction& inst, bool signedValue) { + write16Bits(inst.destination, normF16(readF16Bits(sourceAt(inst, 0u)), signedValue)); + return true; +} + +bool TranslationContext::vCvtPknormF16(const RdnaInstruction& inst, bool signedValue) { + const IrU32 low = normF16(readF16Bits(sourceAt(inst, 0u)), signedValue); + const IrU32 high = normF16(readF16Bits(sourceAt(inst, 1u)), signedValue); + const IrU32 result(ir.BitwiseOr(low.Value(), ir.ShiftLeftLogical(high.Value(), ir.Constant(16u)))); + writeOperand(inst.destination, &result.Value()); + return true; +} + +bool TranslationContext::vSatPkU8I16(const RdnaInstruction& inst) { + const IrU32 source = readU32(sourceAt(inst, 0u)); + const auto saturate = [&](std::uint32_t offset) { + IrValue& value = ir.Emit(IrOpcode::BitFieldSExtract, IrType::U32, {&source.Value(), &ir.Constant(offset), &ir.Constant(16u)}); + return IrU32(ir.Emit(IrOpcode::SMin32, IrType::U32, {&ir.Emit(IrOpcode::SMax32, IrType::U32, {&value, &ir.Constant(0u)}), &ir.Constant(255u)})); + }; + const IrU32 result(ir.BitwiseOr(saturate(0u).Value(), ir.ShiftLeftLogical(saturate(16u).Value(), ir.Constant(8u)))); + writeOperand(inst.destination, &result.Value()); + return true; +} + +bool TranslationContext::vMulLegacyF32(const RdnaInstruction& inst, bool accumulate) { + IrValue* lhs = readOperand(sourceAt(inst, 0u), IrType::F32); + IrValue* rhs = readOperand(sourceAt(inst, 1u), IrType::F32); + const auto isZero = [&](IrValue* value) { return IrU1(ir.IEqual(ir.BitwiseAnd(ir.BitCastU32(*value), ir.Constant(0x7fffffffu)), ir.Constant(0u))); }; + const IrU1 zero(ir.LogicalOr(isZero(lhs).Value(), isZero(rhs).Value())); + IrValue* result = &ir.Emit(IrOpcode::SelectF32, IrType::F32, {&zero.Value(), &ir.ConstantF32(0.0f), &ir.Emit(IrOpcode::FPMul32, IrType::F32, {lhs, rhs})}); + if (accumulate) { + IrValue* addend = readOperand(accumulatorOperand(inst), IrType::F32); + result = &ir.Emit(IrOpcode::FPAdd32, IrType::F32, {result, addend}); + } + writeOperand(inst.destination, result); + return true; +} + +void TranslationContext::emitFloat16ClassCompare(const RdnaInstruction& inst, bool cmpx) { + const IrU32 bits = readF16Bits(sourceAt(inst, 0u)); + const IrU32 mask = readU32(sourceAt(inst, 1u)); + const IrU32 magnitude(ir.BitwiseAnd(bits.Value(), ir.Constant(0x7fffu))); + const IrU1 negative(ir.INotEqual(ir.BitwiseAnd(bits.Value(), ir.Constant(0x8000u)), ir.Constant(0u))); + const auto pick = [&](std::uint32_t negativeClass, std::uint32_t positiveClass) { + return IrU32(ir.Select(negative.Value(), ir.Constant(negativeClass), ir.Constant(positiveClass))); + }; + IrU32 kind = pick(3u, 8u); + kind = IrU32(ir.Select(ir.ULessThan(magnitude.Value(), ir.Constant(0x400u)), pick(4u, 7u).Value(), kind.Value())); + kind = IrU32(ir.Select(ir.IEqual(magnitude.Value(), ir.Constant(0u)), pick(5u, 6u).Value(), kind.Value())); + kind = IrU32(ir.Select(ir.IEqual(magnitude.Value(), ir.Constant(0x7c00u)), pick(2u, 9u).Value(), kind.Value())); + const IrU1 nan(ir.UGreaterThan(magnitude.Value(), ir.Constant(0x7c00u))); + const IrU32 nanKind(ir.Select(ir.INotEqual(ir.BitwiseAnd(magnitude.Value(), ir.Constant(0x200u)), ir.Constant(0u)), ir.Constant(1u), ir.Constant(0u))); + kind = IrU32(ir.Select(nan.Value(), nanKind.Value(), kind.Value())); + const IrU1 hit(ir.INotEqual(ir.BitwiseAnd(ir.ShiftRightLogical(mask.Value(), kind.Value()), ir.Constant(1u)), ir.Constant(0u))); + emitCompareResult(inst, hit, false, cmpx); +} + bool TranslationContext::floatUnary(const RdnaInstruction& inst, IrOpcode opcode) { IrValue* argument = readOperand(sourceAt(inst, 0u), IrOpcodeArgumentType(opcode, 0u)); IrValue& result = ir.Emit(opcode, IrOpcodeType(opcode), {argument}); diff --git a/core/shader/recompiler/Translation/src/VectorInstructions.cpp b/core/shader/recompiler/Translation/src/VectorInstructions.cpp index 7a0c9c228..35db2b97c 100644 --- a/core/shader/recompiler/Translation/src/VectorInstructions.cpp +++ b/core/shader/recompiler/Translation/src/VectorInstructions.cpp @@ -352,6 +352,32 @@ bool TranslationContext::emitVector(const RdnaInstruction& inst) { case RdnaOpcode::VCmpUF32: emitFloatOrderedCompare(inst, false); return true; + case RdnaOpcode::VCmpClassF16: + emitFloat16ClassCompare(inst, false); + return true; + case RdnaOpcode::VCmpxClassF16: + emitFloat16ClassCompare(inst, true); + return true; + case RdnaOpcode::VLdexpF16: + return vLdexpF16(inst); + case RdnaOpcode::VFrexpMantF16: + return vFrexpF16(inst, false); + case RdnaOpcode::VFrexpExpI16F16: + return vFrexpF16(inst, true); + case RdnaOpcode::VCvtNormI16F16: + return vCvtNormF16(inst, true); + case RdnaOpcode::VCvtNormU16F16: + return vCvtNormF16(inst, false); + case RdnaOpcode::VCvtPknormI16F16: + return vCvtPknormF16(inst, true); + case RdnaOpcode::VCvtPknormU16F16: + return vCvtPknormF16(inst, false); + case RdnaOpcode::VSatPkU8I16: + return vSatPkU8I16(inst); + case RdnaOpcode::VMulLegacyF32: + return vMulLegacyF32(inst, false); + case RdnaOpcode::VMacLegacyF32: + return vMulLegacyF32(inst, true); case RdnaOpcode::VCmpClassF32: emitFloatClassCompare(inst, false); return true;