mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
target/mips: Introduce cpu_supports_isa() taking CPUMIPSState argument
Introduce cpu_supports_isa() which takes a CPUMIPSState argument, more useful at runtime when the CPU is created (no need to call the extensive object_class_by_name()). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20201207215257.4004222-3-f4bug@amsat.org>
This commit is contained in:
@@ -310,3 +310,8 @@ MIPSCPU *mips_cpu_create_with_clock(const char *cpu_type, Clock *cpu_refclk)
|
||||
|
||||
return MIPS_CPU(cpu);
|
||||
}
|
||||
|
||||
bool cpu_supports_isa(const CPUMIPSState *env, uint64_t isa_mask)
|
||||
{
|
||||
return (env->cpu_model->insn_flags & isa_mask) != 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user