[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 06/26] target/mips: Extract load/store helpers to ldst_helper
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 06/26] target/mips: Extract load/store helpers to ldst_helper.c |
Date: |
Mon, 19 Apr 2021 00:46:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 4/18/21 9:08 PM, Richard Henderson wrote:
> On 4/18/21 9:31 AM, Philippe Mathieu-Daudé wrote:
>> +static inline hwaddr do_translate_address(CPUMIPSState *env,
>> + target_ulong address,
>> + MMUAccessType access_type,
>> + uintptr_t retaddr)
>> +{
>> + hwaddr paddr;
>> + CPUState *cs = env_cpu(env);
>> +
>> + paddr = cpu_mips_translate_address(env, address, access_type);
>> +
>> + if (paddr == -1LL) {
>> + cpu_loop_exit_restore(cs, retaddr);
>> + } else {
>> + return paddr;
>> + }
>> +}
>
> Code motion, so,
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
> but I think that it's a mistake for cpu_mips_translate_address to split
> the raise_mmu_exception from the cpu_loop_exit_restore. If you make the
> changes to env to indicate the exception, you *must* then go back to the
> main loop.
>
> There seems to be exactly one caller, this one, so it should be trivial
> to change, which the lets do_translate_address vanish entirely.
I'm taking note of this comment and will try to address it later.
- [PATCH 02/26] target/mips: Move IEEE rounding mode array to new source file, (continued)
- [PATCH 02/26] target/mips: Move IEEE rounding mode array to new source file, Philippe Mathieu-Daudé, 2021/04/18
- [PATCH 03/26] target/mips: Move msa_reset() to new source file, Philippe Mathieu-Daudé, 2021/04/18
- [PATCH 04/26] target/mips: Make CPU/FPU regnames[] arrays global, Philippe Mathieu-Daudé, 2021/04/18
- [PATCH 05/26] target/mips: Restrict mips_cpu_dump_state() to cpu.c, Philippe Mathieu-Daudé, 2021/04/18
- [PATCH 06/26] target/mips: Extract load/store helpers to ldst_helper.c, Philippe Mathieu-Daudé, 2021/04/18
- [PATCH 07/26] meson: Introduce meson_user_arch source set for arch-specific user-mode, Philippe Mathieu-Daudé, 2021/04/18
- [PATCH 08/26] target/mips: Introduce tcg-internal.h for TCG specific declarations, Philippe Mathieu-Daudé, 2021/04/18
- [PATCH 09/26] target/mips: Add simple user-mode mips_cpu_do_interrupt(), Philippe Mathieu-Daudé, 2021/04/18
- [PATCH 10/26] target/mips: Add simple user-mode mips_cpu_tlb_fill(), Philippe Mathieu-Daudé, 2021/04/18
- [PATCH 11/26] target/mips: Move cpu_signal_handler definition around, Philippe Mathieu-Daudé, 2021/04/18