I had to search for this project, started a related project.
Spent a chunk of time on a new project rfPower, innovating the nPower project to have a 96-bit data-path and 48-bit instructions. 256 registers. nPower was strictly a 32-bit machine. Some things are altered from nPower. The process will be to get some sort of basic instruction set working, then add to it later. I want to experiment with software register renaming, given that hardware renamers are quite huge.
There are so many registers to support vector operations and to hopefully allow software renaming of registers. In a modern OoO design the number of registers is often into the hundreds; they’re just not all visible to the programmer. Doing renaming with software means the registers needs to be exposed.
The condition register is made of six flags instead of four. The flags work differently than on the nPower. There is cf (carry), vf (overflow), nf (negative), zf (zero) flags but also ‘sf’ for sign and ‘so’ for summary overflow. The sign flag ‘sf’ works in conjunction with the zero flag to allow cascaded compares to be formed. This was mainly to get immediate compares that could compare whole double-words using multiple compare instructions. A cascaded compare looks like:
Code:
Example: compare Rs1 to $0x234567890ABCDExxxxxxxxxx
CMPI cr0, Rs1, $0x2345<<80
CCMPI cr0, Rs1, $67890<<60
CCMPI cr0, Rs1, $ABCDE<<40
After the first compare the remaining compares are NOPs unless the first compare result was equal. The compares keep going as long as the result was equal. The process should work with compares larger than a double-word size as well.
Compares now do both signed and unsigned comparisons at the same time, so there is no need to have two sets of compare instructions. This freed up a couple of opcodes.
Shifted immediates are handled differently. Rather than separate instructions for a shifted immediate, an immediate shift count is included in the immediate instruction. Immediates can be shifted in increments of 20 bits up to 140 bits.
The CRxxx instructions are made more powerful. They can combine up to three Cr registers with logic operations. For example:
Code:
; Set cr0.zf if (both cr1 and cr2 results are equal) or (cr3 result is signed less than)
CMP cr1, r1, r2
CMP cr2, r3, r4
CMP cr3, r5, $0x1234
CRCALC cr0, (cr1.eq & cr2.eq) | cr3.lt
B cr0.eq, label
Seven more branch registers were added in addition to the link register. It is no longer possible to branch to the count register; a branch register may be branched to instead.
Instructions formats are looking like (not all shown):