|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [xen-unstable test] 16231: regressions - FAIL
On Mon, 2013-02-25 at 09:19 +0000, Ian Campbell wrote:
> The problem is the use of '#pragma pack(4)' when building the foreign
> headers on x86_32.
IIRC this is to deal with the fact that on x86_32 8-byte types are
4-byte aligned when they are within a struct. This is not the case on
32-bit ARM. The following skanky test on armv7 returns:
align of uint32_t 4
align of uint64_t 8
align of struct foo.t32 4
align of struct foo.t64 8
Compared with x86_32:
align of uint32_t 4
align of uint64_t 8
align of struct foo.t32 4
align of struct foo.t64 4
Ian
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
struct foo
{
uint32_t t32;
uint64_t t64;
};
int main (void)
{
struct foo f;
printf("align of uint32_t %d\n", __alignof__(uint32_t));
printf("align of uint64_t %d\n", __alignof__(uint64_t));
printf("align of struct foo.t32 %d\n", __alignof__(f.t32));
printf("align of struct foo.t64 %d\n", __alignof__(f.t64));
return 0;
}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |