ABI regarding the PPC condition code registers?
  • Order of the Butterfly
    Order of the Butterfly
    Samurai_Crow
    Posts: 192 from 2009/12/10
    From: Minnesota, USA
    The PPC famously has 8 condition code registers (CR0-CR7) with 4 bits each stacked into a master CR that holds them all. According to the AI bot on Brave Search, which cited references with few ties to the platform, some condition code registers are scratch (CR0 for integer and CR1 for floating point), but the remaining 6 are sometimes preserved between function calls and others are clobbered at the end of a function along with the stack frame.

    Is there any current documentation, either online or in the SDK, that will help me with the Assembly coding knowledge I need to take advantage of the PowerPC user-mode instruction set? I'm writing a code-generation library that can be used by JIT or static compilers. The first will be my E-Compiler, of course, but there are other uses like this one.
  • »08.08.25 - 21:20
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Flash
    Posts: 107 from 2019/11/1
    I think you are wrong about scratch CCR, luckily they should e more..
    Look at assembly PPC code in FlashMandelNG sources on OS4 depot, look also at PPC abi documentation for compilers too

    I hope it helps, bye!
  • »09.08.25 - 06:40
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Samurai_Crow
    Posts: 192 from 2009/12/10
    From: Minnesota, USA
    Thanks, I'll prioritize the macro-optimizer for now. The code generator changes can wait
  • »12.08.25 - 19:08
    Profile