qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 5/7] target/m68k: add moves


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 5/7] target/m68k: add moves
Date: Tue, 16 Jan 2018 12:06:48 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 01/16/2018 09:48 AM, Laurent Vivier wrote:
> Le 15/01/2018 à 19:37, Richard Henderson a écrit :
>> On 01/12/2018 04:43 PM, Laurent Vivier wrote:
> ...
>>> -    dc->user = (env->sr & SR_S) == 0;
>>> +#if defined(CONFIG_SOFTMMU)
>>> +    dc->user = (env->sr & SR_S) == 0 ? M68K_USER_FROM_MSR : 0;
>>> +    dc->user |= (env->sfc & 4) == 0 ? M68K_USER_FROM_SFC : 0;
>>> +    dc->user |= (env->dfc & 4) == 0 ? M68K_USER_FROM_DFC : 0;
>>> +#endif
>>
>> Really you should be extracting these from tb->flags.
> 
> Do I need to keep the dc->user variable?

Not necessarily.  Depends on whether it's more convenient to access.

>> You also need to end the TB when assigning to SFC and DFC.  Otherwise the
>> generated code is not in sync with the register contents.
> 
> I checked that and SFC and DFC are assigned by movec, and movec ends
> with gen_lookup_tb() that set s->is_jmp to DISAS_UPDATE, and this forces
> an exit from the loop and tcg_gen_exit_tb() (like move_to_sr()).

Ok, thanks.  I should have double-checked that myself.


r~



reply via email to

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