On 10/11/26 12:17 AM, 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.
[ ... ]
I'll leave it to Michael to decide what approach he wants to take.

On the topic of testing.  My recollection is the microblaze port doesn't have a gdb simulator which is what is generally easiest to use with GCC.  I tried to use QEMU user mode testing on microblaze a few years back which failed miserably.  The net (in the context of my tester) is that microblaze just gets compilation testing, no validation that the resulting binaries work properly.

If QEMU's emulation for microblaze has improved meaningfully, then I can revisit again.

jeff

Reply via email to