[PATCH] D91058: [DebugInfo] Refactor code for emitting DWARF expressions for FP constants
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 20:02:09 PST 2020
dblaikie accepted this revision.
dblaikie added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp:247
+ // FIXME: Add support for `long double`.
+ if (NumBytes <= 8 /*double*/)
+ addUnsignedConstant(API, AP);
----------------
labath wrote:
> dblaikie wrote:
> > This looks like a change in behavior (now other <= 8 floating point sizes can be emitted - is it just that other such sizes are impossible/never come up? In which case maybe an assertion would be suitable?) & might possibly benefit from testing.
> Actually, it was already possible to emit the DW_OP_stack_value flavour of _Float16 (for example). This added the ability to handle the DW_OP_implicit_value form as well, because the new code layout made it harder to split the two cases. I didn't want to add a test without checking that this actually works (though I had no reason to suspect it wouldn't), but I have now verified that both gdb and lldb handle _Float16 (on arm), so I am adding a test for it.
Cool, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91058/new/
https://reviews.llvm.org/D91058
More information about the llvm-commits
mailing list