[TUHS] PowerPC, bit twiddling - was Re: origins of void* -- Apology!

Ralph Corderoy ralph at inputplus.co.uk
Sat Nov 11 09:58:33 AEST 2017

Hi Toby,

> It's funny you should mention "1-bit bytes" and PowerPC close
> together, because the PowerPC has an architectural feature that I have
> not seen discussed much - the 8 x 4 bit CR register set [...] and of
> course the usual branch tests.
> I have been curious about whether a compiler could make good use of
> this facility.

POWER, PowerPC's predecessor, had this too, at least on the IBM RS/6000s
running AIX I used.  A lot of the work was performance related, so I
spent much time looking at disassembly of the output of xlc, their cc.
It seemed to make use of more than one CR quite often, but never very
many of them.  I recall thinking it could have done better.  Certainly,
re-doing bits in assembler allowed that to be exploited as long as one
could track which CR was tracking what previous test and whether it was
still valid.  Perhaps the compiler's architecture, probably not written
from scratch?, didn't adapt well to that possibility?

Cheers, Ralph.

More information about the TUHS mailing list