[PATCH] D83560: [DebugInfo] Emit DW_OP_implicit_value for Floating point constants

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 2 09:15:04 PDT 2020


MaskRay added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp:228
+  int NumBytes = RawBytes.getBitWidth() / 8;
+  const char *Data = (const char *)RawBytes.getRawData();
+  emitOp(dwarf::DW_OP_implicit_value);
----------------
The bit ordering is different on SPARC V9, PowerPC, etc. Use `write*` from https://github.com/llvm/llvm-project/blob/master/llvm/include/llvm/Support/Endian.h#L415


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp:237
+  if (NumBytes == 10 /*long double*/) {
+    // long double IEEE representation uses 80 bits(10 bytes).
+    // 6 bytes are padded to make it 128 bits(16 bytes) due to
----------------
This is x86_fp80 instead of IEEE 754 quadruple-precision floating-point format.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83560



More information about the llvm-commits mailing list