1 <!-- Draft Instructions here described in -->
2 <!-- https://libre-soc.org/openpower/sv/bitmanip/ -->
3 <!-- These instructions are *not yet official* -->
20 Special Registers Altered:
24 # Ternary Bitwise Logic Immediate
28 * ternlogi RT,RA,RB,TLI (Rc=0)
29 * ternlogi. RT,RA,RB,TLI (Rc=1)
35 idx <- (RT)[i] || (RA)[i] || (RB)[i]
36 result[i] <- TLI[7-idx]
39 Special Registers Altered:
43 # Condition Register Ternary Bitwise Logic Immediate
47 * crternlogi BF,BFA,BFB,TLI,msk
51 bf <- CR[4*BF+32:4*BF+35]
52 bfa <- CR[4*BFA+32:4*BFA+35]
53 bfb <- CR[4*BFB+32:4*BFB+35]
57 idx <- bf[i] || bfa[i] || bfb[i]
58 result[i] <- TLI[7-idx]
61 CR[4*BF+32+i] <- result[i]
63 Special Registers Altered:
67 # Add With Shift By Immediate
71 * sadd RT,RA,RB,SH (Rc=0)
72 * sadd. RT,RA,RB,SH (Rc=1)
77 m <- ((0b0 || SH) + 1)
78 RT <- (n[m:XLEN-1] || [0]*m) + (RA)
80 Special Registers Altered:
84 # Add With Shift By Immediate Word
88 * saddw RT,RA,RB,SH (Rc=0)
89 * saddw. RT,RA,RB,SH (Rc=1)
93 n <- ([0]*(XLEN/2)) || (RB)[XLEN/2:XLEN-1]
94 if (RB)[XLEN/2] = 1 then
95 n[0:XLEN/2-1] <- [1]*(XLEN/2)
96 m <- ((0b0 || SH) + 1)
97 RT <- (n[m:XLEN-1] || [0]*m) + (RA)
99 Special Registers Altered:
103 # Add With Shift By Immediate Unsigned Word
107 * sadduw RT,RA,RB,SH (Rc=0)
108 * sadduw. RT,RA,RB,SH (Rc=1)
112 n <- ([0]*(XLEN/2)) || (RB)[XLEN/2:XLEN-1]
113 m <- ((0b0 || SH) + 1)
114 RT <- (n[m:XLEN-1] || [0]*m) + (RA)
116 Special Registers Altered: