qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] tcg-arm: Implement tcg_register_jit


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 1/2] tcg-arm: Implement tcg_register_jit
Date: Wed, 05 Jun 2013 05:49:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

On 06/04/2013 06:56 PM, li guang wrote:
>> > +typedef struct {
>> > +    uint32_t len __attribute__((aligned((sizeof(void *)))));
>> > +    uint32_t cie_offset;
>> > +    tcg_target_long func_start __attribute__((packed));
>> > +    tcg_target_long func_len __attribute__((packed));
> suspicious usage of packed attribute here,
> since tcg_targe_long is either 32 or 64 bits,
> not a struct or union.
> 
> Thanks!
> 

Your question is worded poorly -- what has struct/union got to do with it?  One
can adjust the alignment of any type.  Perhaps you don't know what it is that
__attribute__((packed)) actually does?

While it's true that for ARM all four of these data members are 32-bit, and
thus none of the attributes are required, it's not actually wrong.  Given that
this sort of boiler-plate tends to get copied from target to target, and since
the attributes *are* required for 64-bit hosts, I prefer to keep all such
structures defined similarly.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]