jnk0le / XTightlyCoupledIO

custom riscv extension to provide directly accessed peripheral registers
Creative Commons Attribution 4.0 International
5 stars 2 forks source link

get rid of tio.slt/tio.sgt #6

Closed jnk0le closed 1 year ago

jnk0le commented 1 year ago

nearly no savings if immediately branched on

tio.slt a0, io1, a1
c.beq a0, 2f

tio.cm.mv a0, io1
blt a0, a1, 2f

only 2 bytes and one instr saved when passing around

tio.slt a0, io1, a1

tio.cm.mv a0, io1
slt a0, a0, a1

tio.sgt is also not symmetric with base risc-v