diff options
author | Ian Campbell <Ian.Campbell@citrix.com> | 2013-02-26 10:12:46 +0000 |
---|---|---|
committer | Ian Jackson <Ian.Jackson@eu.citrix.com> | 2013-02-26 12:20:56 +0000 |
commit | 84fa23bc6cb949fcc5d510bcaa8905d04205c916 (patch) | |
tree | 9bd0f30813bc91dd82e8cfb5d363e4dfcdb53021 /tools/include | |
parent | 2f8c55ccefe49bb526df0eaf5fa9b7b788422208 (diff) | |
download | xen-84fa23bc6cb949fcc5d510bcaa8905d04205c916.tar.gz xen-84fa23bc6cb949fcc5d510bcaa8905d04205c916.tar.bz2 xen-84fa23bc6cb949fcc5d510bcaa8905d04205c916.zip |
tools: foreign: ensure 64 bit values are properly aligned for arm
When building the foreign headers on x86_32 we use '#pragma pack(4)' and
therefore need to explicitly align types which should be aligned to 8-byte
boundaries.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/xen-foreign/mkheader.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py index 8a784d342a..b19292ff03 100644 --- a/tools/include/xen-foreign/mkheader.py +++ b/tools/include/xen-foreign/mkheader.py @@ -20,15 +20,18 @@ footer = {}; inttypes["arm32"] = { "unsigned long" : "uint32_t", "long" : "uint32_t", - "xen_pfn_t" : "uint64_t", - "xen_ulong_t" : "uint64_t", + "xen_pfn_t" : "__align8__ uint64_t", + "xen_ulong_t" : "__align8__ uint64_t", + "uint64_t" : "__align8__ uint64_t", }; header["arm32"] = """ #define __arm___ARM32 1 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) # define __DECL_REG(n64, n32) union { uint64_t n64; uint32_t n32; } +# define __align8__ __attribute__((aligned (8))) #else # define __DECL_REG(n64, n32) uint64_t n64 +# define __align8__ FIXME #endif """; footer["arm32"] = """ @@ -38,15 +41,18 @@ footer["arm32"] = """ inttypes["arm64"] = { "unsigned long" : "__danger_unsigned_long_on_arm64", "long" : "__danger_long_on_arm64", - "xen_pfn_t" : "uint64_t", - "xen_ulong_t" : "uint64_t", + "xen_pfn_t" : "__align8__ uint64_t", + "xen_ulong_t" : "__align8__ uint64_t", + "uint64_t" : "__align8__ uint64_t", }; header["arm64"] = """ #define __aarch64___ARM64 1 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) # define __DECL_REG(n64, n32) union { uint64_t n64; uint32_t n32; } +# define __align8__ __attribute__((aligned (8))) #else # define __DECL_REG(n64, n32) uint64_t n64 +# define __align8__ FIXME #endif """; footer["arm64"] = """ |