[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 24/30] target/mips: Move helper_cache() to tcg/sysemu/spec
From: |
Richard Henderson |
Subject: |
Re: [PATCH v3 24/30] target/mips: Move helper_cache() to tcg/sysemu/special_helper.c |
Date: |
Mon, 19 Apr 2021 13:14:55 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
On 4/19/21 12:18 PM, Philippe Mathieu-Daudé wrote:
+#define STUB_HELPER(NAME, ...) \
+ static inline void gen_helper_##NAME(__VA_ARGS__) \
+ { qemu_build_not_reached(); }
Does this really work when optimization is on? I suspect you need additional
cleanups before you can use qemu_build_not_reached().
In particular:
(1) check_cp0_enabled must return a boolean, so that the
caller can avoid emitting dead code after the
exception is emitted.
(2) check_cp0_enabled must be adjusted to Know that
cp0 access is always forbidden in user-only mode.
Otherwise, I can't see how the compiler can prove that the call to
gen_cache_operation, and thus gen_helper_cache, is unreachable.
In the meantime, you can use g_assert_not_reached() in STUB_HELPER. With that
changed,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
- [PATCH v3 17/30] target/mips: Move physical addressing code to sysemu/physaddr.c, (continued)
- [PATCH v3 17/30] target/mips: Move physical addressing code to sysemu/physaddr.c, Philippe Mathieu-Daudé, 2021/04/19
- [PATCH v3 18/30] target/mips: Restrict cpu_mips_get_random() / update_pagemask() to TCG, Philippe Mathieu-Daudé, 2021/04/19
- [PATCH v3 19/30] target/mips: Move sysemu TCG-specific code to tcg/sysemu/ subfolder, Philippe Mathieu-Daudé, 2021/04/19
- [PATCH v3 20/30] target/mips: Restrict mmu_init() to TCG, Philippe Mathieu-Daudé, 2021/04/19
- [PATCH v3 21/30] target/mips: Move tlb_helper.c to tcg/sysemu/, Philippe Mathieu-Daudé, 2021/04/19
- [PATCH v3 22/30] target/mips: Restrict CPUMIPSTLBContext::map_address() handlers scope, Philippe Mathieu-Daudé, 2021/04/19
- [PATCH v3 23/30] target/mips: Move Special opcodes to tcg/sysemu/special_helper.c, Philippe Mathieu-Daudé, 2021/04/19
- [PATCH v3 24/30] target/mips: Move helper_cache() to tcg/sysemu/special_helper.c, Philippe Mathieu-Daudé, 2021/04/19
- Re: [PATCH v3 24/30] target/mips: Move helper_cache() to tcg/sysemu/special_helper.c,
Richard Henderson <=
- [PATCH v3 25/30] target/mips: Move TLB management helpers to tcg/sysemu/tlb_helper.c, Philippe Mathieu-Daudé, 2021/04/19
- [PATCH v3 26/30] target/mips: Move exception management code to exception.c, Philippe Mathieu-Daudé, 2021/04/19
- [PATCH v3 27/30] target/mips: Move CP0 helpers to sysemu/cp0.c, Philippe Mathieu-Daudé, 2021/04/19
- [PATCH v3 28/30] target/mips: Move TCG source files under tcg/ sub directory, Philippe Mathieu-Daudé, 2021/04/19
- [PATCH v3 29/30] hw/mips: Restrict non-virtualized machines to TCG, Philippe Mathieu-Daudé, 2021/04/19
- [PATCH v3 30/30] gitlab-ci: Add KVM mips64el cross-build jobs, Philippe Mathieu-Daudé, 2021/04/19
- Re: [PATCH v3 00/30] target/mips: Re-org to allow KVM-only builds, no-reply, 2021/04/19