MSA 011110 |
000 |
df/m |
ws |
wd |
BIT 001010 |
6 |
3 |
7 |
5 |
5 |
6 |
SAT_S.df |
Immediate Signed Saturate | |
SAT_S.B wd,ws,m |
MSA |
Immediate Signed Saturate |
SAT_S.H wd,ws,m |
MSA |
Immediate Signed Saturate |
SAT_S.W wd,ws,m |
MSA |
Immediate Signed Saturate |
SAT_S.D wd,ws,m |
MSA |
Immediate Signed Saturate |
Immediate Signed Saturate
Immediate selected bit width saturation of signed values.
wd[i] = saturate_signed(ws[i], m+1)
Signed elements in vector ws are saturated to signed values of m+1 bits without changing the data width. The result is written to vector wd.
The operands and results are values in integer data format df.
No data-dependent exceptions are possible.
SAT_S.B for i in 0 .. WRLEN/8-1 WR[wd]8i+7..8i = sat_s(WR[ws]8i+7..8i, 8, m+1) endfor SAT_S.H for i in 0 .. WRLEN/16-1 WR[wd]16i+15..16i = sat_s(WR[ws]16i+15..16i, 16, m+1) endfor SAT_S.W for i in 0 .. WRLEN/32-1 WR[wd]32i+31..32i = sat_s(WR[ws]32i+31..32i, 32, m+1) endfor SAT_S.D for i in 0 .. WRLEN/64-1 WR[wd]64i+63..64i = sat_s(WR[ws]64i+63..64i, 64, m+1) endfor function sat_s(tt, n, b) if ttn-1 = 0 and ttn-1..b-1 != 0n-b+1 then return 0n-b+1 || 1b-1 endif if ttn-1 = 1 and ttn-1..b-1 != 1n-b+1 then return 1n-b+1 || 0b-1 else return tt endif endfunction sat_s
Reserved Instruction Exception, MSA Disabled Exception.