fix(cpu): accept ARM multiplies whose destination equals Rm
MUL/MLA with Rd=Rm and long multiplies with RdHi or RdLo equal to Rm returned UnsupportedInstruction and stopped the machine. The ARM7TDMI reads every operand before writing the result, so these forms execute normally. R15 operands and RdHi=RdLo remain diagnostics. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HhfHfHEuzv2AUTd6erW1gU
This commit is contained in:
parent
0ef2719c6b
commit
b535c08313
3 changed files with 23 additions and 3 deletions
|
|
@ -299,6 +299,9 @@ Other S-bit block transfers access User registers while using the current mode's
|
|||
User-bank writeback, S-bit empty lists, and User-mode S-bit transfers return diagnostics.
|
||||
These restrictions avoid unpredictable or unverified forms.
|
||||
|
||||
ARM multiplies accept a destination equal to the first operand: `MUL`/`MLA` with Rd=Rm and long multiplies with RdHi or RdLo equal to Rm.
|
||||
Every operand is read before the result is written. R15 operands and RdHi=RdLo remain diagnostics.
|
||||
|
||||
`Cpu::enter_exception` explicitly supports software interrupt, undefined instruction, prefetch abort, data abort, IRQ, and FIQ entry.
|
||||
For synchronous exceptions, call it with PC at the faulting instruction.
|
||||
For IRQ/FIQ, call it between instructions, with PC at the next instruction.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue