[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 20 04:57:29 PDT 2022


tbaeder updated this revision to Diff 469166.
tbaeder added a comment.

Another (and even longer) version.

Introduce special opcodes for floating point operations and pass the rounding mode to them. Also create special int->float and float->int casts so we can handle that properly.

This makes `clang/tests/SemaCXX/rouding-math.cpp` work. I've only enabled one of the two RUN lines though. The other one fails because we don't handle `CXXNewExpr`s yet.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134859/new/

https://reviews.llvm.org/D134859

Files:
  clang/lib/AST/CMakeLists.txt
  clang/lib/AST/ExprConstant.cpp
  clang/lib/AST/Interp/Boolean.h
  clang/lib/AST/Interp/ByteCodeExprGen.cpp
  clang/lib/AST/Interp/ByteCodeExprGen.h
  clang/lib/AST/Interp/Context.cpp
  clang/lib/AST/Interp/Descriptor.cpp
  clang/lib/AST/Interp/Floating.cpp
  clang/lib/AST/Interp/Floating.h
  clang/lib/AST/Interp/Integral.h
  clang/lib/AST/Interp/Interp.cpp
  clang/lib/AST/Interp/Interp.h
  clang/lib/AST/Interp/InterpStack.h
  clang/lib/AST/Interp/InterpState.h
  clang/lib/AST/Interp/Opcodes.td
  clang/lib/AST/Interp/PrimType.h
  clang/lib/AST/Interp/Primitives.h
  clang/lib/AST/Interp/State.h
  clang/test/AST/Interp/literals.cpp
  clang/test/SemaCXX/rounding-math.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134859.469166.patch
Type: text/x-patch
Size: 34501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221020/4a3f1434/attachment-0001.bin>


More information about the cfe-commits mailing list