On 10/10/26 11:17 PM, Sam Price wrote:
libgcc's MicroBlaze __moddi3 has been wrong since the port landed in 2010.
It returns the wrong answer for most inputs, differently on each byte order,
and for an LLONG_MIN dividend it either fails to terminate or returns
nonsense depending on the byte order.

These are two ways to fix it, and you should apply one or the other, not both.
Each applies to an unpatched master on its own; 2/2 is not a follow-on to 1/2.
Both touch libgcc only.

   1/2  Ramin Moussavi's fix to the existing assembly, with my additions.
   2/2  Delete the assembly and use the generic libgcc2.c version.

Lot's to digest here.  Thanks for the comprehensive discussion.

I'll apply the first patch.

--
Michael Eager

Reply via email to