[PATCH] Add MIPS r6 support

Torbjörn Granlund tg at gmplib.org
Thu Jun 13 00:35:45 UTC 2019

Your mips32r6 asm code will presumably not get used as no configure.ac
mips32 changes analogous to the mips64 changes have been made.  Any
particular reason for that?  (Are there any mips32r6 CPUs out there?)

As you pointed out before, mipsr6 is in a way a new architecture, as r5
code does not run on an r6, or vice versa.  For that reason, I think we
need to separate them more cleanly in GMP.

My suggestion os to move any code using the LO or HI registers to a
subdirectory mips64/hilo.  That way, things will be less fragile, and we
do not need to hide HI/LO GMP files with a corresponding r6 file.

Attached are minimal changes along those lines (no mips32 changes yet).
The patch loocks large, but it is mainly moving things around.  The
longlong.h change makes the compiler generate decent code from plain C.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: application/octet-stream
Size: 27941 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-devel/attachments/20190613/dbdf39d5/attachment-0001.obj>
-------------- next part --------------

After this change, we can add r6 asm code for functions not handled well
enough by the compiler.

Please encrypt, key id 0xC8601622

More information about the gmp-devel mailing list