[Lldb-commits] [PATCH] D17897: Support floating point values in 128-bit SSE vector registers

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 4 14:42:00 PST 2016


aprantl created this revision.
aprantl added a reviewer: clayborg.
aprantl added a subscriber: lldb-commits.
aprantl set the repository for this revision to rL LLVM.

The System-V x86_64 ABI requires floating point values to be passed in 128-but SSE vector registers (xmm0, ...).
When printing such a variable this currently yields an <invalid load address>.

This patch makes LLDB's DWARF expression evaluator accept 128-bit registers as scalars. It also relaxes the check that the size of the result of the DWARF expression be equal to the size of the variable to a greater-than. DWARF defers to the ABI how smaller values are being placed in a larger register.

Implementation note: I found the code in Value::SetContext() that changes the m_value_type after the fact to be questionable. I added a sanity check that the Value's memory buffer has indeed been written to (this is necessary, because we may have a scalar value in a vector register), but really I feel like this is the wrong place to be setting it.

<rdar://problem/24944340>

Repository:
  rL LLVM

http://reviews.llvm.org/D17897

Files:
  include/lldb/Core/Value.h
  packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py
  packages/Python/lldbsuite/test/lang/c/register_variables/test.c
  source/Core/RegisterValue.cpp
  source/Expression/Materializer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17897.49855.patch
Type: text/x-patch
Size: 5080 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160304/0d0c47bd/attachment.bin>


More information about the lldb-commits mailing list