SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
Add 3-Bit Unsigned Constant to Register
ADD ucst3, src2, dst
Functional unit = D
16 bit
15 | 13 | 12 | 10 | 9 | 7 | 6 | 0 |
dst | src2 | ucst3 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
3 | 3 | 3 | opcode |
Addition of a 3-bit unsigned constant (ucst3) with src2 and store result to dst.
CSR[2]EQ = (dst == 0)
CSR[5]C = {carry out} from (src2 + {zero extend}ucst3)
CSR[7]V = {overflow} from (src2 + {zero extend}ucst3)
Note that the carry (CSR:C) and overflow (CSR:V) bits are relevant to unsigned and signed operations, respectively. Appropriate bits are checked depending on if the operands are represented (or, interpreted) as unsigned or signed numbers.
dst = src2 + {zero extend}ucst3