[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v6 16/18] hw/core: Add CPUClass.get_pc
From: |
Taylor Simpson |
Subject: |
RE: [PATCH v6 16/18] hw/core: Add CPUClass.get_pc |
Date: |
Fri, 30 Sep 2022 21:56:55 +0000 |
> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Friday, September 30, 2022 4:26 PM
> To: qemu-devel@nongnu.org
> Cc: peter.maydell@linux.org; alex.bennee@linux.org; Eduardo Habkost
> <eduardo@habkost.net>; Marcel Apfelbaum
> <marcel.apfelbaum@gmail.com>; Philippe Mathieu-Daudé
> <f4bug@amsat.org>; Yanan Wang <wangyanan55@huawei.com>; Michael
> Rolnik <mrolnik@gmail.com>; Edgar E. Iglesias <edgar.iglesias@gmail.com>;
> Taylor Simpson <tsimpson@quicinc.com>; Song Gao
> <gaosong@loongson.cn>; Xiaojuan Yang <yangxiaojuan@loongson.cn>;
> Laurent Vivier <laurent@vivier.eu>; Jiaxun Yang <jiaxun.yang@flygoat.com>;
> Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>; Chris Wulff
> <crwulff@gmail.com>; Marek Vasut <marex@denx.de>; Stafford Horne
> <shorne@gmail.com>; Yoshinori Sato <ysato@users.sourceforge.jp>; Mark
> Cave-Ayland <mark.cave-ayland@ilande.co.uk>; Bastian Koppelmann
> <kbastian@mail.uni-paderborn.de>; Max Filippov <jcmvbkbc@gmail.com>;
> qemu-arm@nongnu.org; qemu-ppc@nongnu.org; qemu-riscv@nongnu.org;
> qemu-s390x@nongnu.org
> Subject: [PATCH v6 16/18] hw/core: Add CPUClass.get_pc
>
> diff --git a/target/hexagon/cpu.c
> b/target/hexagon/cpu.c index fa9bd702d6..04a497db5e 100644
> --- a/target/hexagon/cpu.c
> +++ b/target/hexagon/cpu.c
> @@ -251,6 +251,13 @@ static void hexagon_cpu_set_pc(CPUState *cs,
> vaddr value)
> env->gpr[HEX_REG_PC] = value;
> }
>
> +static vaddr hexagon_cpu_get_pc(CPUState *cs) {
> + HexagonCPU *cpu = HEXAGON_CPU(cs);
> + CPUHexagonState *env = &cpu->env;
> + return env->gpr[HEX_REG_PC];
> +}
> +
> static void hexagon_cpu_synchronize_from_tb(CPUState *cs,
> const TranslationBlock *tb) {
> @@ -337,6 +344,7 @@
> static void hexagon_cpu_class_init(ObjectClass *c, void *data)
> cc->has_work = hexagon_cpu_has_work;
> cc->dump_state = hexagon_dump_state;
> cc->set_pc = hexagon_cpu_set_pc;
> + cc->get_pc = hexagon_cpu_get_pc;
> cc->gdb_read_register = hexagon_gdb_read_register;
> cc->gdb_write_register = hexagon_gdb_write_register;
> cc->gdb_num_core_regs = TOTAL_PER_THREAD_REGS + NUM_VREGS +
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>