1 <!-- Draft Instructions here described in -->
2 <!-- https://libre-soc.org/openpower/sv/bitmanip/ -->
3 <!-- These instructions are *not yet official* -->
5 # Ternary Bitwise Logic Immediate
9 * ternlogi RT,RA,RB,TLI (Rc=0)
10 * ternlogi. RT,RA,RB,TLI (Rc=1)
16 idx <- (RT)[i] || (RA)[i] || (RB)[i]
17 result[i] <- TLI[7-idx]
20 Special Registers Altered:
24 # Add With Shift By Immediate
28 * sadd RT,RA,RB,SH (Rc=0)
29 * sadd. RT,RA,RB,SH (Rc=1)
34 m <- ((0b0 || SH) + 1)
35 RT <- (n[m:XLEN-1] || [0]*m) + (RA)
37 Special Registers Altered:
41 # Add With Shift By Immediate Word
45 * saddw RT,RA,RB,SH (Rc=0)
46 * saddw. RT,RA,RB,SH (Rc=1)
50 n <- ([0]*(XLEN/2)) || (RB)[XLEN/2:XLEN-1]
51 if (RB)[XLEN/2] = 1 then
52 n[0:XLEN/2-1] <- [1]*(XLEN/2)
53 m <- ((0b0 || SH) + 1)
54 RT <- (n[m:XLEN-1] || [0]*m) + (RA)
56 Special Registers Altered:
60 # Add With Shift By Immediate Unsigned Word
64 * sadduw RT,RA,RB,SH (Rc=0)
65 * sadduw. RT,RA,RB,SH (Rc=1)
69 n <- ([0]*(XLEN/2)) || (RB)[XLEN/2:XLEN-1]
70 m <- ((0b0 || SH) + 1)
71 RT <- (n[m:XLEN-1] || [0]*m) + (RA)
73 Special Registers Altered: