[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 16/27] linux-user/nios2: Properly emulate EXCP_TRAP
From: |
Richard Henderson |
Subject: |
Re: [PATCH v3 16/27] linux-user/nios2: Properly emulate EXCP_TRAP |
Date: |
Mon, 27 Sep 2021 10:30:38 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
On 9/27/21 9:23 AM, Peter Maydell wrote:
Loading the insn and fishing out the imm5 field is about 2
lines of code, isn't it?
It's how we handle similar cases for other targets.
And we actively get it wrong, e.g. mips.
So I have patches to move that code *out* of linux-user.
We have macros in target/nios2/ to do the field decode, and not in linux-user/.
I think I prefer that over putting
linux-user specific fields and handling into the target/nios2
code.
Would you prefer a generic-y named field like error_code, which we include in
other targets?
The kernel also defines:
* trap 31 ("breakpoint"), which should wind PC back by 4 and
send a SIGTRAP/TRAP_BRKPT
* trap 30 ("KGDB breakpoint"), which we should treat the same
as the "default" case since we should be acting like "kernel
with CONFIG_KGDB not defined"
Dang it, how did I miss those?
r~
- [PATCH v3 06/27] linux-user/alpha: Implement setup_sigtramp, (continued)
- [PATCH v3 06/27] linux-user/alpha: Implement setup_sigtramp, Richard Henderson, 2021/09/24
- [PATCH v3 08/27] linux-user/hexagon: Implement setup_sigtramp, Richard Henderson, 2021/09/24
- [PATCH v3 11/27] linux-user/x86_64: Raise SIGSEGV if SA_RESTORER not set, Richard Henderson, 2021/09/24
- [PATCH v3 09/27] linux-user/hppa: Document non-use of setup_sigtramp, Richard Henderson, 2021/09/24
- [PATCH v3 10/27] linux-user/i386: Implement setup_sigtramp, Richard Henderson, 2021/09/24
- [PATCH v3 16/27] linux-user/nios2: Properly emulate EXCP_TRAP, Richard Henderson, 2021/09/24
- [PATCH v3 15/27] linux-user/mips: Implement setup_sigtramp, Richard Henderson, 2021/09/24
- [PATCH v3 12/27] linux-user/m68k: Implement setup_sigtramp, Richard Henderson, 2021/09/24
- [PATCH v3 14/27] linux-user/mips: Tidy install_sigtramp, Richard Henderson, 2021/09/24
- [PATCH v3 18/27] linux-user/nios2: Fixes for signal frame setup, Richard Henderson, 2021/09/24
- [PATCH v3 20/27] linux-user/ppc: Simplify encode_trampoline, Richard Henderson, 2021/09/24
- [PATCH v3 19/27] linux-user/openrisc: Implement setup_sigtramp, Richard Henderson, 2021/09/24
- [PATCH v3 21/27] linux-user/ppc: Implement setup_sigtramp, Richard Henderson, 2021/09/24