coreblocks
coreblocks copied to clipboard
Instruction Fusion
Since the fetch unit will be able to deliver multiple instructions per cycle soon, we could use that to implement instruction fusion. We could start by simply looking at two consecutive instructions and seeing if we can fuse two isa-ops into a single uop.
Examples:
- lui r1 0xfffff000 + addi r1, r1, 0xfff (loading immediate)
- srli r1, r1, 8 + andi r1, r1, 255 (load the second byte)
- slli r1, r1, 2 + add r1, r1, r2 (multiply by 4 and add)