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

2024-04-05 Thread Zack Buhman
Peter Maydell writes: > On Fri, 5 Apr 2024 at 08:55, Zack Buhman wrote: >> >> The saturation arithmetic logic in helper_macw 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

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

2024-04-05 Thread Peter Maydell
On Fri, 5 Apr 2024 at 08:55, Zack Buhman wrote: > > The saturation arithmetic logic in helper_macw 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.w: implement saturation arithmetic logic

2024-04-05 Thread Zack Buhman
The saturation arithmetic logic in helper_macw 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