mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-26 17:51:02 +00:00
6bad02c320
- For 32- and 64-bit floats, overflow is a parse error This works around a difference between Xcode's istringstream and other platforms. Xcode's runtime library will happlily "round up" overflow values to infinity. We want to make it fail. - When parsing a float fails due to bad syntax, follow C++11 behaviour for operator>> and set the value to zero. - When parsing a 32-bit or 64-bit float overflows, follow C++11 behaviour for operator>> and set the value to the nearest normal value: either max or lowest finite value for the type. - Add FloatProxy<T>::max() and ::lowest() - Make 16-bit overflow behaviour more consistent: we always get a 16-bit infinity of the right sign, whether the original string is a normal value for 32-bit or an overflow value for 32-bit. That matches our earlier intent. Added TODO's to make 16-bit overflow always an error, just like for 32-bit and 64-bit. - Simplify normal parsing of Float16 values by delegating to normal parsing of 32-bit floats. |
||
---|---|---|
.. | ||
AssemblyContext.cpp | ||
AssemblyFormat.cpp | ||
BinaryDestroy.cpp | ||
BinaryEndianness.cpp | ||
BinaryHeaderGet.cpp | ||
BinaryParse.cpp | ||
BinaryToText.cpp | ||
BinaryToText.Literal.cpp | ||
Comment.cpp | ||
DiagnosticDestroy.cpp | ||
DiagnosticPrint.cpp | ||
DiagnosticStream.cpp | ||
ExtInst.OpenCL.std.cpp | ||
ExtInstGLSLstd450.cpp | ||
FixWord.cpp | ||
GeneratorMagicNumber.cpp | ||
HexFloat.cpp | ||
ImmediateInt.cpp | ||
LibspirvMacros.cpp | ||
main.cpp | ||
NamedId.cpp | ||
OpcodeMake.cpp | ||
OpcodeRequiresCapabilities.cpp | ||
OpcodeSplit.cpp | ||
OpcodeTableGet.cpp | ||
operand-class-test-coverage.csv | ||
Operand.cpp | ||
OperandCapabilities.cpp | ||
OperandPattern.cpp | ||
TestFixture.h | ||
TextAdvance.cpp | ||
TextDestroy.cpp | ||
TextLiteral.cpp | ||
TextStartsNewInst.cpp | ||
TextToBinary.Annotation.cpp | ||
TextToBinary.Barrier.cpp | ||
TextToBinary.Constant.cpp | ||
TextToBinary.ControlFlow.cpp | ||
TextToBinary.cpp | ||
TextToBinary.Debug.cpp | ||
TextToBinary.DeviceSideEnqueue.cpp | ||
TextToBinary.Extension.cpp | ||
TextToBinary.Function.cpp | ||
TextToBinary.Group.cpp | ||
TextToBinary.Image.cpp | ||
TextToBinary.Literal.cpp | ||
TextToBinary.Memory.cpp | ||
TextToBinary.Miscellaneous.cpp | ||
TextToBinary.ModeSetting.cpp | ||
TextToBinary.TypeDeclaration.cpp | ||
TextWordGet.cpp | ||
UnitSPIRV.cpp | ||
UnitSPIRV.h | ||
Validate.Capability.cpp | ||
Validate.Layout.cpp | ||
Validate.SSA.cpp | ||
Validate.Storage.cpp | ||
ValidateFixtures.cpp | ||
ValidateFixtures.h | ||
ValidateID.cpp | ||
ValidationState.cpp |