mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
target-moxie: set do_interrupt to a target-specific helper function
The value of "do_interrupt" member of CPUClass shoule be set to a target-specific function, or it will lead to a segfault like below: $ moxie-softmmu/qemu-system-moxie -M moxiesim Segmentation fault Cc: Anthony Green <green@moxielogic.com> Cc: Blue Swirl <blauwirbel@gmail.com> Cc: Andreas Färber <afaerber@suse.de> Signed-off-by: Dunrong Huang <huangdr@cloud-times.com> Signed-of-by: Anthony Green <green@moxielogic.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
5e3a0f418c
commit
5357406415
3 changed files with 7 additions and 3 deletions
|
@ -102,7 +102,7 @@ void helper_debug(CPUMoxieState *env)
|
|||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
|
||||
void do_interrupt(CPUState *env)
|
||||
void moxie_cpu_do_interrupt(CPUState *env)
|
||||
{
|
||||
env->exception_index = -1;
|
||||
}
|
||||
|
@ -147,8 +147,11 @@ int cpu_moxie_handle_mmu_fault(CPUMoxieState *env, target_ulong address,
|
|||
}
|
||||
|
||||
|
||||
void do_interrupt(CPUMoxieState *env)
|
||||
void moxie_cpu_do_interrupt(CPUState *cs)
|
||||
{
|
||||
MoxieCPU *cpu = MOXIE_CPU(cs);
|
||||
CPUMoxieState *env = &cpu->env;
|
||||
|
||||
switch (env->exception_index) {
|
||||
case MOXIE_EX_BREAK:
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue