1 /* SPDX-License-Identifier: GPL-2.0 */
5 #define SPARC_CR_OPCODE_PRIORITY 300
7 #define F3F(x,y,z) (((x)<<30)|((y)<<19)|((z)<<5))
9 #define FPD_ENCODE(x) (((x) >> 5) | ((x) & ~(0x20)))
11 #define RS1(x) (FPD_ENCODE(x) << 14)
12 #define RS2(x) (FPD_ENCODE(x) << 0)
13 #define RS3(x) (FPD_ENCODE(x) << 9)
14 #define RD(x) (FPD_ENCODE(x) << 25)
15 #define IMM5_0(x) ((x) << 0)
16 #define IMM5_9(x) ((x) << 9)
18 #define CRC32C(a,b,c) \
19 .word (F3F(2,0x36,0x147)|RS1(a)|RS2(b)|RD(c));
30 #define AES_EROUND01(a,b,c,d) \
31 .word (F3F(2, 0x19, 0)|RS1(a)|RS2(b)|RS3(c)|RD(d));
32 #define AES_EROUND23(a,b,c,d) \
33 .word (F3F(2, 0x19, 1)|RS1(a)|RS2(b)|RS3(c)|RD(d));
34 #define AES_DROUND01(a,b,c,d) \
35 .word (F3F(2, 0x19, 2)|RS1(a)|RS2(b)|RS3(c)|RD(d));
36 #define AES_DROUND23(a,b,c,d) \
37 .word (F3F(2, 0x19, 3)|RS1(a)|RS2(b)|RS3(c)|RD(d));
38 #define AES_EROUND01_L(a,b,c,d) \
39 .word (F3F(2, 0x19, 4)|RS1(a)|RS2(b)|RS3(c)|RD(d));
40 #define AES_EROUND23_L(a,b,c,d) \
41 .word (F3F(2, 0x19, 5)|RS1(a)|RS2(b)|RS3(c)|RD(d));
42 #define AES_DROUND01_L(a,b,c,d) \
43 .word (F3F(2, 0x19, 6)|RS1(a)|RS2(b)|RS3(c)|RD(d));
44 #define AES_DROUND23_L(a,b,c,d) \
45 .word (F3F(2, 0x19, 7)|RS1(a)|RS2(b)|RS3(c)|RD(d));
46 #define AES_KEXPAND1(a,b,c,d) \
47 .word (F3F(2, 0x19, 8)|RS1(a)|RS2(b)|IMM5_9(c)|RD(d));
48 #define AES_KEXPAND0(a,b,c) \
49 .word (F3F(2, 0x36, 0x130)|RS1(a)|RS2(b)|RD(c));
50 #define AES_KEXPAND2(a,b,c) \
51 .word (F3F(2, 0x36, 0x131)|RS1(a)|RS2(b)|RD(c));
54 .word (F3F(2, 0x36, 0x134)|RS1(a)|RD(b));
55 #define DES_IIP(a,b) \
56 .word (F3F(2, 0x36, 0x135)|RS1(a)|RD(b));
57 #define DES_KEXPAND(a,b,c) \
58 .word (F3F(2, 0x36, 0x136)|RS1(a)|IMM5_0(b)|RD(c));
59 #define DES_ROUND(a,b,c,d) \
60 .word (F3F(2, 0x19, 0x009)|RS1(a)|RS2(b)|RS3(c)|RD(d));
62 #define CAMELLIA_F(a,b,c,d) \
63 .word (F3F(2, 0x19, 0x00c)|RS1(a)|RS2(b)|RS3(c)|RD(d));
64 #define CAMELLIA_FL(a,b,c) \
65 .word (F3F(2, 0x36, 0x13c)|RS1(a)|RS2(b)|RD(c));
66 #define CAMELLIA_FLI(a,b,c) \
67 .word (F3F(2, 0x36, 0x13d)|RS1(a)|RS2(b)|RD(c));
69 #define MOVDTOX_F0_O4 \
71 #define MOVDTOX_F2_O5 \
73 #define MOVXTOD_G1_F60 \
75 #define MOVXTOD_G1_F62 \
77 #define MOVXTOD_G3_F4 \
79 #define MOVXTOD_G7_F6 \
81 #define MOVXTOD_G3_F0 \
83 #define MOVXTOD_G7_F2 \
85 #define MOVXTOD_O0_F0 \
87 #define MOVXTOD_O5_F0 \
89 #define MOVXTOD_O5_F2 \
91 #define MOVXTOD_O5_F4 \
93 #define MOVXTOD_O5_F6 \
95 #define MOVXTOD_G3_F60 \
97 #define MOVXTOD_G7_F62 \
100 #endif /* _OPCODES_H */