qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/6] target/tricore: Refactor PCXI/ICR register fields


From: Bastian Koppelmann
Subject: Re: [PATCH 4/6] target/tricore: Refactor PCXI/ICR register fields
Date: Fri, 19 May 2023 17:18:55 +0200

Hi Phil,

On Fri, May 19, 2023 at 05:02:48PM +0200, Philippe Mathieu-Daudé wrote:
[...]
> >       case OPC2_32_SYS_ENABLE:
> > -        tcg_gen_ori_tl(cpu_ICR, cpu_ICR, MASK_ICR_IE_1_3);
> > +        if (has_feature(ctx, TRICORE_FEATURE_161)) {
> > +            tcg_gen_ori_tl(cpu_ICR, cpu_ICR, R_ICR_IE_161_MASK);
> > +        } else {
> > +            tcg_gen_ori_tl(cpu_ICR, cpu_ICR, R_ICR_IE_13_MASK);
> > +        }
> >           break;
> >       case OPC2_32_SYS_ISYNC:
> >           break;
> 
> Could it be clearer to add a 'icr_ie_mask' field in CPUTriCoreState,
> initialized once in tricore_cpu_realizefn() and avoid this if/else/ in
> translation here, simply using the initialized mask?

great idea! Will do.

Cheers,
Bastian



reply via email to

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