[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv2 1/2] translator: merge max_insns into DisasCon
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCHv2 1/2] translator: merge max_insns into DisasContextBase |
Date: |
Wed, 21 Feb 2018 12:23:43 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 02/21/2018 12:17 PM, Emilio G. Cota wrote:
> On Wed, Feb 21, 2018 at 10:19:05 -0800, Richard Henderson wrote:
>> On 02/19/2018 06:26 PM, Emilio G. Cota wrote:
>>> @@ -68,6 +69,7 @@ typedef struct DisasContextBase {
>>> target_ulong pc_next;
>>> DisasJumpType is_jmp;
>>> unsigned int num_insns;
>>> + int max_insns;
>>> bool singlestep_enabled;
>>> } DisasContextBase;
>>
>> We really should pick the same type for max_insns and num_insns, which ever
>> type we settle on. I can't see how we can go wrong with unsigned...
>
> I was just trying to avoid warnings with -Wsign-compare in case
> we ever enabled it.
Well, right. That's my point. We compare num_insns < max_insns.
> Should I bother converting the "bound" variables we use for
> MIN(max_insns, bound) to unsigned as well? Or just leave them
> alone and forget about -Wsign-compare?
You could change num_insns to "int" as well.
r~