[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-devel
Subject:    Re: [Qemu-devel] [PATCH 07/10] target-s390: Fix STIDP
From:       Richard Henderson <rth () twiddle ! net>
Date:       2013-09-30 19:48:14
Message-ID: 5249D57E.2040003 () twiddle ! net
[Download RAW message or body]

On 09/30/2013 11:13 AM, Alexander Graf wrote:
>> -    int cpu_num;
>> +    union {
>> +        uint64_t cpuid;
>> +        struct {
>> +#ifdef HOST_WORDS_BIGENDIAN
>> +            uint32_t cpu_num;
>> +            uint32_t machine_type;
>> +#else
>> +            uint32_t machine_type;
>> +            uint32_t cpu_num;
>> +#endif
> 
> Are we guaranteed that we don't need to pack? Also anonymous unions/structs are
> a gcc extension IIRC. And why do you swap endianness here, but not above when
> defining the machine_type value?

(1) I can't imagine that we would; such struct/unions are used all over.
(2) Sure, but we've so many other gcc extensions I figured it didn't matter.
(3) Of course.  I want host endianness, not target endianness.


r~

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic