A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | AG | AH | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | order | #S = immediate (I=1). S = register. #D = immediate (L=1). D = register. - Assembly Syntax - | - Group - | - Encoding - | - Alias - | * Z = (result == 0). ** If #S and cogex, PC += signed(S). If #S and hubex, PC += signed(S*4). If S, PC = register S. - Description - | Next Inst Shielded from Interrupt | Clock Cycles (8 cogs) - Cog Exec Mode - - LUT Exec Mode - | Clock Cycles (8 cogs) * +1 if crosses hub long - Hub Exec Mode - | Clock Cycles (16 cogs) - Cog Exec Mode - - LUT Exec Mode - | Clock Cyles (16 cogs) * +1 if crosses hub long - Hub Exec Mode - | * Data not forwarded. - Register Write - | - Hub R/W - | - Stack R/W - | |||||||||||||||||||||
2 | 1 | NOP | Miscellaneous | 0000 0000000 000 000000000 000000000 | . | No operation. | 2 | same | 2 | same | |||||||||||||||||||||||||
3 | 2 | ROR D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0000000 CZI DDDDDDDDD SSSSSSSSS | . | Rotate right. D = [31:0] of ({D[31:0], D[31:0]} >> S[4:0]). C = last bit shifted out if S[4:0] > 0, else D[0]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
4 | 3 | ROL D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0000001 CZI DDDDDDDDD SSSSSSSSS | . | Rotate left. D = [63:32] of ({D[31:0], D[31:0]} << S[4:0]). C = last bit shifted out if S[4:0] > 0, else D[31]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
5 | 4 | SHR D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0000010 CZI DDDDDDDDD SSSSSSSSS | . | Shift right. D = [31:0] of ({32'b0, D[31:0]} >> S[4:0]). C = last bit shifted out if S[4:0] > 0, else D[0]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
6 | 5 | SHL D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0000011 CZI DDDDDDDDD SSSSSSSSS | . | Shift left. D = [63:32] of ({D[31:0], 32'b0} << S[4:0]). C = last bit shifted out if S[4:0] > 0, else D[31]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
7 | 6 | RCR D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0000100 CZI DDDDDDDDD SSSSSSSSS | . | Rotate carry right. D = [31:0] of ({{32{C}}, D[31:0]} >> S[4:0]). C = last bit shifted out if S[4:0] > 0, else D[0]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
8 | 7 | RCL D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0000101 CZI DDDDDDDDD SSSSSSSSS | . | Rotate carry left. D = [63:32] of ({D[31:0], {32{C}}} << S[4:0]). C = last bit shifted out if S[4:0] > 0, else D[31]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
9 | 8 | SAR D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0000110 CZI DDDDDDDDD SSSSSSSSS | . | Shift arithmetic right. D = [31:0] of ({{32{D[31]}}, D[31:0]} >> S[4:0]). C = last bit shifted out if S[4:0] > 0, else D[0]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
10 | 9 | SAL D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0000111 CZI DDDDDDDDD SSSSSSSSS | . | Shift arithmetic left. D = [63:32] of ({D[31:0], {32{D[0]}}} << S[4:0]). C = last bit shifted out if S[4:0] > 0, else D[31]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
11 | 10 | ADD D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0001000 CZI DDDDDDDDD SSSSSSSSS | . | Add S into D. D = D + S. C = carry of (D + S). * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
12 | 11 | ADDX D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0001001 CZI DDDDDDDDD SSSSSSSSS | . | Add (S + C) into D, extended. D = D + S + C. C = carry of (D + S + C). Z = Z AND (result == 0). | 2 | same | 2 | same | D | ||||||||||||||||||||||||
13 | 12 | ADDS D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0001010 CZI DDDDDDDDD SSSSSSSSS | . | Add S into D, signed. D = D + S. C = correct sign of (D + S). * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
14 | 13 | ADDSX D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0001011 CZI DDDDDDDDD SSSSSSSSS | . | Add (S + C) into D, signed and extended. D = D + S + C. C = correct sign of (D + S + C). Z = Z AND (result == 0). | 2 | same | 2 | same | D | ||||||||||||||||||||||||
15 | 14 | SUB D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0001100 CZI DDDDDDDDD SSSSSSSSS | . | Subtract S from D. D = D - S. C = borrow of (D - S). * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
16 | 15 | SUBX D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0001101 CZI DDDDDDDDD SSSSSSSSS | . | Subtract (S + C) from D, extended. D = D - (S + C). C = borrow of (D - (S + C)). Z = Z AND (result == 0). | 2 | same | 2 | same | D | ||||||||||||||||||||||||
17 | 16 | SUBS D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0001110 CZI DDDDDDDDD SSSSSSSSS | . | Subtract S from D, signed. D = D - S. C = correct sign of (D - S). * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
18 | 17 | SUBSX D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0001111 CZI DDDDDDDDD SSSSSSSSS | . | Subtract (S + C) from D, signed and extended. D = D - (S + C). C = correct sign of (D - (S + C)). Z = Z AND (result == 0). | 2 | same | 2 | same | D | ||||||||||||||||||||||||
19 | 18 | CMP D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0010000 CZI DDDDDDDDD SSSSSSSSS | . | Compare D to S. C = borrow of (D - S). Z = (D == S). | 2 | same | 2 | same | |||||||||||||||||||||||||
20 | 19 | CMPX D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0010001 CZI DDDDDDDDD SSSSSSSSS | . | Compare D to (S + C), extended. C = borrow of (D - (S + C)). Z = Z AND (D == S + C). | 2 | same | 2 | same | |||||||||||||||||||||||||
21 | 20 | CMPS D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0010010 CZI DDDDDDDDD SSSSSSSSS | . | Compare D to S, signed. C = correct sign of (D - S). Z = (D == S). | 2 | same | 2 | same | |||||||||||||||||||||||||
22 | 21 | CMPSX D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0010011 CZI DDDDDDDDD SSSSSSSSS | . | Compare D to (S + C), signed and extended. C = correct sign of (D - (S + C)). Z = Z AND (D == S + C). | 2 | same | 2 | same | |||||||||||||||||||||||||
23 | 22 | CMPR D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0010100 CZI DDDDDDDDD SSSSSSSSS | . | Compare S to D (reverse). C = borrow of (S - D). Z = (D == S). | 2 | same | 2 | same | |||||||||||||||||||||||||
24 | 23 | CMPM D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0010101 CZI DDDDDDDDD SSSSSSSSS | . | Compare D to S, get MSB of difference into C. C = MSB of (D - S). Z = (D == S). | 2 | same | 2 | same | |||||||||||||||||||||||||
25 | 24 | SUBR D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0010110 CZI DDDDDDDDD SSSSSSSSS | . | Subtract D from S (reverse). D = S - D. C = borrow of (S - D). * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
26 | 25 | CMPSUB D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0010111 CZI DDDDDDDDD SSSSSSSSS | . | Compare and subtract S from D if D >= S. If D => S then D = D - S and C = 1, else D same and C = 0. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
27 | 26 | FGE D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0011000 CZI DDDDDDDDD SSSSSSSSS | . | Force D >= S. If D < S then D = S and C = 1, else D same and C = 0. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
28 | 27 | FLE D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0011001 CZI DDDDDDDDD SSSSSSSSS | . | Force D <= S. If D > S then D = S and C = 1, else D same and C = 0. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
29 | 28 | FGES D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0011010 CZI DDDDDDDDD SSSSSSSSS | . | Force D >= S, signed. If D < S then D = S and C = 1, else D same and C = 0. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
30 | 29 | FLES D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0011011 CZI DDDDDDDDD SSSSSSSSS | . | Force D <= S, signed. If D > S then D = S and C = 1, else D same and C = 0. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
31 | 30 | SUMC D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0011100 CZI DDDDDDDDD SSSSSSSSS | . | Sum +/-S into D by C. If C = 1 then D = D - S, else D = D + S. C = correct sign of (D +/- S). * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
32 | 31 | SUMNC D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0011101 CZI DDDDDDDDD SSSSSSSSS | . | Sum +/-S into D by !C. If C = 0 then D = D - S, else D = D + S. C = correct sign of (D +/- S). * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
33 | 32 | SUMZ D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0011110 CZI DDDDDDDDD SSSSSSSSS | . | Sum +/-S into D by Z. If Z = 1 then D = D - S, else D = D + S. C = correct sign of (D +/- S). * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
34 | 33 | SUMNZ D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0011111 CZI DDDDDDDDD SSSSSSSSS | . | Sum +/-S into D by !Z. If Z = 0 then D = D - S, else D = D + S. C = correct sign of (D +/- S). * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
35 | 34 | TESTB D,{#}S WC/WZ | Math and Logic | EEEE 0100000 CZI DDDDDDDDD SSSSSSSSS | . | Test bit S[4:0] of D, write to C/Z. C/Z = D[S[4:0]]. | 2 | same | 2 | same | |||||||||||||||||||||||||
36 | 35 | TESTBN D,{#}S WC/WZ | Math and Logic | EEEE 0100001 CZI DDDDDDDDD SSSSSSSSS | . | Test bit S[4:0] of !D, write to C/Z. C/Z = !D[S[4:0]]. | 2 | same | 2 | same | |||||||||||||||||||||||||
37 | 36 | TESTB D,{#}S ANDC/ANDZ | Math and Logic | EEEE 0100010 CZI DDDDDDDDD SSSSSSSSS | . | Test bit S[4:0] of D, AND into C/Z. C/Z = C/Z AND D[S[4:0]]. | 2 | same | 2 | same | |||||||||||||||||||||||||
38 | 37 | TESTBN D,{#}S ANDC/ANDZ | Math and Logic | EEEE 0100011 CZI DDDDDDDDD SSSSSSSSS | . | Test bit S[4:0] of !D, AND into C/Z. C/Z = C/Z AND !D[S[4:0]]. | 2 | same | 2 | same | |||||||||||||||||||||||||
39 | 38 | TESTB D,{#}S ORC/ORZ | Math and Logic | EEEE 0100100 CZI DDDDDDDDD SSSSSSSSS | . | Test bit S[4:0] of D, OR into C/Z. C/Z = C/Z OR D[S[4:0]]. | 2 | same | 2 | same | |||||||||||||||||||||||||
40 | 39 | TESTBN D,{#}S ORC/ORZ | Math and Logic | EEEE 0100101 CZI DDDDDDDDD SSSSSSSSS | . | Test bit S[4:0] of !D, OR into C/Z. C/Z = C/Z OR !D[S[4:0]]. | 2 | same | 2 | same | |||||||||||||||||||||||||
41 | 40 | TESTB D,{#}S XORC/XORZ | Math and Logic | EEEE 0100110 CZI DDDDDDDDD SSSSSSSSS | . | Test bit S[4:0] of D, XOR into C/Z. C/Z = C/Z XOR D[S[4:0]]. | 2 | same | 2 | same | |||||||||||||||||||||||||
42 | 41 | TESTBN D,{#}S XORC/XORZ | Math and Logic | EEEE 0100111 CZI DDDDDDDDD SSSSSSSSS | . | Test bit S[4:0] of !D, XOR into C/Z. C/Z = C/Z XOR !D[S[4:0]]. | 2 | same | 2 | same | |||||||||||||||||||||||||
43 | 42 | BITL D,{#}S {WCZ} | Math and Logic | EEEE 0100000 CZI DDDDDDDDD SSSSSSSSS | . | Bits D[S[9:5]+S[4:0]:S[4:0]] = 0. Other bits unaffected. Prior SETQ overrides S[9:5]. C,Z = original D[S[4:0]]. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
44 | 43 | BITH D,{#}S {WCZ} | Math and Logic | EEEE 0100001 CZI DDDDDDDDD SSSSSSSSS | . | Bits D[S[9:5]+S[4:0]:S[4:0]] = 1. Other bits unaffected. Prior SETQ overrides S[9:5]. C,Z = original D[S[4:0]]. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
45 | 44 | BITC D,{#}S {WCZ} | Math and Logic | EEEE 0100010 CZI DDDDDDDDD SSSSSSSSS | . | Bits D[S[9:5]+S[4:0]:S[4:0]] = C. Other bits unaffected. Prior SETQ overrides S[9:5]. C,Z = original D[S[4:0]]. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
46 | 45 | BITNC D,{#}S {WCZ} | Math and Logic | EEEE 0100011 CZI DDDDDDDDD SSSSSSSSS | . | Bits D[S[9:5]+S[4:0]:S[4:0]] = !C. Other bits unaffected. Prior SETQ overrides S[9:5]. C,Z = original D[S[4:0]]. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
47 | 46 | BITZ D,{#}S {WCZ} | Math and Logic | EEEE 0100100 CZI DDDDDDDDD SSSSSSSSS | . | Bits D[S[9:5]+S[4:0]:S[4:0]] = Z. Other bits unaffected. Prior SETQ overrides S[9:5]. C,Z = original D[S[4:0]]. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
48 | 47 | BITNZ D,{#}S {WCZ} | Math and Logic | EEEE 0100101 CZI DDDDDDDDD SSSSSSSSS | . | Bits D[S[9:5]+S[4:0]:S[4:0]] = !Z. Other bits unaffected. Prior SETQ overrides S[9:5]. C,Z = original D[S[4:0]]. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
49 | 48 | BITRND D,{#}S {WCZ} | Math and Logic | EEEE 0100110 CZI DDDDDDDDD SSSSSSSSS | . | Bits D[S[9:5]+S[4:0]:S[4:0]] = RNDs. Other bits unaffected. Prior SETQ overrides S[9:5]. C,Z = original D[S[4:0]]. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
50 | 49 | BITNOT D,{#}S {WCZ} | Math and Logic | EEEE 0100111 CZI DDDDDDDDD SSSSSSSSS | . | Toggle bits D[S[9:5]+S[4:0]:S[4:0]]. Other bits unaffected. Prior SETQ overrides S[9:5]. C,Z = original D[S[4:0]]. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
51 | 50 | AND D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0101000 CZI DDDDDDDDD SSSSSSSSS | . | AND S into D. D = D & S. C = parity of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
52 | 51 | ANDN D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0101001 CZI DDDDDDDDD SSSSSSSSS | . | AND !S into D. D = D & !S. C = parity of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
53 | 52 | OR D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0101010 CZI DDDDDDDDD SSSSSSSSS | . | OR S into D. D = D | S. C = parity of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
54 | 53 | XOR D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0101011 CZI DDDDDDDDD SSSSSSSSS | . | XOR S into D. D = D ^ S. C = parity of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
55 | 54 | MUXC D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0101100 CZI DDDDDDDDD SSSSSSSSS | . | Mux C into each D bit that is '1' in S. D = (!S & D ) | (S & {32{ C}}). C = parity of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
56 | 55 | MUXNC D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0101101 CZI DDDDDDDDD SSSSSSSSS | . | Mux !C into each D bit that is '1' in S. D = (!S & D ) | (S & {32{!C}}). C = parity of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
57 | 56 | MUXZ D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0101110 CZI DDDDDDDDD SSSSSSSSS | . | Mux Z into each D bit that is '1' in S. D = (!S & D ) | (S & {32{ Z}}). C = parity of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
58 | 57 | MUXNZ D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0101111 CZI DDDDDDDDD SSSSSSSSS | . | Mux !Z into each D bit that is '1' in S. D = (!S & D ) | (S & {32{!Z}}). C = parity of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
59 | 58 | MOV D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0110000 CZI DDDDDDDDD SSSSSSSSS | . | Move S into D. D = S. C = S[31]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
60 | 59 | NOT D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0110001 CZI DDDDDDDDD SSSSSSSSS | . | Get !S into D. D = !S. C = !S[31]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
61 | 60 | NOT D {WC/WZ/WCZ} | Math and Logic | EEEE 0110001 CZ0 DDDDDDDDD DDDDDDDDD | alias | Get !D into D. D = !D. C = !D[31]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
62 | 61 | ABS D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0110010 CZI DDDDDDDDD SSSSSSSSS | . | Get absolute value of S into D. D = ABS(S). C = S[31]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
63 | 62 | ABS D {WC/WZ/WCZ} | Math and Logic | EEEE 0110010 CZ0 DDDDDDDDD DDDDDDDDD | alias | Get absolute value of D into D. D = ABS(D). C = D[31]. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
64 | 63 | NEG D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0110011 CZI DDDDDDDDD SSSSSSSSS | . | Negate S into D. D = -S. C = MSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
65 | 64 | NEG D {WC/WZ/WCZ} | Math and Logic | EEEE 0110011 CZ0 DDDDDDDDD DDDDDDDDD | alias | Negate D. D = -D. C = MSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
66 | 65 | NEGC D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0110100 CZI DDDDDDDDD SSSSSSSSS | . | Negate S by C into D. If C = 1 then D = -S, else D = S. C = MSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
67 | 66 | NEGC D {WC/WZ/WCZ} | Math and Logic | EEEE 0110100 CZ0 DDDDDDDDD DDDDDDDDD | alias | Negate D by C. If C = 1 then D = -D, else D = D. C = MSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
68 | 67 | NEGNC D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0110101 CZI DDDDDDDDD SSSSSSSSS | . | Negate S by !C into D. If C = 0 then D = -S, else D = S. C = MSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
69 | 68 | NEGNC D {WC/WZ/WCZ} | Math and Logic | EEEE 0110101 CZ0 DDDDDDDDD DDDDDDDDD | alias | Negate D by !C. If C = 0 then D = -D, else D = D. C = MSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
70 | 69 | NEGZ D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0110110 CZI DDDDDDDDD SSSSSSSSS | . | Negate S by Z into D. If Z = 1 then D = -S, else D = S. C = MSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
71 | 70 | NEGZ D {WC/WZ/WCZ} | Math and Logic | EEEE 0110110 CZ0 DDDDDDDDD DDDDDDDDD | alias | Negate D by Z. If Z = 1 then D = -D, else D = D. C = MSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
72 | 71 | NEGNZ D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0110111 CZI DDDDDDDDD SSSSSSSSS | . | Negate S by !Z into D. If Z = 0 then D = -S, else D = S. C = MSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
73 | 72 | NEGNZ D {WC/WZ/WCZ} | Math and Logic | EEEE 0110111 CZ0 DDDDDDDDD DDDDDDDDD | alias | Negate D by !Z. If Z = 0 then D = -D, else D = D. C = MSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
74 | 73 | INCMOD D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0111000 CZI DDDDDDDDD SSSSSSSSS | . | Increment with modulus. If D = S then D = 0 and C = 1, else D = D + 1 and C = 0. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
75 | 74 | DECMOD D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0111001 CZI DDDDDDDDD SSSSSSSSS | . | Decrement with modulus. If D = 0 then D = S and C = 1, else D = D - 1 and C = 0. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
76 | 75 | ZEROX D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0111010 CZI DDDDDDDDD SSSSSSSSS | . | Zero-extend D above bit S[4:0]. C = MSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
77 | 76 | SIGNX D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0111011 CZI DDDDDDDDD SSSSSSSSS | . | Sign-extend D from bit S[4:0]. C = MSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
78 | 77 | ENCOD D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0111100 CZI DDDDDDDDD SSSSSSSSS | . | Get bit position of top-most '1' in S into D. D = position of top '1' in S (0..31). C = (S != 0). * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
79 | 78 | ENCOD D {WC/WZ/WCZ} | Math and Logic | EEEE 0111100 CZ0 DDDDDDDDD DDDDDDDDD | alias | Get bit position of top-most '1' in D into D. D = position of top '1' in S (0..31). C = (S != 0). * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
80 | 79 | ONES D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0111101 CZI DDDDDDDDD SSSSSSSSS | . | Get number of '1's in S into D. D = number of '1's in S (0..32). C = LSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
81 | 80 | ONES D {WC/WZ/WCZ} | Math and Logic | EEEE 0111101 CZ0 DDDDDDDDD DDDDDDDDD | alias | Get number of '1's in D into D. D = number of '1's in S (0..32). C = LSB of result. * | 2 | same | 2 | same | D | ||||||||||||||||||||||||
82 | 81 | TEST D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0111110 CZI DDDDDDDDD SSSSSSSSS | . | Test D with S. C = parity of (D & S). Z = ((D & S) == 0). | 2 | same | 2 | same | |||||||||||||||||||||||||
83 | 82 | TEST D {WC/WZ/WCZ} | Math and Logic | EEEE 0111110 CZ0 DDDDDDDDD DDDDDDDDD | alias | Test D. C = parity of D. Z = (D == 0). | 2 | same | 2 | same | |||||||||||||||||||||||||
84 | 83 | TESTN D,{#}S {WC/WZ/WCZ} | Math and Logic | EEEE 0111111 CZI DDDDDDDDD SSSSSSSSS | . | Test D with !S. C = parity of (D & !S). Z = ((D & !S) == 0). | 2 | same | 2 | same | |||||||||||||||||||||||||
85 | 84 | SETNIB D,{#}S,#N | Math and Logic | EEEE 100000N NNI DDDDDDDDD SSSSSSSSS | . | Set S[3:0] into nibble N in D, keeping rest of D same. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
86 | 85 | SETNIB {#}S | Math and Logic | EEEE 1000000 00I 000000000 SSSSSSSSS | alias | Set S[3:0] into nibble established by prior ALTSN instruction. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
87 | 86 | GETNIB D,{#}S,#N | Math and Logic | EEEE 100001N NNI DDDDDDDDD SSSSSSSSS | . | Get nibble N of S into D. D = {28'b0, S.NIBBLE[N]). | 2 | same | 2 | same | D | ||||||||||||||||||||||||
88 | 87 | GETNIB D | Math and Logic | EEEE 1000010 000 DDDDDDDDD 000000000 | alias | Get nibble established by prior ALTGN instruction into D. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
89 | 88 | ROLNIB D,{#}S,#N | Math and Logic | EEEE 100010N NNI DDDDDDDDD SSSSSSSSS | . | Rotate-left nibble N of S into D. D = {D[27:0], S.NIBBLE[N]). | 2 | same | 2 | same | D | ||||||||||||||||||||||||
90 | 89 | ROLNIB D | Math and Logic | EEEE 1000100 000 DDDDDDDDD 000000000 | alias | Rotate-left nibble established by prior ALTGN instruction into D. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
91 | 90 | SETBYTE D,{#}S,#N | Math and Logic | EEEE 1000110 NNI DDDDDDDDD SSSSSSSSS | . | Set S[7:0] into byte N in D, keeping rest of D same. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
92 | 91 | SETBYTE {#}S | Math and Logic | EEEE 1000110 00I 000000000 SSSSSSSSS | alias | Set S[7:0] into byte established by prior ALTSB instruction. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
93 | 92 | GETBYTE D,{#}S,#N | Math and Logic | EEEE 1000111 NNI DDDDDDDDD SSSSSSSSS | . | Get byte N of S into D. D = {24'b0, S.BYTE[N]). | 2 | same | 2 | same | D | ||||||||||||||||||||||||
94 | 93 | GETBYTE D | Math and Logic | EEEE 1000111 000 DDDDDDDDD 000000000 | alias | Get byte established by prior ALTGB instruction into D. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
95 | 94 | ROLBYTE D,{#}S,#N | Math and Logic | EEEE 1001000 NNI DDDDDDDDD SSSSSSSSS | . | Rotate-left byte N of S into D. D = {D[23:0], S.BYTE[N]). | 2 | same | 2 | same | D | ||||||||||||||||||||||||
96 | 95 | ROLBYTE D | Math and Logic | EEEE 1001000 000 DDDDDDDDD 000000000 | alias | Rotate-left byte established by prior ALTGB instruction into D. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
97 | 96 | SETWORD D,{#}S,#N | Math and Logic | EEEE 1001001 0NI DDDDDDDDD SSSSSSSSS | . | Set S[15:0] into word N in D, keeping rest of D same. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
98 | 97 | SETWORD {#}S | Math and Logic | EEEE 1001001 00I 000000000 SSSSSSSSS | alias | Set S[15:0] into word established by prior ALTSW instruction. | 2 | same | 2 | same | D | ||||||||||||||||||||||||
99 | 98 | GETWORD D,{#}S,#N | Math and Logic | EEEE 1001001 1NI DDDDDDDDD SSSSSSSSS | . | Get word N of S into D. D = {16'b0, S.WORD[N]). | 2 | same | 2 | same | D | ||||||||||||||||||||||||
100 | 99 | GETWORD D | Math and Logic | EEEE 1001001 100 DDDDDDDDD 000000000 | alias | Get word established by prior ALTGW instruction into D. | 2 | same | 2 | same | D |