Re: [PATCH v3 4/4] target/m68k: fix FPSR quotient byte for frem instruction

2023-01-14 Thread Richard Henderson
On 1/14/23 13:29, Mark Cave-Ayland wrote: The FPSR quotient byte should be set to the value of the quotient and not the result. Manually calculate the quotient in the frem helper in round to nearest even mode (note this is different from the quotient calculated internally for fmod), and use it

[PATCH v3 4/4] target/m68k: fix FPSR quotient byte for frem instruction

2023-01-14 Thread Mark Cave-Ayland
The FPSR quotient byte should be set to the value of the quotient and not the result. Manually calculate the quotient in the frem helper in round to nearest even mode (note this is different from the quotient calculated internally for fmod), and use it to set the quotient byte accordingly.