On Sat, 15 Jul 2023, Ken Cunningham wrote:
Adding it into cctools for the standard assembler to use whenever it might be needed would be something of a project, to be sure...
I think it would be highly unusual for an assembler to replace instructions for one architecture with instructions for another architecture, even when the two are related. Anything generating actual machine instructions should know what architecture it's targeting, and generate appropriate code.
However, patching it into a source file that needs it on a case-by-case basis is probably a fairly trivial thing to do.
Probably so, once one works out the appropriate instructions. That's not hard in principle (though trickier for the "dotted" versions), but I'm busy with other stuff right now (and don't currently have a working ppc64 machine for comparison testing). The linked code is for an emulator, and is providing a *C* implementation, not a ppc32 machine-code implementation.
Fred Wright