diff options
author | Richard Henderson <rth@twiddle.net> | 2015-09-27 14:26:04 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2015-10-07 20:03:15 +1100 |
commit | a0577d2aa9bd42d5d584fa03649a166ba45c2f3d (patch) | |
tree | 3aefc90eb42de4c32213479c96d94bdfc2115dd1 /target-tilegx/cpu.c | |
parent | dd8070d865ad1b32876931f812a80645f97112ff (diff) |
target-tilegx: Use TILEGX_EXCP_SIGNAL instead of TILEGX_EXCP_SEGV
Consolidate signal handling under a single exception.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-tilegx/cpu.c')
-rw-r--r-- | target-tilegx/cpu.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/target-tilegx/cpu.c b/target-tilegx/cpu.c index 78b73e45c4..3c5481d443 100644 --- a/target-tilegx/cpu.c +++ b/target-tilegx/cpu.c @@ -22,6 +22,7 @@ #include "qemu-common.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" +#include "linux-user/syscall_defs.h" static void tilegx_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, int flags) @@ -121,8 +122,12 @@ static int tilegx_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int rw, { TileGXCPU *cpu = TILEGX_CPU(cs); - cs->exception_index = TILEGX_EXCP_SEGV; + /* The sigcode field will be filled in by do_signal in main.c. */ + cs->exception_index = TILEGX_EXCP_SIGNAL; cpu->env.excaddr = address; + cpu->env.signo = TARGET_SIGSEGV; + cpu->env.sigcode = 0; + return 1; } |