qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/3] cputlb: Replace switches in load/store_help


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 2/3] cputlb: Replace switches in load/store_helper with callback
Date: Wed, 11 Sep 2019 09:22:39 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 9/11/19 6:55 AM, Tony Nguyen wrote:
>>  typedef uint64_t FullLoadHelper(CPUArchState *env, target_ulong addr,
>>                                  TCGMemOpIdx oi, uintptr_t retaddr);
>> +typedef uint64_t DirectLoadHelper(const void *);
> 
> Would 'Load' instead of 'DirectLoadHelper' have enough clarity?

I suppose so, yes.

> If so, consider also dropping the 'direct_' prefix in the functions below.
> 
>> +
>> +static inline uint64_t direct_ldub(const void *haddr)
>> +{
>> +    return *(uint8_t *)haddr;
>> +}
>> +
>> +static inline uint64_t direct_lduw_be(const void *haddr)
>> +{
>> +    return lduw_be_p(haddr);
>> +}

I would be hesitant to call this just "lduw_be"; I think that's confusing when
it's calling lduw_be_p.  But perhaps "wrap_*" or "wide_*"?


r~



reply via email to

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