mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
user: Prefer cached CpuClass over CPU_GET_CLASS() macro
CpuState caches its CPUClass since commit 6fbdff8706
("cpu: cache CPUClass in CPUState for hot code paths"),
use it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250122093028.52416-7-philmd@linaro.org>
This commit is contained in:
parent
e27fa95fb9
commit
18b3abb722
3 changed files with 5 additions and 5 deletions
|
@ -1034,7 +1034,7 @@ void process_pending_signals(CPUArchState *env)
|
||||||
void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr,
|
void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr,
|
||||||
MMUAccessType access_type, bool maperr, uintptr_t ra)
|
MMUAccessType access_type, bool maperr, uintptr_t ra)
|
||||||
{
|
{
|
||||||
const TCGCPUOps *tcg_ops = CPU_GET_CLASS(cpu)->tcg_ops;
|
const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops;
|
||||||
|
|
||||||
if (tcg_ops->record_sigsegv) {
|
if (tcg_ops->record_sigsegv) {
|
||||||
tcg_ops->record_sigsegv(cpu, addr, access_type, maperr, ra);
|
tcg_ops->record_sigsegv(cpu, addr, access_type, maperr, ra);
|
||||||
|
@ -1050,7 +1050,7 @@ void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr,
|
||||||
void cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr,
|
void cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr,
|
||||||
MMUAccessType access_type, uintptr_t ra)
|
MMUAccessType access_type, uintptr_t ra)
|
||||||
{
|
{
|
||||||
const TCGCPUOps *tcg_ops = CPU_GET_CLASS(cpu)->tcg_ops;
|
const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops;
|
||||||
|
|
||||||
if (tcg_ops->record_sigbus) {
|
if (tcg_ops->record_sigbus) {
|
||||||
tcg_ops->record_sigbus(cpu, addr, access_type, ra);
|
tcg_ops->record_sigbus(cpu, addr, access_type, ra);
|
||||||
|
|
|
@ -15,7 +15,7 @@ static int open_cpuinfo(CPUArchState *cpu_env, int fd)
|
||||||
const char *p, *q;
|
const char *p, *q;
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
p = object_class_get_name(OBJECT_CLASS(CPU_GET_CLASS(env_cpu(cpu_env))));
|
p = object_class_get_name(OBJECT_CLASS(env_cpu(cpu_env)->cc));
|
||||||
q = strchr(p, '-');
|
q = strchr(p, '-');
|
||||||
t = q - p;
|
t = q - p;
|
||||||
assert(t < sizeof(model));
|
assert(t < sizeof(model));
|
||||||
|
|
|
@ -753,7 +753,7 @@ void force_sigsegv(int oldsig)
|
||||||
void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr,
|
void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr,
|
||||||
MMUAccessType access_type, bool maperr, uintptr_t ra)
|
MMUAccessType access_type, bool maperr, uintptr_t ra)
|
||||||
{
|
{
|
||||||
const TCGCPUOps *tcg_ops = CPU_GET_CLASS(cpu)->tcg_ops;
|
const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops;
|
||||||
|
|
||||||
if (tcg_ops->record_sigsegv) {
|
if (tcg_ops->record_sigsegv) {
|
||||||
tcg_ops->record_sigsegv(cpu, addr, access_type, maperr, ra);
|
tcg_ops->record_sigsegv(cpu, addr, access_type, maperr, ra);
|
||||||
|
@ -769,7 +769,7 @@ void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr,
|
||||||
void cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr,
|
void cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr,
|
||||||
MMUAccessType access_type, uintptr_t ra)
|
MMUAccessType access_type, uintptr_t ra)
|
||||||
{
|
{
|
||||||
const TCGCPUOps *tcg_ops = CPU_GET_CLASS(cpu)->tcg_ops;
|
const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops;
|
||||||
|
|
||||||
if (tcg_ops->record_sigbus) {
|
if (tcg_ops->record_sigbus) {
|
||||||
tcg_ops->record_sigbus(cpu, addr, access_type, ra);
|
tcg_ops->record_sigbus(cpu, addr, access_type, ra);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue