[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v11 22/55] target/arm: move sve_zcr_len_for_el to common_cpu
From: |
Claudio Fontana |
Subject: |
Re: [RFC v11 22/55] target/arm: move sve_zcr_len_for_el to common_cpu |
Date: |
Thu, 25 Mar 2021 22:44:22 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
On 3/24/21 11:03 PM, Richard Henderson wrote:
> On 3/23/21 9:46 AM, Claudio Fontana wrote:
>> it is required by arch-dump.c and cpu.c, so apparently
>> we need this for KVM too
>>
>> Signed-off-by: Claudio Fontana <cfontana@suse.de>
>
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
>
>> +/*
>> + * these are AARCH64-only, but due to the chain of dependencies,
>> + * between HELPER prototypes, hflags, cpreg definitions and functions in
>> + * tcg/ etc, it becomes incredibly messy to add what should be here:
>> + *
>> + * #ifdef TARGET_AARCH64
>> + */
>> +
>> +static uint32_t sve_zcr_get_valid_len(ARMCPU *cpu, uint32_t start_len)
>> +{
>> + uint32_t end_len;
>> +
>> + end_len = start_len &= 0xf;
>> + if (!test_bit(start_len, cpu->sve_vq_map)) {
>> + end_len = find_last_bit(cpu->sve_vq_map, start_len);
>> + assert(end_len < start_len);
>> + }
>> + return end_len;
>> +}
>
> I guess you could
>
> #ifdef TARGET_AARCH64
> ...
> #else
> g_assert_not_reached();
> #endif
>
> Dunno if it's worth it or not, since they're small.
>
>
> r~
>
I'll check this again. IIRC I _did_ handle the HELPER() / hflags / cpreg
problem in the end,
so it should be possible to make this actually right (ie #ifdef TARGET_AARCH64)
- [RFC v11 20/55] target/arm: split vfp state setting from tcg helpers, (continued)
- [RFC v11 20/55] target/arm: split vfp state setting from tcg helpers, Claudio Fontana, 2021/03/23
- [RFC v11 21/55] target/arm: move arm_mmu_idx* to cpu-mmu, Claudio Fontana, 2021/03/23
- [RFC v11 23/55] target/arm: move arm_sctlr away from tcg helpers, Claudio Fontana, 2021/03/23
- [RFC v11 24/55] target/arm: move arm_cpu_list to common_cpu, Claudio Fontana, 2021/03/23
- [RFC v11 22/55] target/arm: move sve_zcr_len_for_el to common_cpu, Claudio Fontana, 2021/03/23
- [RFC v11 25/55] target/arm: move aarch64_sync_32_to_64 (and vv) to cpu code, Claudio Fontana, 2021/03/23
- [RFC v11 26/55] target/arm: split a15 cpu model and 32bit class functions to cpu32.c, Claudio Fontana, 2021/03/23
- [RFC v11 30/55] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled(), Claudio Fontana, 2021/03/23