| PO | RT | RA | RB |sm | XO |Rc |
```
- Pseudo-code (shadd):
- shift <- sm & 0x3 # Ensure sm is 2-bit
+Pseudo-code (shadd):
+
shift <- shift + 1 # Shift is between 1-4
sum[0:63] <- ((RB) << shift) + (RA) # Shift RB, add RA
RT <- sum # Result stored in RT
-Is Rc used to indicate the two modes?
+Pseudo-code (shadduw):
- Pseudo-code (shadduw):
- shift <- sm & 0x3 # Ensure sm is 2-bit
shift <- shift + 1 # Shift is between 1-4
- n <- (RB) & 0xFFFFFFFF # Limit RB to upper word (32-bits)
+ n <- (RB)[XLEN/2:XLEN-1] # Limit RB to upper word (32-bits)
sum[0:63] <- (n << shift) + (RA) # Shift n, add RA
RT <- sum # Result stored in RT