Fix rr::RoundIntClamped() for architectures other than x86 and ARM
Fix rr::RoundIntClamped() for architectures other than x86 and ARM

Previously we assumed that non-x86 architectures return clamped results
for out-of-range inputs to casting floating-point numbers to integers.
This is true at least for ARM, but not for RISC-V and possibly others.

An implementation which depends on LLVM's fptosi_sat intrinsic has been
added, which requires a recent version of LLVM. When not available, we
fall back to explicitly clamping both the upper and lower bound.

Bug: b/217573066
Bug: b/165000222
Change-Id: Ia5f1f6de395f52852044c7e1f875c1164b18f09b
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/62728
Kokoro-Result: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Tested-by: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>
Reviewed-by: Alexis Hétu <1c7141772178a7e80858c3db5052b328076f08f4@google.com>

google/swiftshader,google/swiftshader,google/swiftshader