summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2018-09-12 08:50:08 +0000
committerPavel Labath <pavel@labath.sk>2018-09-12 08:50:08 +0000
commitc9463097d97c654bab5f509bf388ff22caedf894 (patch)
treef8fc1af1c62b728260b6c950649c55f7aba513f6
parent6857692687979d934e188d117eadc93f48d52a0c (diff)
downloadbcm5719-llvm-c9463097d97c654bab5f509bf388ff22caedf894.tar.gz
bcm5719-llvm-c9463097d97c654bab5f509bf388ff22caedf894.zip
Reduce alignment on struct XSAVE, fixing a gcc warning
The warning is about heap-allocating a struct with bigger alignment requirements than the standard heap allocator provides. AFAICT, all uses of the XSAVE struct are already heap-allocated, so this high alignment does not actually have any effect and removing it should be NFC. I have also done some digging in the commit history. This alignment requirement was since the XSAVE struct was introduced in r180572 when adding AVX register support for linux. It does not mention the alignment specifically, so I am guessing this was just put there because the corresponging XSAVE cpu instruction requires its buffer to be 64-byte aligned. However, LLDB will not be normally reading this struct via the XSAVE instruction directly. Instead we will ask the kernel to copy the buffer saved when suspeding the inferior. This should not require such strict alignment (in fact, linux kernel will happily do this for any alignment). llvm-svn: 342029
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContext_x86.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h b/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h
index 6146dcaf7e5..e3ff492d707 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h
@@ -341,7 +341,7 @@ LLVM_PACKED_END
// x86 extensions to FXSAVE (i.e. for AVX and MPX processors)
LLVM_PACKED_START
-struct LLVM_ALIGNAS(64) XSAVE {
+struct LLVM_ALIGNAS(16) 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
OpenPOWER on IntegriCloud