summaryrefslogtreecommitdiffstats
path: root/libunwind/include
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-07-20 23:56:42 +0000
committerEric Fiselier <eric@efcs.ca>2016-07-20 23:56:42 +0000
commit19f802ff68361af0a28c8ad6e12daf9bd740b96d (patch)
treecad3b5e1c754736595117f2717b0f6949104ebf7 /libunwind/include
parentde337b876f6aa366a91ca2a33603555d05f72a38 (diff)
downloadbcm5719-llvm-19f802ff68361af0a28c8ad6e12daf9bd740b96d.tar.gz
bcm5719-llvm-19f802ff68361af0a28c8ad6e12daf9bd740b96d.zip
[libunwind] Properly align _Unwind_Exception.
Summary: _Unwind_Exception is required to be double word aligned. Currently the struct is under aligned. Reviewers: mclow.lists, compnerd, kledzik, emaste Subscribers: emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D22543 llvm-svn: 276215
Diffstat (limited to 'libunwind/include')
-rw-r--r--libunwind/include/unwind.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/libunwind/include/unwind.h b/libunwind/include/unwind.h
index 8f0ef9222b0..0e01a2c50eb 100644
--- a/libunwind/include/unwind.h
+++ b/libunwind/include/unwind.h
@@ -122,13 +122,16 @@ struct _Unwind_Exception {
uintptr_t private_1; // non-zero means forced unwind
uintptr_t private_2; // holds sp that phase1 found for phase2 to use
#ifndef __LP64__
- // The gcc implementation of _Unwind_Exception used attribute mode on the
- // above fields which had the side effect of causing this whole struct to
+ // The implementation of _Unwind_Exception uses an attribute mode on the
+ // above fields which has the side effect of causing this whole struct to
// round up to 32 bytes in size. To be more explicit, we add pad fields
// added for binary compatibility.
uint32_t reserved[3];
#endif
-};
+ // The Itanium ABI requires that _Unwind_Exception objects are "double-word
+ // aligned". GCC has interpreted this to mean "use the maximum useful
+ // alignment for the target"; so do we.
+} __attribute__((__aligned__));
typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
(int version,
OpenPOWER on IntegriCloud