Re: [PATCH] sh4: mac.l: implement saturation arithmetic logic

2024-04-04 Thread Peter Maydell
On Thu, 4 Apr 2024 at 16:12, Zack Buhman wrote: > > The saturation arithmetic logic in helper_macl is not correct. > > I tested and verified this behavior on a SH7091, the general pattern > is a code sequence such as: > > sets > > mov.l _mach,r2 > lds r2,mach > mov.

[PATCH] sh4: mac.l: implement saturation arithmetic logic

2024-04-04 Thread Zack Buhman
The saturation arithmetic logic in helper_macl is not correct. I tested and verified this behavior on a SH7091, the general pattern is a code sequence such as: sets mov.l _mach,r2 lds r2,mach mov.l _macl,r2 lds r2,macl mova _n,r0 mov r0,r1