1*b886d83cSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 2ddecdfceSMircea Gherzan /* 3ddecdfceSMircea Gherzan * Just-In-Time compiler for BPF filters on 32bit ARM 4ddecdfceSMircea Gherzan * 5ddecdfceSMircea Gherzan * Copyright (c) 2011 Mircea Gherzan <mgherzan@gmail.com> 6ddecdfceSMircea Gherzan */ 7ddecdfceSMircea Gherzan 8ddecdfceSMircea Gherzan #ifndef PFILTER_OPCODES_ARM_H 9ddecdfceSMircea Gherzan #define PFILTER_OPCODES_ARM_H 10ddecdfceSMircea Gherzan 1139c13c20SShubham Bansal /* ARM 32bit Registers */ 12ddecdfceSMircea Gherzan #define ARM_R0 0 13ddecdfceSMircea Gherzan #define ARM_R1 1 14ddecdfceSMircea Gherzan #define ARM_R2 2 15ddecdfceSMircea Gherzan #define ARM_R3 3 16ddecdfceSMircea Gherzan #define ARM_R4 4 17ddecdfceSMircea Gherzan #define ARM_R5 5 18ddecdfceSMircea Gherzan #define ARM_R6 6 19ddecdfceSMircea Gherzan #define ARM_R7 7 20ddecdfceSMircea Gherzan #define ARM_R8 8 21ddecdfceSMircea Gherzan #define ARM_R9 9 22ddecdfceSMircea Gherzan #define ARM_R10 10 2339c13c20SShubham Bansal #define ARM_FP 11 /* Frame Pointer */ 2439c13c20SShubham Bansal #define ARM_IP 12 /* Intra-procedure scratch register */ 2539c13c20SShubham Bansal #define ARM_SP 13 /* Stack pointer: as load/store base reg */ 2639c13c20SShubham Bansal #define ARM_LR 14 /* Link Register */ 2739c13c20SShubham Bansal #define ARM_PC 15 /* Program counter */ 28ddecdfceSMircea Gherzan 2939c13c20SShubham Bansal #define ARM_COND_EQ 0x0 /* == */ 3039c13c20SShubham Bansal #define ARM_COND_NE 0x1 /* != */ 3139c13c20SShubham Bansal #define ARM_COND_CS 0x2 /* unsigned >= */ 32ddecdfceSMircea Gherzan #define ARM_COND_HS ARM_COND_CS 3339c13c20SShubham Bansal #define ARM_COND_CC 0x3 /* unsigned < */ 34ddecdfceSMircea Gherzan #define ARM_COND_LO ARM_COND_CC 3539c13c20SShubham Bansal #define ARM_COND_MI 0x4 /* < 0 */ 3639c13c20SShubham Bansal #define ARM_COND_PL 0x5 /* >= 0 */ 3739c13c20SShubham Bansal #define ARM_COND_VS 0x6 /* Signed Overflow */ 3839c13c20SShubham Bansal #define ARM_COND_VC 0x7 /* No Signed Overflow */ 3939c13c20SShubham Bansal #define ARM_COND_HI 0x8 /* unsigned > */ 4039c13c20SShubham Bansal #define ARM_COND_LS 0x9 /* unsigned <= */ 4139c13c20SShubham Bansal #define ARM_COND_GE 0xa /* Signed >= */ 4239c13c20SShubham Bansal #define ARM_COND_LT 0xb /* Signed < */ 4339c13c20SShubham Bansal #define ARM_COND_GT 0xc /* Signed > */ 4439c13c20SShubham Bansal #define ARM_COND_LE 0xd /* Signed <= */ 4539c13c20SShubham Bansal #define ARM_COND_AL 0xe /* None */ 46ddecdfceSMircea Gherzan 47ddecdfceSMircea Gherzan /* register shift types */ 48ddecdfceSMircea Gherzan #define SRTYPE_LSL 0 49ddecdfceSMircea Gherzan #define SRTYPE_LSR 1 50ddecdfceSMircea Gherzan #define SRTYPE_ASR 2 51ddecdfceSMircea Gherzan #define SRTYPE_ROR 3 5239c13c20SShubham Bansal #define SRTYPE_ASL (SRTYPE_LSL) 53ddecdfceSMircea Gherzan 54ddecdfceSMircea Gherzan #define ARM_INST_ADD_R 0x00800000 5539c13c20SShubham Bansal #define ARM_INST_ADDS_R 0x00900000 5639c13c20SShubham Bansal #define ARM_INST_ADC_R 0x00a00000 5739c13c20SShubham Bansal #define ARM_INST_ADC_I 0x02a00000 58ddecdfceSMircea Gherzan #define ARM_INST_ADD_I 0x02800000 5939c13c20SShubham Bansal #define ARM_INST_ADDS_I 0x02900000 60ddecdfceSMircea Gherzan 61ddecdfceSMircea Gherzan #define ARM_INST_AND_R 0x00000000 62b85062acSJiong Wang #define ARM_INST_ANDS_R 0x00100000 63ddecdfceSMircea Gherzan #define ARM_INST_AND_I 0x02000000 64ddecdfceSMircea Gherzan 65ddecdfceSMircea Gherzan #define ARM_INST_BIC_R 0x01c00000 66ddecdfceSMircea Gherzan #define ARM_INST_BIC_I 0x03c00000 67ddecdfceSMircea Gherzan 68ddecdfceSMircea Gherzan #define ARM_INST_B 0x0a000000 69ddecdfceSMircea Gherzan #define ARM_INST_BX 0x012FFF10 70ddecdfceSMircea Gherzan #define ARM_INST_BLX_R 0x012fff30 71ddecdfceSMircea Gherzan 72ddecdfceSMircea Gherzan #define ARM_INST_CMP_R 0x01500000 73ddecdfceSMircea Gherzan #define ARM_INST_CMP_I 0x03500000 74ddecdfceSMircea Gherzan 752bea29b7SMircea Gherzan #define ARM_INST_EOR_R 0x00200000 763cbe2041SDaniel Borkmann #define ARM_INST_EOR_I 0x02200000 772bea29b7SMircea Gherzan 78a8ef95a0SRussell King #define ARM_INST_LDST__U 0x00800000 79828e2b90SRussell King #define ARM_INST_LDST__IMM12 0x00000fff 80a8ef95a0SRussell King #define ARM_INST_LDRB_I 0x05500000 81ddecdfceSMircea Gherzan #define ARM_INST_LDRB_R 0x07d00000 828c9602d3SRussell King #define ARM_INST_LDRD_I 0x014000d0 83a8ef95a0SRussell King #define ARM_INST_LDRH_I 0x015000b0 845bf705b4SNicolas Schichan #define ARM_INST_LDRH_R 0x019000b0 85a8ef95a0SRussell 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 128a8ef95a0SRussell King #define ARM_INST_STR_I 0x05000000 129a8ef95a0SRussell King #define ARM_INST_STRB_I 0x05400000 1308c9602d3SRussell King #define ARM_INST_STRD_I 0x014000f0 131a8ef95a0SRussell King #define ARM_INST_STRH_I 0x014000b0 132ddecdfceSMircea Gherzan 133ddecdfceSMircea Gherzan #define ARM_INST_TST_R 0x01100000 134ddecdfceSMircea Gherzan #define ARM_INST_TST_I 0x03100000 135ddecdfceSMircea Gherzan 136ddecdfceSMircea Gherzan #define ARM_INST_UDIV 0x0730f010 137ddecdfceSMircea Gherzan 138ddecdfceSMircea Gherzan #define ARM_INST_UMULL 0x00800090 139ddecdfceSMircea Gherzan 1404560cdffSNicolas Schichan #define ARM_INST_MLS 0x00600090 1414560cdffSNicolas Schichan 14239c13c20SShubham Bansal #define ARM_INST_UXTH 0x06ff0070 14339c13c20SShubham Bansal 144e8b56d55SDaniel Borkmann /* 145e8b56d55SDaniel Borkmann * Use a suitable undefined instruction to use for ARM/Thumb2 faulting. 146e8b56d55SDaniel Borkmann * We need to be careful not to conflict with those used by other modules 147e8b56d55SDaniel Borkmann * (BUG, kprobes, etc) and the register_undef_hook() system. 148e8b56d55SDaniel Borkmann * 149e8b56d55SDaniel Borkmann * The ARM architecture reference manual guarantees that the following 150e8b56d55SDaniel Borkmann * instruction space will produce an undefined instruction exception on 151e8b56d55SDaniel Borkmann * all CPUs: 152e8b56d55SDaniel Borkmann * 153e8b56d55SDaniel Borkmann * ARM: xxxx 0111 1111 xxxx xxxx xxxx 1111 xxxx ARMv7-AR, section A5.4 154e8b56d55SDaniel Borkmann * Thumb: 1101 1110 xxxx xxxx ARMv7-M, section A5.2.6 155e8b56d55SDaniel Borkmann */ 156e8b56d55SDaniel Borkmann #define ARM_INST_UDF 0xe7fddef1 157e8b56d55SDaniel Borkmann 158ddecdfceSMircea Gherzan /* register */ 159ddecdfceSMircea Gherzan #define _AL3_R(op, rd, rn, rm) ((op ## _R) | (rd) << 12 | (rn) << 16 | (rm)) 160ddecdfceSMircea Gherzan /* immediate */ 161ddecdfceSMircea Gherzan #define _AL3_I(op, rd, rn, imm) ((op ## _I) | (rd) << 12 | (rn) << 16 | (imm)) 16239c13c20SShubham Bansal /* register with register-shift */ 16339c13c20SShubham Bansal #define _AL3_SR(inst) (inst | (1 << 4)) 164ddecdfceSMircea Gherzan 165ddecdfceSMircea Gherzan #define ARM_ADD_R(rd, rn, rm) _AL3_R(ARM_INST_ADD, rd, rn, rm) 16639c13c20SShubham Bansal #define ARM_ADDS_R(rd, rn, rm) _AL3_R(ARM_INST_ADDS, rd, rn, rm) 167ddecdfceSMircea Gherzan #define ARM_ADD_I(rd, rn, imm) _AL3_I(ARM_INST_ADD, rd, rn, imm) 16839c13c20SShubham Bansal #define ARM_ADDS_I(rd, rn, imm) _AL3_I(ARM_INST_ADDS, rd, rn, imm) 16939c13c20SShubham Bansal #define ARM_ADC_R(rd, rn, rm) _AL3_R(ARM_INST_ADC, rd, rn, rm) 17039c13c20SShubham Bansal #define ARM_ADC_I(rd, rn, imm) _AL3_I(ARM_INST_ADC, rd, rn, imm) 171ddecdfceSMircea Gherzan 172ddecdfceSMircea Gherzan #define ARM_AND_R(rd, rn, rm) _AL3_R(ARM_INST_AND, rd, rn, rm) 173b85062acSJiong Wang #define ARM_ANDS_R(rd, rn, rm) _AL3_R(ARM_INST_ANDS, rd, rn, rm) 174ddecdfceSMircea Gherzan #define ARM_AND_I(rd, rn, imm) _AL3_I(ARM_INST_AND, rd, rn, imm) 175ddecdfceSMircea Gherzan 176ddecdfceSMircea Gherzan #define ARM_BIC_R(rd, rn, rm) _AL3_R(ARM_INST_BIC, rd, rn, rm) 177ddecdfceSMircea Gherzan #define ARM_BIC_I(rd, rn, imm) _AL3_I(ARM_INST_BIC, rd, rn, imm) 178ddecdfceSMircea Gherzan 179ddecdfceSMircea Gherzan #define ARM_B(imm24) (ARM_INST_B | ((imm24) & 0xffffff)) 180ddecdfceSMircea Gherzan #define ARM_BX(rm) (ARM_INST_BX | (rm)) 181ddecdfceSMircea Gherzan #define ARM_BLX_R(rm) (ARM_INST_BLX_R | (rm)) 182ddecdfceSMircea Gherzan 183ddecdfceSMircea Gherzan #define ARM_CMP_R(rn, rm) _AL3_R(ARM_INST_CMP, 0, rn, rm) 184ddecdfceSMircea Gherzan #define ARM_CMP_I(rn, imm) _AL3_I(ARM_INST_CMP, 0, rn, imm) 185ddecdfceSMircea Gherzan 1862bea29b7SMircea Gherzan #define ARM_EOR_R(rd, rn, rm) _AL3_R(ARM_INST_EOR, rd, rn, rm) 1873cbe2041SDaniel Borkmann #define ARM_EOR_I(rd, rn, imm) _AL3_I(ARM_INST_EOR, rd, rn, imm) 1882bea29b7SMircea Gherzan 189a8ef95a0SRussell King #define ARM_LDR_R(rt, rn, rm) (ARM_INST_LDR_R | ARM_INST_LDST__U \ 190a8ef95a0SRussell King | (rt) << 12 | (rn) << 16 \ 19139c13c20SShubham Bansal | (rm)) 1922b6958efSRussell King #define ARM_LDR_R_SI(rt, rn, rm, type, imm) \ 1932b6958efSRussell King (ARM_INST_LDR_R | ARM_INST_LDST__U \ 1942b6958efSRussell King | (rt) << 12 | (rn) << 16 \ 1952b6958efSRussell King | (imm) << 7 | (type) << 5 | (rm)) 196a8ef95a0SRussell King #define ARM_LDRB_R(rt, rn, rm) (ARM_INST_LDRB_R | ARM_INST_LDST__U \ 197a8ef95a0SRussell King | (rt) << 12 | (rn) << 16 \ 198ddecdfceSMircea Gherzan | (rm)) 199a8ef95a0SRussell King #define ARM_LDRH_R(rt, rn, rm) (ARM_INST_LDRH_R | ARM_INST_LDST__U \ 200a8ef95a0SRussell King | (rt) << 12 | (rn) << 16 \ 2015bf705b4SNicolas Schichan | (rm)) 202ddecdfceSMircea Gherzan 203ddecdfceSMircea Gherzan #define ARM_LDM(rn, regs) (ARM_INST_LDM | (rn) << 16 | (regs)) 20439c13c20SShubham Bansal #define ARM_LDM_IA(rn, regs) (ARM_INST_LDM_IA | (rn) << 16 | (regs)) 205ddecdfceSMircea Gherzan 206ddecdfceSMircea Gherzan #define ARM_LSL_R(rd, rn, rm) (_AL3_R(ARM_INST_LSL, rd, 0, rn) | (rm) << 8) 207ddecdfceSMircea Gherzan #define ARM_LSL_I(rd, rn, imm) (_AL3_I(ARM_INST_LSL, rd, 0, rn) | (imm) << 7) 208ddecdfceSMircea Gherzan 209ddecdfceSMircea Gherzan #define ARM_LSR_R(rd, rn, rm) (_AL3_R(ARM_INST_LSR, rd, 0, rn) | (rm) << 8) 210ddecdfceSMircea Gherzan #define ARM_LSR_I(rd, rn, imm) (_AL3_I(ARM_INST_LSR, rd, 0, rn) | (imm) << 7) 21139c13c20SShubham Bansal #define ARM_ASR_R(rd, rn, rm) (_AL3_R(ARM_INST_ASR, rd, 0, rn) | (rm) << 8) 21239c13c20SShubham Bansal #define ARM_ASR_I(rd, rn, imm) (_AL3_I(ARM_INST_ASR, rd, 0, rn) | (imm) << 7) 213ddecdfceSMircea Gherzan 214ddecdfceSMircea Gherzan #define ARM_MOV_R(rd, rm) _AL3_R(ARM_INST_MOV, rd, 0, rm) 21539c13c20SShubham Bansal #define ARM_MOVS_R(rd, rm) _AL3_R(ARM_INST_MOVS, rd, 0, rm) 216ddecdfceSMircea Gherzan #define ARM_MOV_I(rd, imm) _AL3_I(ARM_INST_MOV, rd, 0, imm) 21739c13c20SShubham Bansal #define ARM_MOV_SR(rd, rm, type, rs) \ 21839c13c20SShubham Bansal (_AL3_SR(ARM_MOV_R(rd, rm)) | (type) << 5 | (rs) << 8) 21939c13c20SShubham Bansal #define ARM_MOV_SI(rd, rm, type, imm6) \ 22039c13c20SShubham Bansal (ARM_MOV_R(rd, rm) | (type) << 5 | (imm6) << 7) 221ddecdfceSMircea Gherzan 222ddecdfceSMircea Gherzan #define ARM_MOVW(rd, imm) \ 223ddecdfceSMircea Gherzan (ARM_INST_MOVW | ((imm) >> 12) << 16 | (rd) << 12 | ((imm) & 0x0fff)) 224ddecdfceSMircea Gherzan 225ddecdfceSMircea Gherzan #define ARM_MOVT(rd, imm) \ 226ddecdfceSMircea Gherzan (ARM_INST_MOVT | ((imm) >> 12) << 16 | (rd) << 12 | ((imm) & 0x0fff)) 227ddecdfceSMircea Gherzan 228ddecdfceSMircea Gherzan #define ARM_MUL(rd, rm, rn) (ARM_INST_MUL | (rd) << 16 | (rm) << 8 | (rn)) 229ddecdfceSMircea Gherzan 230ddecdfceSMircea Gherzan #define ARM_POP(regs) (ARM_INST_POP | (regs)) 231ddecdfceSMircea Gherzan #define ARM_PUSH(regs) (ARM_INST_PUSH | (regs)) 232ddecdfceSMircea Gherzan 233ddecdfceSMircea Gherzan #define ARM_ORR_R(rd, rn, rm) _AL3_R(ARM_INST_ORR, rd, rn, rm) 234ddecdfceSMircea Gherzan #define ARM_ORR_I(rd, rn, imm) _AL3_I(ARM_INST_ORR, rd, rn, imm) 23539c13c20SShubham Bansal #define ARM_ORR_SR(rd, rn, rm, type, rs) \ 23639c13c20SShubham Bansal (_AL3_SR(ARM_ORR_R(rd, rn, rm)) | (type) << 5 | (rs) << 8) 23739c13c20SShubham Bansal #define ARM_ORRS_R(rd, rn, rm) _AL3_R(ARM_INST_ORRS, rd, rn, rm) 23839c13c20SShubham Bansal #define ARM_ORRS_SR(rd, rn, rm, type, rs) \ 23939c13c20SShubham Bansal (_AL3_SR(ARM_ORRS_R(rd, rn, rm)) | (type) << 5 | (rs) << 8) 24039c13c20SShubham Bansal #define ARM_ORR_SI(rd, rn, rm, type, imm6) \ 24139c13c20SShubham Bansal (ARM_ORR_R(rd, rn, rm) | (type) << 5 | (imm6) << 7) 24239c13c20SShubham Bansal #define ARM_ORRS_SI(rd, rn, rm, type, imm6) \ 24339c13c20SShubham Bansal (ARM_ORRS_R(rd, rn, rm) | (type) << 5 | (imm6) << 7) 244ddecdfceSMircea Gherzan 245ddecdfceSMircea Gherzan #define ARM_REV(rd, rm) (ARM_INST_REV | (rd) << 12 | (rm)) 246ddecdfceSMircea Gherzan #define ARM_REV16(rd, rm) (ARM_INST_REV16 | (rd) << 12 | (rm)) 247ddecdfceSMircea Gherzan 248ddecdfceSMircea Gherzan #define ARM_RSB_I(rd, rn, imm) _AL3_I(ARM_INST_RSB, rd, rn, imm) 24939c13c20SShubham Bansal #define ARM_RSBS_I(rd, rn, imm) _AL3_I(ARM_INST_RSBS, rd, rn, imm) 25039c13c20SShubham Bansal #define ARM_RSC_I(rd, rn, imm) _AL3_I(ARM_INST_RSC, rd, rn, imm) 251ddecdfceSMircea Gherzan 252ddecdfceSMircea Gherzan #define ARM_SUB_R(rd, rn, rm) _AL3_R(ARM_INST_SUB, rd, rn, rm) 25339c13c20SShubham Bansal #define ARM_SUBS_R(rd, rn, rm) _AL3_R(ARM_INST_SUBS, rd, rn, rm) 25439c13c20SShubham Bansal #define ARM_RSB_R(rd, rn, rm) _AL3_R(ARM_INST_RSB, rd, rn, rm) 25539c13c20SShubham Bansal #define ARM_SBC_R(rd, rn, rm) _AL3_R(ARM_INST_SBC, rd, rn, rm) 25639c13c20SShubham Bansal #define ARM_SBCS_R(rd, rn, rm) _AL3_R(ARM_INST_SBCS, rd, rn, rm) 257ddecdfceSMircea Gherzan #define ARM_SUB_I(rd, rn, imm) _AL3_I(ARM_INST_SUB, rd, rn, imm) 25839c13c20SShubham Bansal #define ARM_SUBS_I(rd, rn, imm) _AL3_I(ARM_INST_SUBS, rd, rn, imm) 25939c13c20SShubham Bansal #define ARM_SBC_I(rd, rn, imm) _AL3_I(ARM_INST_SBC, rd, rn, imm) 260ddecdfceSMircea Gherzan 261ddecdfceSMircea Gherzan #define ARM_TST_R(rn, rm) _AL3_R(ARM_INST_TST, 0, rn, rm) 262ddecdfceSMircea Gherzan #define ARM_TST_I(rn, imm) _AL3_I(ARM_INST_TST, 0, rn, imm) 263ddecdfceSMircea Gherzan 264ddecdfceSMircea Gherzan #define ARM_UDIV(rd, rn, rm) (ARM_INST_UDIV | (rd) << 16 | (rn) | (rm) << 8) 265ddecdfceSMircea Gherzan 266ddecdfceSMircea Gherzan #define ARM_UMULL(rd_lo, rd_hi, rn, rm) (ARM_INST_UMULL | (rd_hi) << 16 \ 267ddecdfceSMircea Gherzan | (rd_lo) << 12 | (rm) << 8 | rn) 268ddecdfceSMircea Gherzan 2694560cdffSNicolas Schichan #define ARM_MLS(rd, rn, rm, ra) (ARM_INST_MLS | (rd) << 16 | (rn) | (rm) << 8 \ 2704560cdffSNicolas Schichan | (ra) << 12) 27139c13c20SShubham Bansal #define ARM_UXTH(rd, rm) (ARM_INST_UXTH | (rd) << 12 | (rm)) 2724560cdffSNicolas Schichan 273ddecdfceSMircea Gherzan #endif /* PFILTER_OPCODES_ARM_H */ 274