[Lldb-commits] [lldb] r354125 - Remove alignment from struct XSAVE altogether

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 15 04:20:23 PST 2019


Author: labath
Date: Fri Feb 15 04:20:23 2019
New Revision: 354125

URL: http://llvm.org/viewvc/llvm-project?rev=354125&view=rev
Log:
Remove alignment from struct XSAVE altogether

I reduced the alignment of this struct in r342029 to avoid compiler
warnings about under-aligned allocations, but it turns out that this
still causes problems with some compilers (see r353778). As I hinted in
r342029, I don't believe any special aligment is necessary here (the
only reason for that would be if we used some aligned SSE instructions to
access this buffer, but I don't see any reason why we should do that),
so here I go all the way, and remove the alignment requirements (except
the ones naturally imposed by basic types) altogether.

Modified:
    lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h?rev=354125&r1=354124&r2=354125&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h Fri Feb 15 04:20:23 2019
@@ -340,7 +340,7 @@ LLVM_PACKED_END
 
 // x86 extensions to FXSAVE (i.e. for AVX and MPX processors)
 LLVM_PACKED_START
-struct LLVM_ALIGNAS(16) XSAVE {
+struct XSAVE {
   FXSAVE i387;      // floating point registers typical in i387_fxsave_struct
   XSAVE_HDR header; // The xsave_hdr_struct can be used to determine if the
                     // following extensions are usable




More information about the lldb-commits mailing list