Commit 2991b890 authored by Peter Crosthwaite's avatar Peter Crosthwaite Committed by Andreas Färber
Browse files

cpu: Add wrapper for the set_pc() hook



Add a wrapper around the CPUClass::set_pc() hook.

Signed-off-by: default avatarPeter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
parent ea3e9847
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -601,6 +601,20 @@ static inline void cpu_unaligned_access(CPUState *cpu, vaddr addr,
}
#endif

/**
 * cpu_set_pc:
 * @cpu: The CPU to set the program counter for.
 * @addr: Program counter value.
 *
 * Sets the program counter for a CPU.
 */
static inline void cpu_set_pc(CPUState *cpu, vaddr addr)
{
    CPUClass *cc = CPU_GET_CLASS(cpu);

    cc->set_pc(cpu, addr);
}

/**
 * cpu_reset_interrupt:
 * @cpu: The CPU to clear the interrupt on.