mirror of
https://github.com/siemens-mobile-hacks/llvm-c166.git
synced 2026-11-25 21:45:57 +00:00
## Problem DWARF permits the operand of `DW_OP_convert` to reference a floating-point base type. LLDB instead stops while resolving such a DIE and reports `unsupported encoding`. This also breaks expressions that only use the float as an intermediate value, such as converting zero to float32 and then back to the generic type. ## Change Carry the base type's DWARF encoding into the expression evaluator so it can distinguish integer and floating-point destinations. Float32, float64, and x87 float80 are mapped to their corresponding `APFloat` semantics. The conversion rules are now: - integer to float and float precision changes use nearest-ties-to-even; - float to integer uses toward-zero; - NaN, integer overflow, unsupported float widths, and impractical integer widths produce evaluation errors. The existing integer truncation and extension behavior, including conversion to the generic address-sized unsigned type, is unchanged. ## Tests Extend `DWARFExpression.DW_OP_convert` with the reported expression and cover 32-, 64-, and 80-bit float targets, precision narrowing, positive and negative toward-zero conversion, NaN and range errors, excessive integer widths, and the existing malformed-DIE paths. Fixes #202605 |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| DiagnosticManager.cpp | ||
| DWARFExpression.cpp | ||
| DWARFExpressionList.cpp | ||
| Expression.cpp | ||
| ExpressionParser.cpp | ||
| ExpressionTypeSystemHelper.cpp | ||
| ExpressionVariable.cpp | ||
| FunctionCaller.cpp | ||
| IRExecutionUnit.cpp | ||
| IRInterpreter.cpp | ||
| IRMemoryMap.cpp | ||
| LLVMUserExpression.cpp | ||
| Materializer.cpp | ||
| ObjectFileJIT.cpp | ||
| REPL.cpp | ||
| UserExpression.cpp | ||
| UtilityFunction.cpp | ||