Philippe Mathieu-Daudé <f4...@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