SPIRV-Tools/test
David Neto 6bad02c320 Float literal parsing fixes
- 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.
2016-02-12 16:01:42 -05:00
..
AssemblyContext.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
AssemblyFormat.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
BinaryDestroy.cpp Made compilation with gcc and clang more strict. 2016-01-11 10:54:20 -05:00
BinaryEndianness.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
BinaryHeaderGet.cpp Made compilation with gcc and clang more strict. 2016-01-11 10:54:20 -05:00
BinaryParse.cpp Fix endian-ness conversion in the binary parser. 2016-01-11 13:54:30 -05:00
BinaryToText.cpp Add disassembler option to show byte offset 2016-01-20 17:07:30 -05:00
BinaryToText.Literal.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
Comment.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
DiagnosticDestroy.cpp spvDiagnosticDestroy is safe to call on nullptr 2016-01-11 14:26:46 -05:00
DiagnosticPrint.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
DiagnosticStream.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
ExtInst.OpenCL.std.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
ExtInstGLSLstd450.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
FixWord.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
GeneratorMagicNumber.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
HexFloat.cpp Float literal parsing fixes 2016-02-12 16:01:42 -05:00
ImmediateInt.cpp Made compilation with gcc and clang more strict. 2016-01-11 10:54:20 -05:00
LibspirvMacros.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
main.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
NamedId.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
OpcodeMake.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
OpcodeRequiresCapabilities.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
OpcodeSplit.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
OpcodeTableGet.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
operand-class-test-coverage.csv Add negative-coverage location to operand-class-test-coverage.csv. 2015-10-26 12:55:33 -04:00
Operand.cpp Add spvOperandIsConcreteMask 2016-02-02 12:05:34 -05:00
OperandCapabilities.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
OperandPattern.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TestFixture.h Made compilation with gcc and clang more strict. 2016-01-11 10:54:20 -05:00
TextAdvance.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextDestroy.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextLiteral.cpp More parsing tests for literals with leading minus 2016-02-08 16:56:41 -05:00
TextStartsNewInst.cpp Fixed use-after-free in isStartOfNewInst() tests. 2016-01-12 14:47:24 -05:00
TextToBinary.Annotation.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextToBinary.Barrier.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextToBinary.Constant.cpp Float literal parsing fixes 2016-02-12 16:01:42 -05:00
TextToBinary.ControlFlow.cpp Support 16-bit float in assembler and disassembler 2016-01-08 10:48:39 -05:00
TextToBinary.cpp Float literal parsing fixes 2016-02-12 16:01:42 -05:00
TextToBinary.Debug.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextToBinary.DeviceSideEnqueue.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextToBinary.Extension.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextToBinary.Function.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextToBinary.Group.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextToBinary.Image.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextToBinary.Literal.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextToBinary.Memory.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextToBinary.Miscellaneous.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextToBinary.ModeSetting.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextToBinary.TypeDeclaration.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
TextWordGet.cpp Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
UnitSPIRV.cpp Support 16-bit float in assembler and disassembler 2016-01-08 10:48:39 -05:00
UnitSPIRV.h Made compilation with gcc and clang more strict. 2016-01-11 10:54:20 -05:00
Validate.Capability.cpp Use AssemblyGrammar for capability validation. 2016-02-02 11:40:05 -05:00
Validate.Layout.cpp Allow Op[No]Line between OpFunctionParameters. 2016-02-03 10:26:59 -05:00
Validate.SSA.cpp Add missing branch instructions in SSA tests 2016-01-14 09:48:29 -05:00
Validate.Storage.cpp Forbid Generic variables. 2016-01-29 17:08:41 -05:00
ValidateFixtures.cpp Allow Op[No]Line between OpFunctionParameters. 2016-02-03 10:26:59 -05:00
ValidateFixtures.h Function and block layout checks. very basic CFG. 2016-01-13 10:06:58 -05:00
ValidateID.cpp Make IsTypeNullable a transitive check. 2016-02-04 15:34:47 -05:00
ValidationState.cpp Use AssemblyGrammar for capability validation. 2016-02-02 11:40:05 -05:00