qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/3] target/mips: fix JALS32/J32 instruction handling for mic


From: Jiaxun Yang
Subject: Re: [PATCH 1/3] target/mips: fix JALS32/J32 instruction handling for microMIPS
Date: Thu, 16 Feb 2023 01:31:54 +0000
User-agent: Cyrus-JMAP/3.9.0-alpha0-156-g081acc5ed5-fm-20230206.001-g081acc5e


在2023年2月15日二月 下午8:50,Philippe Mathieu-Daudé写道:
> On 15/2/23 21:21, Richard Henderson wrote:
>> On 2/14/23 22:47, Marcin Nowakowski wrote:
>>> @@ -4860,6 +4860,7 @@ static void gen_compute_branch(DisasContext 
>>> *ctx, uint32_t opc,
>>>       target_ulong btgt = -1;
>>>       int blink = 0;
>>>       int bcond_compute = 0;
>>> +    int jal_mask = 0;
>> 
>> Better to limit the scope of the variable to the block below.
>> 
>>> @@ -4917,6 +4918,11 @@ static void gen_compute_branch(DisasContext 
>>> *ctx, uint32_t opc,
>>>           break;
>>>       case OPC_J:
>>>       case OPC_JAL:
>>> +        /* Jump to immediate */
>>> +        jal_mask = ctx->hflags & MIPS_HFLAG_M16 ? 0xF8000000 : 
>>> 0xF0000000;
>>> +        btgt = ((ctx->base.pc_next + insn_bytes) & jal_mask) |
>>> +            (uint32_t)offset;
>> 
>> Ideally we wouldn't have one huge helper function, and could pass down 
>> the mask from the translator.  But that's on-going cleanup.
>
> Yes, this is the approach taken in decodetree conversion.
>
> I hope to rebase / respin incorporating Jiaxun patches some day...

Which series are you referring?
Just caught some time so I might able to help.

>
>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> 
>> 
>> r~

-- 
- Jiaxun



reply via email to

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