8115fc93 | 02-Jun-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/m68k: Fix address argument for EXCP_TRACE
According to the M68040 Users Manual, section 8.4.3, Six word stack frame (format 2), Trace (and others) is supposed to record the next insn in PC an
target/m68k: Fix address argument for EXCP_TRACE
According to the M68040 Users Manual, section 8.4.3, Six word stack frame (format 2), Trace (and others) is supposed to record the next insn in PC and the address of the trapping instruction in ADDRESS.
Create gen_raise_exception_format2 to record the trapping pc in env->mmu.ar. Update m68k_interrupt_all to pass the value to do_stack_frame. Update cpu_loop to handle EXCP_TRACE.
Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220602013401.303699-9-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
show more ...
|
710d747b | 02-Jun-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/m68k: Fix pc, c flag, and address argument for EXCP_DIV0
According to the M68040 Users Manual, section 8.4.3, Six word stack frame (format 2), Zero Div (and others) is supposed to record the
target/m68k: Fix pc, c flag, and address argument for EXCP_DIV0
According to the M68040 Users Manual, section 8.4.3, Six word stack frame (format 2), Zero Div (and others) is supposed to record the next insn in PC and the address of the trapping instruction in ADDRESS.
While the N, Z and V flags are documented to be undefine on DIV0, the C flag is documented as always cleared.
Update helper_div* to take the instruction length as an argument and use raise_exception_format2. Hoist the reset of the C flag above the division by zero check.
Update m68k_interrupt_all to pass mmu.ar to do_stack_frame. Update cpu_loop to pass mmu.ar to siginfo.si_addr, as the kernel does in trap_c().
Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220602013401.303699-8-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
show more ...
|
ad5a5cf9 | 02-Jun-2022 |
Richard Henderson <richard.henderson@linaro.org> |
target/m68k: Fix address argument for EXCP_CHK
According to the M68040 Users Manual, section 8.4.3, Six word stack frame (format 2), CHK, CHK2 (and others) are supposed to record the next insn in PC
target/m68k: Fix address argument for EXCP_CHK
According to the M68040 Users Manual, section 8.4.3, Six word stack frame (format 2), CHK, CHK2 (and others) are supposed to record the next insn in PC and the address of the trapping instruction in ADDRESS.
Create a raise_exception_format2 function to centralize recording of the trapping pc in mmu.ar, plus advancing to the next insn.
Update m68k_interrupt_all to pass mmu.ar to do_stack_frame. Update cpu_loop to pass mmu.ar to siginfo.si_addr, as the kernel does in trap_c().
Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220602013401.303699-7-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
show more ...
|
cf213dac | 02-Jun-2022 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user/m68k: Handle EXCP_TRAP1 through EXCP_TRAP15
These are raised by guest instructions, and should not fall through into the default abort case.
Signed-off-by: Richard Henderson <richard.hen
linux-user/m68k: Handle EXCP_TRAP1 through EXCP_TRAP15
These are raised by guest instructions, and should not fall through into the default abort case.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220602013401.303699-5-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
show more ...
|
87e9bf23 | 27-Dec-2021 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Split out do_prctl and subroutines
Since the prctl constants are supposed to be generic, supply any that are not provided by the host.
Split out subroutines for PR_GET_FP_MODE, PR_SET_F
linux-user: Split out do_prctl and subroutines
Since the prctl constants are supposed to be generic, supply any that are not provided by the host.
Split out subroutines for PR_GET_FP_MODE, PR_SET_FP_MODE, PR_GET_VL, PR_SET_VL, PR_RESET_KEYS, PR_SET_TAGGED_ADDR_CTRL, PR_GET_TAGGED_ADDR_CTRL. Return EINVAL for guests that do not support these options rather than pass them on to the host.
Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211227150127.2659293-2-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
show more ...
|