aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-11-28 10:56:54 +0000
committerPavel Labath <labath@google.com>2017-11-28 10:56:54 +0000
commitd2cfe0e59738bbc8eeaf3f7933b28f5d4ad97b95 (patch)
tree5f2571e17915346713ea61f43314f3097ac47da1 /llvm/lib/CodeGen/MachineFunction.cpp
parent1d67a4812498a920dff71ab7ede2e3c326c229bc (diff)
downloadllvm-d2cfe0e59738bbc8eeaf3f7933b28f5d4ad97b95.zip
llvm-d2cfe0e59738bbc8eeaf3f7933b28f5d4ad97b95.tar.gz
llvm-d2cfe0e59738bbc8eeaf3f7933b28f5d4ad97b95.tar.bz2
Fix floating point register write on new x86 linux kernels
Summary: New linux kernels (on systems that support the XSAVES instruction) will not update the inferior registers unless the corresponding flag in the XSAVE header is set. Normally this flag will be set in our image of the XSAVE area (since we obtained it from the kernel), but if the inferior has never used the corresponding register set, the respective flag can be clear. This fixes the issue by making sure we explicitly set the flags corresponding to the registers we modify. I don't try to precisely match the flags to set on each write, as the rules could get quite complicated -- I use a simpler over-approximation instead. This was already caught by test_fp_register_write, but that was only because the code that ran before main() did not use some of the register sets. Since nothing in this test relies on being stopped in main(), I modify the test to stop at the entry point instead, so we can be sure the inferior did not have a chance to access these registers. Reviewers: clayborg, valentinagiusti Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D40434 llvm-svn: 319161
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions