(12-31-2013, 01:07 PM)Cutlassw30 Wrote: Its only 2 extra cycles to do a AND immediate for example with out an actual ANDI instruction. I say leave ADDI as the only instruction that loads a value to a register (besides maybe ADDSI which shifts it over 8 times).
Considering that a single cycle takes from 5 to 20 ticks (depending on whether your CPU is pipeline'd), 2 extra cycles sounds like a waste of both CPU cycles and register/memory space (possibly bandwidth), compared to the 1 bit instruction word overhead. A solution would be to populate the registers with the immediate values during initialization, but it does not feel right to reserve memory for hardcoded bitmasks (e.g. 0xff).