[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/11] target/openrisc: Prefer cached CpuClass over CPU_GET_CLASS
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 11/11] target/openrisc: Prefer cached CpuClass over CPU_GET_CLASS() macro |
Date: |
Tue, 21 Jan 2025 12:40:56 +0100 |
CpuState caches its CPUClass since commit 6fbdff87062
("cpu: cache CPUClass in CPUState for hot code paths"),
use it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/openrisc/gdbstub.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/target/openrisc/gdbstub.c b/target/openrisc/gdbstub.c
index c2a77d5d4d5..7b6a31fc97d 100644
--- a/target/openrisc/gdbstub.c
+++ b/target/openrisc/gdbstub.c
@@ -47,11 +47,10 @@ int openrisc_cpu_gdb_read_register(CPUState *cs, GByteArray
*mem_buf, int n)
int openrisc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
{
- CPUClass *cc = CPU_GET_CLASS(cs);
CPUOpenRISCState *env = cpu_env(cs);
uint32_t tmp;
- if (n > cc->gdb_num_core_regs) {
+ if (n > cs->cc->gdb_num_core_regs) {
return 0;
}
--
2.47.1
- Re: [PATCH 05/11] disas: Prefer cached CpuClass over CPU_GET_CLASS() macro, (continued)
- [PATCH 04/11] user: Prefer cached CpuClass over CPU_GET_CLASS() macro, Philippe Mathieu-Daudé, 2025/01/21
- [PATCH 06/11] gdbstub: Prefer cached CpuClass over CPU_GET_CLASS() macro, Philippe Mathieu-Daudé, 2025/01/21
- [PATCH 07/11] hw/acpi: Prefer cached CpuClass over CPU_GET_CLASS() macro, Philippe Mathieu-Daudé, 2025/01/21
- [PATCH 09/11] target/arm: Prefer cached CpuClass over CPU_GET_CLASS() macro, Philippe Mathieu-Daudé, 2025/01/21
- [PATCH 11/11] target/openrisc: Prefer cached CpuClass over CPU_GET_CLASS() macro,
Philippe Mathieu-Daudé <=
- [PATCH 08/11] hw/core/generic-loader: Prefer cached CpuClass over CPU_GET_CLASS macro, Philippe Mathieu-Daudé, 2025/01/21
- [PATCH 10/11] target/microblaze: Prefer cached CpuClass over CPU_GET_CLASS() macro, Philippe Mathieu-Daudé, 2025/01/21