Skip to content

Commit 098e09e

Browse files
committed
trarget/arc: Add arc_cpu_get_pc function
Signed-off-by: Yuriy Kolerov <[email protected]>
1 parent a40e352 commit 098e09e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

target/arc/cpu.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ static void arc_cpu_set_pc(CPUState *cs, vaddr value)
8181
cpu->env.pc = value;
8282
}
8383

84+
static vaddr arc_cpu_get_pc(CPUState *cs)
85+
{
86+
ARCCPU *cpu = ARC_CPU(cs);
87+
88+
return cpu->env.pc;
89+
}
90+
8491
static bool arc_cpu_has_work(CPUState *cs)
8592
{
8693
ARCCPU *cpu = ARC_CPU(cs);
@@ -436,6 +443,7 @@ static void arc_cpu_class_init(ObjectClass *oc, void *data)
436443
cc->has_work = arc_cpu_has_work;
437444
cc->dump_state = arc_cpu_dump_state;
438445
cc->set_pc = arc_cpu_set_pc;
446+
cc->get_pc = arc_cpu_get_pc;
439447
cc->disas_set_info = arc_cpu_disas_set_info;
440448
cc->gdb_arch_name = arc_gdb_arch_name;
441449
cc->tcg_ops = &arc_tcg_ops;

0 commit comments

Comments
 (0)