Some work on extended precision arithmetic. Added an ADC instruction that adds three source operands and produces low order and high order (carry bit) in two destination registers. A 256-bit add can then be done with just four instructions.
Format: adc Rd1, Rs1, Rs2, Rs3, Rd2
Code:
adc a3, a1, a2, 0, cy0
adc b3, b1, b2, cy0, cy1
adc c3, c1, c2, cy1, cy2
adc d3, d1, d2, cy2, cy3
Shift instructions where also added that save the upper or lower bits of the shift result in a second destination register.
Added some more conditional move instructions. Conditional move if even (CMOVEVN), move if less than zero and move if less than or equal to zero.
Decided to get rid of the ADDnUI instructions. I cannot see them being used that often and the same functionality is available using a regular ADD_ASL instruction by substituting an immediate for Rs2. It is a little bit less code dense. It is probably worth it to simplify the instruction set.
Here is a table of the root opcodes:
Attachment:
Qupls2026_opcodes.jpg