[Lldb-commits] [PATCH] D41245: Reduce x86 register context boilerplate.
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Dec 14 08:54:38 PST 2017
labath created this revision.
labath added reviewers: clayborg, krytarowski.
Herald added a subscriber: emaste.
The x86 FPR struct (which does not store just floating point registers)
was defined as a struct containing a union between two members: XSAVE
and FXSAVE. The initial layout of these two structs is identical, which
is recognised by the fact that XSAVE has FXSAVE as its first member.
This fact means that the whole union is not necessary and we can just
use XSAVE as our "fpr" struct. This reduced the amount of typing when
accessing the struct members and (I hope) makes code a bit cleaner.
https://reviews.llvm.org/D41245
Files:
source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp
source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp
source/Plugins/Process/Utility/RegisterContextOpenBSD_x86_64.cpp
source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp
source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h
source/Plugins/Process/Utility/RegisterContext_x86.h
source/Plugins/Process/Utility/RegisterInfos_i386.h
source/Plugins/Process/Utility/RegisterInfos_x86_64.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41245.126976.patch
Type: text/x-patch
Size: 20835 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171214/b3e56fb7/attachment-0001.bin>
More information about the lldb-commits
mailing list