summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-09-06 21:52:14 +0000
committerZachary Turner <zturner@google.com>2016-09-06 21:52:14 +0000
commit415a189c09210ee5bc5d2d40556e69b5230bfc6a (patch)
tree3311ddefe9d52f4223fccde38dcfab2736bfa050 /lldb/source
parent24e91bd05fec332b73a991fa1f59160ea1c1e18e (diff)
downloadbcm5719-llvm-415a189c09210ee5bc5d2d40556e69b5230bfc6a.tar.gz
bcm5719-llvm-415a189c09210ee5bc5d2d40556e69b5230bfc6a.zip
Make LLDB compile on Windows after the reformat.
Most of these issues arose as a result of header re-ordering, but it turned up a real bug, which is that MSVC doesn't support __attribute__((packed)) or __attribute__((aligned)). This was working before because there's a Windows header that #defines __attribute__(x) to nothing. We should fix this by removing that #define entirely, and dealing with the fallout separately which may turn up even more bugs. I fixed this by replacing them with the corresponding LLVM macros which understand how to do these operations on all the different compilers. llvm-svn: 280757
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContext_x86.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h b/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h
index 32e2a7fdc57..0f241d5e99b 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h
@@ -13,6 +13,8 @@
#include <cstddef>
#include <cstdint>
+#include "llvm/Support/Compiler.h"
+
//---------------------------------------------------------------------------
// i386 ehframe, dwarf regnums
//---------------------------------------------------------------------------
@@ -285,14 +287,17 @@ struct YMM {
YMMReg ymm[16]; // assembled from ymmh and xmm registers
};
+LLVM_PACKED_START
struct XSAVE_HDR {
uint64_t xstate_bv; // OS enabled xstate mask to determine the extended states
// supported by the processor
uint64_t reserved1[2];
uint64_t reserved2[5];
-} __attribute__((packed));
+};
+LLVM_PACKED_END
// x86 extensions to FXSAVE (i.e. for AVX processors)
+LLVM_PACKED_START
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
@@ -300,7 +305,8 @@ struct XSAVE {
YMMHReg ymmh[16]; // High 16 bytes of each of 16 YMM registers (the low bytes
// are in FXSAVE.xmm for compatibility with SSE)
// Slot any extensions to the register file here
-} __attribute__((packed, aligned(64)));
+} LLVM_ALIGNAS(64);
+LLVM_PACKED_END
// Floating-point registers
struct FPR {
OpenPOWER on IntegriCloud