xref: /openbmc/linux/arch/arm/net/bpf_jit_32.h (revision a8ef95a034233190b1dd73ff03472ff0f7f4fbdf)
1ddecdfceSMircea Gherzan /*
2ddecdfceSMircea Gherzan  * Just-In-Time compiler for BPF filters on 32bit ARM
3ddecdfceSMircea Gherzan  *
4ddecdfceSMircea Gherzan  * Copyright (c) 2011 Mircea Gherzan <mgherzan@gmail.com>
5ddecdfceSMircea Gherzan  *
6ddecdfceSMircea Gherzan  * This program is free software; you can redistribute it and/or modify it
7ddecdfceSMircea Gherzan  * under the terms of the GNU General Public License as published by the
8ddecdfceSMircea Gherzan  * Free Software Foundation; version 2 of the License.
9ddecdfceSMircea Gherzan  */
10ddecdfceSMircea Gherzan 
11ddecdfceSMircea Gherzan #ifndef PFILTER_OPCODES_ARM_H
12ddecdfceSMircea Gherzan #define PFILTER_OPCODES_ARM_H
13ddecdfceSMircea Gherzan 
1439c13c20SShubham Bansal /* ARM 32bit Registers */
15ddecdfceSMircea Gherzan #define ARM_R0	0
16ddecdfceSMircea Gherzan #define ARM_R1	1
17ddecdfceSMircea Gherzan #define ARM_R2	2
18ddecdfceSMircea Gherzan #define ARM_R3	3
19ddecdfceSMircea Gherzan #define ARM_R4	4
20ddecdfceSMircea Gherzan #define ARM_R5	5
21ddecdfceSMircea Gherzan #define ARM_R6	6
22ddecdfceSMircea Gherzan #define ARM_R7	7
23ddecdfceSMircea Gherzan #define ARM_R8	8
24ddecdfceSMircea Gherzan #define ARM_R9	9
25ddecdfceSMircea Gherzan #define ARM_R10	10
2639c13c20SShubham Bansal #define ARM_FP	11	/* Frame Pointer */
2739c13c20SShubham Bansal #define ARM_IP	12	/* Intra-procedure scratch register */
2839c13c20SShubham Bansal #define ARM_SP	13	/* Stack pointer: as load/store base reg */
2939c13c20SShubham Bansal #define ARM_LR	14	/* Link Register */
3039c13c20SShubham Bansal #define ARM_PC	15	/* Program counter */
31ddecdfceSMircea Gherzan 
3239c13c20SShubham Bansal #define ARM_COND_EQ		0x0	/* == */
3339c13c20SShubham Bansal #define ARM_COND_NE		0x1	/* != */
3439c13c20SShubham Bansal #define ARM_COND_CS		0x2	/* unsigned >= */
35ddecdfceSMircea Gherzan #define ARM_COND_HS		ARM_COND_CS
3639c13c20SShubham Bansal #define ARM_COND_CC		0x3	/* unsigned < */
37ddecdfceSMircea Gherzan #define ARM_COND_LO		ARM_COND_CC
3839c13c20SShubham Bansal #define ARM_COND_MI		0x4	/* < 0 */
3939c13c20SShubham Bansal #define ARM_COND_PL		0x5	/* >= 0 */
4039c13c20SShubham Bansal #define ARM_COND_VS		0x6	/* Signed Overflow */
4139c13c20SShubham Bansal #define ARM_COND_VC		0x7	/* No Signed Overflow */
4239c13c20SShubham Bansal #define ARM_COND_HI		0x8	/* unsigned > */
4339c13c20SShubham Bansal #define ARM_COND_LS		0x9	/* unsigned <= */
4439c13c20SShubham Bansal #define ARM_COND_GE		0xa	/* Signed >= */
4539c13c20SShubham Bansal #define ARM_COND_LT		0xb	/* Signed < */
4639c13c20SShubham Bansal #define ARM_COND_GT		0xc	/* Signed > */
4739c13c20SShubham Bansal #define ARM_COND_LE		0xd	/* Signed <= */
4839c13c20SShubham Bansal #define ARM_COND_AL		0xe	/* None */
49ddecdfceSMircea Gherzan 
50ddecdfceSMircea Gherzan /* register shift types */
51ddecdfceSMircea Gherzan #define SRTYPE_LSL		0
52ddecdfceSMircea Gherzan #define SRTYPE_LSR		1
53ddecdfceSMircea Gherzan #define SRTYPE_ASR		2
54ddecdfceSMircea Gherzan #define SRTYPE_ROR		3
5539c13c20SShubham Bansal #define SRTYPE_ASL		(SRTYPE_LSL)
56ddecdfceSMircea Gherzan 
57ddecdfceSMircea Gherzan #define ARM_INST_ADD_R		0x00800000
5839c13c20SShubham Bansal #define ARM_INST_ADDS_R		0x00900000
5939c13c20SShubham Bansal #define ARM_INST_ADC_R		0x00a00000
6039c13c20SShubham Bansal #define ARM_INST_ADC_I		0x02a00000
61ddecdfceSMircea Gherzan #define ARM_INST_ADD_I		0x02800000
6239c13c20SShubham Bansal #define ARM_INST_ADDS_I		0x02900000
63ddecdfceSMircea Gherzan 
64ddecdfceSMircea Gherzan #define ARM_INST_AND_R		0x00000000
65ddecdfceSMircea Gherzan #define ARM_INST_AND_I		0x02000000
66ddecdfceSMircea Gherzan 
67ddecdfceSMircea Gherzan #define ARM_INST_BIC_R		0x01c00000
68ddecdfceSMircea Gherzan #define ARM_INST_BIC_I		0x03c00000
69ddecdfceSMircea Gherzan 
70ddecdfceSMircea Gherzan #define ARM_INST_B		0x0a000000
71ddecdfceSMircea Gherzan #define ARM_INST_BX		0x012FFF10
72ddecdfceSMircea Gherzan #define ARM_INST_BLX_R		0x012fff30
73ddecdfceSMircea Gherzan 
74ddecdfceSMircea Gherzan #define ARM_INST_CMP_R		0x01500000
75ddecdfceSMircea Gherzan #define ARM_INST_CMP_I		0x03500000
76ddecdfceSMircea Gherzan 
772bea29b7SMircea Gherzan #define ARM_INST_EOR_R		0x00200000
783cbe2041SDaniel Borkmann #define ARM_INST_EOR_I		0x02200000
792bea29b7SMircea Gherzan 
80*a8ef95a0SRussell King #define ARM_INST_LDST__U	0x00800000
81*a8ef95a0SRussell King #define ARM_INST_LDRB_I		0x05500000
82ddecdfceSMircea Gherzan #define ARM_INST_LDRB_R		0x07d00000
83*a8ef95a0SRussell King #define ARM_INST_LDRH_I		0x015000b0
845bf705b4SNicolas Schichan #define ARM_INST_LDRH_R		0x019000b0
85*a8ef95a0SRussell King #define ARM_INST_LDR_I		0x05100000
8639c13c20SShubham Bansal #define ARM_INST_LDR_R		0x07900000
87ddecdfceSMircea Gherzan 
88ddecdfceSMircea Gherzan #define ARM_INST_LDM		0x08900000
8939c13c20SShubham Bansal #define ARM_INST_LDM_IA		0x08b00000
90ddecdfceSMircea Gherzan 
91ddecdfceSMircea Gherzan #define ARM_INST_LSL_I		0x01a00000
92ddecdfceSMircea Gherzan #define ARM_INST_LSL_R		0x01a00010
93ddecdfceSMircea Gherzan 
94ddecdfceSMircea Gherzan #define ARM_INST_LSR_I		0x01a00020
95ddecdfceSMircea Gherzan #define ARM_INST_LSR_R		0x01a00030
96ddecdfceSMircea Gherzan 
97ddecdfceSMircea Gherzan #define ARM_INST_MOV_R		0x01a00000
9839c13c20SShubham Bansal #define ARM_INST_MOVS_R		0x01b00000
99ddecdfceSMircea Gherzan #define ARM_INST_MOV_I		0x03a00000
100ddecdfceSMircea Gherzan #define ARM_INST_MOVW		0x03000000
101ddecdfceSMircea Gherzan #define ARM_INST_MOVT		0x03400000
102ddecdfceSMircea Gherzan 
103ddecdfceSMircea Gherzan #define ARM_INST_MUL		0x00000090
104ddecdfceSMircea Gherzan 
105ddecdfceSMircea Gherzan #define ARM_INST_POP		0x08bd0000
106ddecdfceSMircea Gherzan #define ARM_INST_PUSH		0x092d0000
107ddecdfceSMircea Gherzan 
108ddecdfceSMircea Gherzan #define ARM_INST_ORR_R		0x01800000
10939c13c20SShubham Bansal #define ARM_INST_ORRS_R		0x01900000
110ddecdfceSMircea Gherzan #define ARM_INST_ORR_I		0x03800000
111ddecdfceSMircea Gherzan 
112ddecdfceSMircea Gherzan #define ARM_INST_REV		0x06bf0f30
113ddecdfceSMircea Gherzan #define ARM_INST_REV16		0x06bf0fb0
114ddecdfceSMircea Gherzan 
115ddecdfceSMircea Gherzan #define ARM_INST_RSB_I		0x02600000
11639c13c20SShubham Bansal #define ARM_INST_RSBS_I		0x02700000
11739c13c20SShubham Bansal #define ARM_INST_RSC_I		0x02e00000
118ddecdfceSMircea Gherzan 
119ddecdfceSMircea Gherzan #define ARM_INST_SUB_R		0x00400000
12039c13c20SShubham Bansal #define ARM_INST_SUBS_R		0x00500000
12139c13c20SShubham Bansal #define ARM_INST_RSB_R		0x00600000
122ddecdfceSMircea Gherzan #define ARM_INST_SUB_I		0x02400000
12339c13c20SShubham Bansal #define ARM_INST_SUBS_I		0x02500000
12439c13c20SShubham Bansal #define ARM_INST_SBC_I		0x02c00000
12539c13c20SShubham Bansal #define ARM_INST_SBC_R		0x00c00000
12639c13c20SShubham Bansal #define ARM_INST_SBCS_R		0x00d00000
127ddecdfceSMircea Gherzan 
128*a8ef95a0SRussell King #define ARM_INST_STR_I		0x05000000
129*a8ef95a0SRussell King #define ARM_INST_STRB_I		0x05400000
130*a8ef95a0SRussell King #define ARM_INST_STRH_I		0x014000b0
131ddecdfceSMircea Gherzan 
132ddecdfceSMircea Gherzan #define ARM_INST_TST_R		0x01100000
133ddecdfceSMircea Gherzan #define ARM_INST_TST_I		0x03100000
134ddecdfceSMircea Gherzan 
135ddecdfceSMircea Gherzan #define ARM_INST_UDIV		0x0730f010
136ddecdfceSMircea Gherzan 
137ddecdfceSMircea Gherzan #define ARM_INST_UMULL		0x00800090
138ddecdfceSMircea Gherzan 
1394560cdffSNicolas Schichan #define ARM_INST_MLS		0x00600090
1404560cdffSNicolas Schichan 
14139c13c20SShubham Bansal #define ARM_INST_UXTH		0x06ff0070
14239c13c20SShubham Bansal 
143e8b56d55SDaniel Borkmann /*
144e8b56d55SDaniel Borkmann  * Use a suitable undefined instruction to use for ARM/Thumb2 faulting.
145e8b56d55SDaniel Borkmann  * We need to be careful not to conflict with those used by other modules
146e8b56d55SDaniel Borkmann  * (BUG, kprobes, etc) and the register_undef_hook() system.
147e8b56d55SDaniel Borkmann  *
148e8b56d55SDaniel Borkmann  * The ARM architecture reference manual guarantees that the following
149e8b56d55SDaniel Borkmann  * instruction space will produce an undefined instruction exception on
150e8b56d55SDaniel Borkmann  * all CPUs:
151e8b56d55SDaniel Borkmann  *
152e8b56d55SDaniel Borkmann  * ARM:   xxxx 0111 1111 xxxx xxxx xxxx 1111 xxxx	ARMv7-AR, section A5.4
153e8b56d55SDaniel Borkmann  * Thumb: 1101 1110 xxxx xxxx				ARMv7-M, section A5.2.6
154e8b56d55SDaniel Borkmann  */
155e8b56d55SDaniel Borkmann #define ARM_INST_UDF		0xe7fddef1
156e8b56d55SDaniel Borkmann 
157ddecdfceSMircea Gherzan /* register */
158ddecdfceSMircea Gherzan #define _AL3_R(op, rd, rn, rm)	((op ## _R) | (rd) << 12 | (rn) << 16 | (rm))
159ddecdfceSMircea Gherzan /* immediate */
160ddecdfceSMircea Gherzan #define _AL3_I(op, rd, rn, imm)	((op ## _I) | (rd) << 12 | (rn) << 16 | (imm))
16139c13c20SShubham Bansal /* register with register-shift */
16239c13c20SShubham Bansal #define _AL3_SR(inst)	(inst | (1 << 4))
163ddecdfceSMircea Gherzan 
164ddecdfceSMircea Gherzan #define ARM_ADD_R(rd, rn, rm)	_AL3_R(ARM_INST_ADD, rd, rn, rm)
16539c13c20SShubham Bansal #define ARM_ADDS_R(rd, rn, rm)	_AL3_R(ARM_INST_ADDS, rd, rn, rm)
166ddecdfceSMircea Gherzan #define ARM_ADD_I(rd, rn, imm)	_AL3_I(ARM_INST_ADD, rd, rn, imm)
16739c13c20SShubham Bansal #define ARM_ADDS_I(rd, rn, imm)	_AL3_I(ARM_INST_ADDS, rd, rn, imm)
16839c13c20SShubham Bansal #define ARM_ADC_R(rd, rn, rm)	_AL3_R(ARM_INST_ADC, rd, rn, rm)
16939c13c20SShubham Bansal #define ARM_ADC_I(rd, rn, imm)	_AL3_I(ARM_INST_ADC, rd, rn, imm)
170ddecdfceSMircea Gherzan 
171ddecdfceSMircea Gherzan #define ARM_AND_R(rd, rn, rm)	_AL3_R(ARM_INST_AND, rd, rn, rm)
172ddecdfceSMircea Gherzan #define ARM_AND_I(rd, rn, imm)	_AL3_I(ARM_INST_AND, rd, rn, imm)
173ddecdfceSMircea Gherzan 
174ddecdfceSMircea Gherzan #define ARM_BIC_R(rd, rn, rm)	_AL3_R(ARM_INST_BIC, rd, rn, rm)
175ddecdfceSMircea Gherzan #define ARM_BIC_I(rd, rn, imm)	_AL3_I(ARM_INST_BIC, rd, rn, imm)
176ddecdfceSMircea Gherzan 
177ddecdfceSMircea Gherzan #define ARM_B(imm24)		(ARM_INST_B | ((imm24) & 0xffffff))
178ddecdfceSMircea Gherzan #define ARM_BX(rm)		(ARM_INST_BX | (rm))
179ddecdfceSMircea Gherzan #define ARM_BLX_R(rm)		(ARM_INST_BLX_R | (rm))
180ddecdfceSMircea Gherzan 
181ddecdfceSMircea Gherzan #define ARM_CMP_R(rn, rm)	_AL3_R(ARM_INST_CMP, 0, rn, rm)
182ddecdfceSMircea Gherzan #define ARM_CMP_I(rn, imm)	_AL3_I(ARM_INST_CMP, 0, rn, imm)
183ddecdfceSMircea Gherzan 
1842bea29b7SMircea Gherzan #define ARM_EOR_R(rd, rn, rm)	_AL3_R(ARM_INST_EOR, rd, rn, rm)
1853cbe2041SDaniel Borkmann #define ARM_EOR_I(rd, rn, imm)	_AL3_I(ARM_INST_EOR, rd, rn, imm)
1862bea29b7SMircea Gherzan 
187*a8ef95a0SRussell King #define ARM_LDR_R(rt, rn, rm)	(ARM_INST_LDR_R | ARM_INST_LDST__U \
188*a8ef95a0SRussell King 				 | (rt) << 12 | (rn) << 16 \
18939c13c20SShubham Bansal 				 | (rm))
190*a8ef95a0SRussell King #define ARM_LDRB_R(rt, rn, rm)	(ARM_INST_LDRB_R | ARM_INST_LDST__U \
191*a8ef95a0SRussell King 				 | (rt) << 12 | (rn) << 16 \
192ddecdfceSMircea Gherzan 				 | (rm))
193*a8ef95a0SRussell King #define ARM_LDRH_R(rt, rn, rm)	(ARM_INST_LDRH_R | ARM_INST_LDST__U \
194*a8ef95a0SRussell King 				 | (rt) << 12 | (rn) << 16 \
1955bf705b4SNicolas Schichan 				 | (rm))
196ddecdfceSMircea Gherzan 
197ddecdfceSMircea Gherzan #define ARM_LDM(rn, regs)	(ARM_INST_LDM | (rn) << 16 | (regs))
19839c13c20SShubham Bansal #define ARM_LDM_IA(rn, regs)	(ARM_INST_LDM_IA | (rn) << 16 | (regs))
199ddecdfceSMircea Gherzan 
200ddecdfceSMircea Gherzan #define ARM_LSL_R(rd, rn, rm)	(_AL3_R(ARM_INST_LSL, rd, 0, rn) | (rm) << 8)
201ddecdfceSMircea Gherzan #define ARM_LSL_I(rd, rn, imm)	(_AL3_I(ARM_INST_LSL, rd, 0, rn) | (imm) << 7)
202ddecdfceSMircea Gherzan 
203ddecdfceSMircea Gherzan #define ARM_LSR_R(rd, rn, rm)	(_AL3_R(ARM_INST_LSR, rd, 0, rn) | (rm) << 8)
204ddecdfceSMircea Gherzan #define ARM_LSR_I(rd, rn, imm)	(_AL3_I(ARM_INST_LSR, rd, 0, rn) | (imm) << 7)
20539c13c20SShubham Bansal #define ARM_ASR_R(rd, rn, rm)   (_AL3_R(ARM_INST_ASR, rd, 0, rn) | (rm) << 8)
20639c13c20SShubham Bansal #define ARM_ASR_I(rd, rn, imm)  (_AL3_I(ARM_INST_ASR, rd, 0, rn) | (imm) << 7)
207ddecdfceSMircea Gherzan 
208ddecdfceSMircea Gherzan #define ARM_MOV_R(rd, rm)	_AL3_R(ARM_INST_MOV, rd, 0, rm)
20939c13c20SShubham Bansal #define ARM_MOVS_R(rd, rm)	_AL3_R(ARM_INST_MOVS, rd, 0, rm)
210ddecdfceSMircea Gherzan #define ARM_MOV_I(rd, imm)	_AL3_I(ARM_INST_MOV, rd, 0, imm)
21139c13c20SShubham Bansal #define ARM_MOV_SR(rd, rm, type, rs)	\
21239c13c20SShubham Bansal 	(_AL3_SR(ARM_MOV_R(rd, rm)) | (type) << 5 | (rs) << 8)
21339c13c20SShubham Bansal #define ARM_MOV_SI(rd, rm, type, imm6)	\
21439c13c20SShubham Bansal 	(ARM_MOV_R(rd, rm) | (type) << 5 | (imm6) << 7)
215ddecdfceSMircea Gherzan 
216ddecdfceSMircea Gherzan #define ARM_MOVW(rd, imm)	\
217ddecdfceSMircea Gherzan 	(ARM_INST_MOVW | ((imm) >> 12) << 16 | (rd) << 12 | ((imm) & 0x0fff))
218ddecdfceSMircea Gherzan 
219ddecdfceSMircea Gherzan #define ARM_MOVT(rd, imm)	\
220ddecdfceSMircea Gherzan 	(ARM_INST_MOVT | ((imm) >> 12) << 16 | (rd) << 12 | ((imm) & 0x0fff))
221ddecdfceSMircea Gherzan 
222ddecdfceSMircea Gherzan #define ARM_MUL(rd, rm, rn)	(ARM_INST_MUL | (rd) << 16 | (rm) << 8 | (rn))
223ddecdfceSMircea Gherzan 
224ddecdfceSMircea Gherzan #define ARM_POP(regs)		(ARM_INST_POP | (regs))
225ddecdfceSMircea Gherzan #define ARM_PUSH(regs)		(ARM_INST_PUSH | (regs))
226ddecdfceSMircea Gherzan 
227ddecdfceSMircea Gherzan #define ARM_ORR_R(rd, rn, rm)	_AL3_R(ARM_INST_ORR, rd, rn, rm)
228ddecdfceSMircea Gherzan #define ARM_ORR_I(rd, rn, imm)	_AL3_I(ARM_INST_ORR, rd, rn, imm)
22939c13c20SShubham Bansal #define ARM_ORR_SR(rd, rn, rm, type, rs)	\
23039c13c20SShubham Bansal 	(_AL3_SR(ARM_ORR_R(rd, rn, rm)) | (type) << 5 | (rs) << 8)
23139c13c20SShubham Bansal #define ARM_ORRS_R(rd, rn, rm)	_AL3_R(ARM_INST_ORRS, rd, rn, rm)
23239c13c20SShubham Bansal #define ARM_ORRS_SR(rd, rn, rm, type, rs)	\
23339c13c20SShubham Bansal 	(_AL3_SR(ARM_ORRS_R(rd, rn, rm)) | (type) << 5 | (rs) << 8)
23439c13c20SShubham Bansal #define ARM_ORR_SI(rd, rn, rm, type, imm6)	\
23539c13c20SShubham Bansal 	(ARM_ORR_R(rd, rn, rm) | (type) << 5 | (imm6) << 7)
23639c13c20SShubham Bansal #define ARM_ORRS_SI(rd, rn, rm, type, imm6)	\
23739c13c20SShubham Bansal 	(ARM_ORRS_R(rd, rn, rm) | (type) << 5 | (imm6) << 7)
238ddecdfceSMircea Gherzan 
239ddecdfceSMircea Gherzan #define ARM_REV(rd, rm)		(ARM_INST_REV | (rd) << 12 | (rm))
240ddecdfceSMircea Gherzan #define ARM_REV16(rd, rm)	(ARM_INST_REV16 | (rd) << 12 | (rm))
241ddecdfceSMircea Gherzan 
242ddecdfceSMircea Gherzan #define ARM_RSB_I(rd, rn, imm)	_AL3_I(ARM_INST_RSB, rd, rn, imm)
24339c13c20SShubham Bansal #define ARM_RSBS_I(rd, rn, imm)	_AL3_I(ARM_INST_RSBS, rd, rn, imm)
24439c13c20SShubham Bansal #define ARM_RSC_I(rd, rn, imm)	_AL3_I(ARM_INST_RSC, rd, rn, imm)
245ddecdfceSMircea Gherzan 
246ddecdfceSMircea Gherzan #define ARM_SUB_R(rd, rn, rm)	_AL3_R(ARM_INST_SUB, rd, rn, rm)
24739c13c20SShubham Bansal #define ARM_SUBS_R(rd, rn, rm)	_AL3_R(ARM_INST_SUBS, rd, rn, rm)
24839c13c20SShubham Bansal #define ARM_RSB_R(rd, rn, rm)	_AL3_R(ARM_INST_RSB, rd, rn, rm)
24939c13c20SShubham Bansal #define ARM_SBC_R(rd, rn, rm)	_AL3_R(ARM_INST_SBC, rd, rn, rm)
25039c13c20SShubham Bansal #define ARM_SBCS_R(rd, rn, rm)	_AL3_R(ARM_INST_SBCS, rd, rn, rm)
251ddecdfceSMircea Gherzan #define ARM_SUB_I(rd, rn, imm)	_AL3_I(ARM_INST_SUB, rd, rn, imm)
25239c13c20SShubham Bansal #define ARM_SUBS_I(rd, rn, imm)	_AL3_I(ARM_INST_SUBS, rd, rn, imm)
25339c13c20SShubham Bansal #define ARM_SBC_I(rd, rn, imm)	_AL3_I(ARM_INST_SBC, rd, rn, imm)
254ddecdfceSMircea Gherzan 
255ddecdfceSMircea Gherzan #define ARM_TST_R(rn, rm)	_AL3_R(ARM_INST_TST, 0, rn, rm)
256ddecdfceSMircea Gherzan #define ARM_TST_I(rn, imm)	_AL3_I(ARM_INST_TST, 0, rn, imm)
257ddecdfceSMircea Gherzan 
258ddecdfceSMircea Gherzan #define ARM_UDIV(rd, rn, rm)	(ARM_INST_UDIV | (rd) << 16 | (rn) | (rm) << 8)
259ddecdfceSMircea Gherzan 
260ddecdfceSMircea Gherzan #define ARM_UMULL(rd_lo, rd_hi, rn, rm)	(ARM_INST_UMULL | (rd_hi) << 16 \
261ddecdfceSMircea Gherzan 					 | (rd_lo) << 12 | (rm) << 8 | rn)
262ddecdfceSMircea Gherzan 
2634560cdffSNicolas Schichan #define ARM_MLS(rd, rn, rm, ra)	(ARM_INST_MLS | (rd) << 16 | (rn) | (rm) << 8 \
2644560cdffSNicolas Schichan 				 | (ra) << 12)
26539c13c20SShubham Bansal #define ARM_UXTH(rd, rm)	(ARM_INST_UXTH | (rd) << 12 | (rm))
2664560cdffSNicolas Schichan 
267ddecdfceSMircea Gherzan #endif /* PFILTER_OPCODES_ARM_H */
268