qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 16/21] accel/tcg: actually cache our partial icount TB


From: Alex Bennée
Subject: Re: [PATCH v2 16/21] accel/tcg: actually cache our partial icount TB
Date: Fri, 12 Feb 2021 17:06:24 +0000
User-agent: mu4e 1.5.8; emacs 28.0.50

Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> On 2/11/21 7:48 PM, Richard Henderson wrote:
>> On 2/11/21 2:21 AM, Philippe Mathieu-Daudé wrote:
>>>> -    insns_left = MIN(0xffff, cpu->icount_budget);
>>>> +    insns_left = MIN(CF_COUNT_MASK, cpu->icount_budget);
>>>
>>> Can you describe this change a bit please?
>> 
>> Replacing a magic number with its proper symbol.
>
> I am confuse because I see:
>
> #define CF_COUNT_MASK  0x00007fff

This is the largest partial count you can store in the CF flags (0x8000
is used for LAST_IO). The decrement field can handle the full u16
although in practice I would never expect a final block to be more than
a few instructions. We could probably shorten the mask without any
deleterious effect if we needed to scrape together any more CFLAGS.

-- 
Alex Bennée



reply via email to

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