compiler.h: add QEMU_ALIGNED() to enforce struct alignment

Reviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Message-Id: <1465412133-3029-2-git-send-email-cota@braap.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
Emilio G. Cota 2016-06-08 14:55:19 -04:00 committed by Richard Henderson
parent a93c1bdf0b
commit 911a4d2215
1 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,8 @@
# define QEMU_PACKED __attribute__((packed))
#endif
#define QEMU_ALIGNED(X) __attribute__((aligned(X)))
#ifndef glue
#define xglue(x, y) x ## y
#define glue(x, y) xglue(x, y)