Forum | Documentation | Website | Blog

Skip to content
  • coderJeff's avatar
    fbc: float comparisons to handle NaN's (WIP) · 94db491b
    coderJeff authored
    This is a work in progress.  Updating the floating point comparisons
    require changes in AST, IR, and all backends.  Seems useful to break
    the overall changes in to a couple of commits.  This change is focused
    on getting the new AST in place, though includes some llvm/gas64/gcc
    backend updates and leaving the gas/gas+SSE for a later update.
    
    - handle IR_EMITOPT_REL_DOINVERSE option in gcc/llvm/gas64 backends
    - gas64 x86_64 backend : re-use astGetInverseLogOp()
    - gcc backend all targets: use !(float op float) to implement reverse logic
    - llvm backend: Add floating point comparison instructions,
      Note: currently no testing completed for NaN's in LLVM
    - 'fpmode fast' will disable NaN checking - and will affect
      all backends.  Comparisons involving NaN's will be inaccurate
      however, all other comparisons of numbers (including infinities)
      should still be correct.
    - idea is to let the backend optimize float comparisons where possible
    - otherwise use safer code generation to get consistent results across
      branching, IIF, expressions, etc.
    94db491b
To find the state of this project's repository at the time of any of these versions, check out the tags.
Loading