mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
14119c86a4
`IsLess` would incorrectly return true if both `SR_OVERFLOW` and `SR_SIGN` are set, as `(sr & SR_OVERFLOW) != (sr & SR_SIGN)` becomes `SR_OVERFLOW != SR_SIGN` which is true as the two masks are different. This broke in e651592ef5
.
This issue only affected the DSP LLE Interpreter, and not the DSP LLE JIT.
I've also included a simple test case for this. `ax0.l` (on the top left) is set to 0 if the instruction following `IFL` does not execute and to 1 if it is executed.
17 lines
303 B
Plaintext
17 lines
303 B
Plaintext
incdir "tests"
|
|
include "dsp_base.inc"
|
|
|
|
CLR $acc0
|
|
CLR $acc1
|
|
LRI $ac0.h, #0x0050
|
|
LRI $ac1.h, #0x0050
|
|
ADD $acc0, $acc1 ; Causes acc0 to overflow, and thus also become negative
|
|
|
|
LRI $AX0.L, #0x0000
|
|
IFL
|
|
LRI $AX0.L, #0x0001
|
|
CALL send_back
|
|
|
|
; We're done, DO NOT DELETE THIS LINE
|
|
JMP end_of_test
|