-
Manually convert unsigned integer to floating-point. · 96445fe3Nicolas Capens authored
Subzero uses a helper function to convert uint to float. It's faster to just emit a sequence of operations to perform the cast manually. This implementation converts the lower 31 bits as a signed integer, and adds 0x80000000 as a floating-point value when the upper bit is set. This approach does not produce the correct rounding in rare cases, but should still be adequate. For consistency, we're also using this method with the LLVM back-end. Change-Id: Ic5d7b73cd2a9e154056365cdbe9af0962bdbe1cb Reviewed-on: https://swiftshader-review.googlesource.com/8312Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
96445fe3
×