qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] Add be16_to_cpupu function


From: Fabien Chouteau
Subject: Re: [Qemu-devel] [PATCH 1/2] Add be16_to_cpupu function
Date: Fri, 12 Jul 2013 11:57:09 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

On 07/10/2013 07:25 PM, Peter Maydell wrote:
> On 10 July 2013 18:10, Fabien Chouteau <address@hidden> wrote:
>> --- a/include/qemu/bswap.h
>> +++ b/include/qemu/bswap.h
>> @@ -432,6 +432,11 @@ static inline uint32_t le32_to_cpupu(const uint32_t *p)
>>      return ldl_le_p(p);
>>  }
>>
>> +static inline uint16_t be16_to_cpupu(const uint16_t *p)
>> +{
>> +    return lduw_be_p(p);
>> +}
>> +
> 
> So these functions are preceded by the comment:
> /* Legacy unaligned versions.  Note that we never had a complete set.  */
> 
> which suggests that we shouldn't be adding new ones.
> I think the correct answer is to use lduw_be_p() directly.
> (If so it's tempting to get rid of the legacy functions
> completely since the change would be pretty mechanical.)
> 

OK noted.

Thanks,

-- 
Fabien Chouteau



reply via email to

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