rldicl / rldicr for 32-bit powerpc?

Fred Wright fw at fwright.net
Sun Jul 16 19:16:52 UTC 2023


On Sun, 16 Jul 2023, Sergey Fedorov wrote:

>> The linked code is for an emulator, and is providing a *C*
> implementation, not a ppc32 machine-code
>
> Whatever provides the needed functionality, gonna be good enough, I guess.

I can't imagine any context in which you can freely choose whether to 
supply C code or assembler code, so using the code you linked in this 
context is virtually guaranteed not to "provide the needed functionality".

It also occurs to me that any code using rldicX instructions must be 
assuming 64-bit registers.  But ppc32 doesn't have 64-bit registers, so a 
couple of missing opcodes may be just the tip of the iceberg.

That being said, if the code *knows* it's dealing with 32-bit registers, 
then using rldicX instructions is just a bug.

If it supports both i386 and x86_64, it might be instructive to look at 
how it handles the differences.  If it doesn't support i386, that might be 
a clue that 32-bit support would be significant work.

Fred Wright


More information about the macports-dev mailing list