qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] cpu_defs: Simplify CPUTLB padding logic


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] cpu_defs: Simplify CPUTLB padding logic
Date: Mon, 6 Jul 2015 11:00:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1


On 06/07/2015 10:58, Peter Crosthwaite wrote:
>> > Which compiler version started implementing anonymous structs?
>> >
> ISO C11 standardises it apparently. But various parts of the tree use
> them now. target-arm/cpu.h, target-i386/kvm.c,
> linux-user/syscall_defs.h and linux-headers/linux/kvm.h have liberal
> use to name a few. I have seen it used in devs from time to time for
> unionifying individual registers with an array form for SW access.
> 
> This led me to consider it open season on anonymous structs and unions.

Ok, I wasn't sure about anonymous structs.  We definitely use anonymous
unions a lot.

>> > Or can we just add
>> >
>> >          __attribute__((__aligned__(1 << CPU_TLB_ENTRY_BITS)))
>> >
> Is that more or less standard than anonymous structs?

Not standard (though there is something in C11 too) but decades old as a
GCC extension.

Paolo



reply via email to

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