[dynarmic] fix SignedDiv64 crashing if immediate constprop took effect; also fix result for 0x8000_0000/0xFFFF_FFFF not returning properly for SignedDiv32 (#3517)

a program could crash the emulator by just using div immediates and/or dividing by
0x8000_0000_0000_0000/0xFFFF_FFFF_FFFF_FFFF

X0 = 0x8000_0000_0000_0000
X1 = 0xFFFF_FFFF_FFFF_FFFF

SDIV X2, X0, X1
SDIV X2, X1, X0 <- crashes emu

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3517
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: DraVee <dravee@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie 2026-02-21 03:01:41 +01:00 committed by crueter
parent d19303883e
commit f94bae10f2
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
4 changed files with 123 additions and 57 deletions

View file

@ -22,7 +22,7 @@ Debug logs can be found in General -> Debug -> Open Log Location on desktop, and
Ignoring SIGSEGV when debugging in host:
- **gdb**: `handle all nostop pass`.
- **gdb**: `handle SIGSEGV nostop pass`.
- **lldb**: `pro hand -p true -s false -n false SIGSEGV`.
## Debugging (guest code)