[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
- [PATCH 0/6] TriCore PCXI/ICR register fixes, Bastian Koppelmann, 2023/05/19
- [PATCH 1/6] tests/tcg/tricore: Move asm tests into 'asm' directory, Bastian Koppelmann, 2023/05/19
- [PATCH 2/6] tests/tcg/tricore: Uses label for memory addresses, Bastian Koppelmann, 2023/05/19
- [PATCH 3/6] tests/tcg/tricore: Add first C program, Bastian Koppelmann, 2023/05/19
- [PATCH 4/6] target/tricore: Refactor PCXI/ICR register fields, Bastian Koppelmann, 2023/05/19
- [PATCH 6/6] tests/tcg/tricore: Add recursion test for CSAs, Bastian Koppelmann, 2023/05/19
- [PATCH 5/6] target/tricore: Fix wrong PSW for call insns, Bastian Koppelmann, 2023/05/19