162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Just-In-Time compiler for BPF filters on 32bit ARM 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (c) 2011 Mircea Gherzan <mgherzan@gmail.com> 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#ifndef PFILTER_OPCODES_ARM_H 962306a36Sopenharmony_ci#define PFILTER_OPCODES_ARM_H 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci/* ARM 32bit Registers */ 1262306a36Sopenharmony_ci#define ARM_R0 0 1362306a36Sopenharmony_ci#define ARM_R1 1 1462306a36Sopenharmony_ci#define ARM_R2 2 1562306a36Sopenharmony_ci#define ARM_R3 3 1662306a36Sopenharmony_ci#define ARM_R4 4 1762306a36Sopenharmony_ci#define ARM_R5 5 1862306a36Sopenharmony_ci#define ARM_R6 6 1962306a36Sopenharmony_ci#define ARM_R7 7 2062306a36Sopenharmony_ci#define ARM_R8 8 2162306a36Sopenharmony_ci#define ARM_R9 9 2262306a36Sopenharmony_ci#define ARM_R10 10 2362306a36Sopenharmony_ci#define ARM_FP 11 /* Frame Pointer */ 2462306a36Sopenharmony_ci#define ARM_IP 12 /* Intra-procedure scratch register */ 2562306a36Sopenharmony_ci#define ARM_SP 13 /* Stack pointer: as load/store base reg */ 2662306a36Sopenharmony_ci#define ARM_LR 14 /* Link Register */ 2762306a36Sopenharmony_ci#define ARM_PC 15 /* Program counter */ 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci#define ARM_COND_EQ 0x0 /* == */ 3062306a36Sopenharmony_ci#define ARM_COND_NE 0x1 /* != */ 3162306a36Sopenharmony_ci#define ARM_COND_CS 0x2 /* unsigned >= */ 3262306a36Sopenharmony_ci#define ARM_COND_HS ARM_COND_CS 3362306a36Sopenharmony_ci#define ARM_COND_CC 0x3 /* unsigned < */ 3462306a36Sopenharmony_ci#define ARM_COND_LO ARM_COND_CC 3562306a36Sopenharmony_ci#define ARM_COND_MI 0x4 /* < 0 */ 3662306a36Sopenharmony_ci#define ARM_COND_PL 0x5 /* >= 0 */ 3762306a36Sopenharmony_ci#define ARM_COND_VS 0x6 /* Signed Overflow */ 3862306a36Sopenharmony_ci#define ARM_COND_VC 0x7 /* No Signed Overflow */ 3962306a36Sopenharmony_ci#define ARM_COND_HI 0x8 /* unsigned > */ 4062306a36Sopenharmony_ci#define ARM_COND_LS 0x9 /* unsigned <= */ 4162306a36Sopenharmony_ci#define ARM_COND_GE 0xa /* Signed >= */ 4262306a36Sopenharmony_ci#define ARM_COND_LT 0xb /* Signed < */ 4362306a36Sopenharmony_ci#define ARM_COND_GT 0xc /* Signed > */ 4462306a36Sopenharmony_ci#define ARM_COND_LE 0xd /* Signed <= */ 4562306a36Sopenharmony_ci#define ARM_COND_AL 0xe /* None */ 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci/* register shift types */ 4862306a36Sopenharmony_ci#define SRTYPE_LSL 0 4962306a36Sopenharmony_ci#define SRTYPE_LSR 1 5062306a36Sopenharmony_ci#define SRTYPE_ASR 2 5162306a36Sopenharmony_ci#define SRTYPE_ROR 3 5262306a36Sopenharmony_ci#define SRTYPE_ASL (SRTYPE_LSL) 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci#define ARM_INST_ADD_R 0x00800000 5562306a36Sopenharmony_ci#define ARM_INST_ADDS_R 0x00900000 5662306a36Sopenharmony_ci#define ARM_INST_ADC_R 0x00a00000 5762306a36Sopenharmony_ci#define ARM_INST_ADC_I 0x02a00000 5862306a36Sopenharmony_ci#define ARM_INST_ADD_I 0x02800000 5962306a36Sopenharmony_ci#define ARM_INST_ADDS_I 0x02900000 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ci#define ARM_INST_AND_R 0x00000000 6262306a36Sopenharmony_ci#define ARM_INST_ANDS_R 0x00100000 6362306a36Sopenharmony_ci#define ARM_INST_AND_I 0x02000000 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci#define ARM_INST_BIC_R 0x01c00000 6662306a36Sopenharmony_ci#define ARM_INST_BIC_I 0x03c00000 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci#define ARM_INST_B 0x0a000000 6962306a36Sopenharmony_ci#define ARM_INST_BX 0x012FFF10 7062306a36Sopenharmony_ci#define ARM_INST_BLX_R 0x012fff30 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ci#define ARM_INST_CMP_R 0x01500000 7362306a36Sopenharmony_ci#define ARM_INST_CMP_I 0x03500000 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci#define ARM_INST_EOR_R 0x00200000 7662306a36Sopenharmony_ci#define ARM_INST_EOR_I 0x02200000 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci#define ARM_INST_LDST__U 0x00800000 7962306a36Sopenharmony_ci#define ARM_INST_LDST__IMM12 0x00000fff 8062306a36Sopenharmony_ci#define ARM_INST_LDRB_I 0x05500000 8162306a36Sopenharmony_ci#define ARM_INST_LDRB_R 0x07d00000 8262306a36Sopenharmony_ci#define ARM_INST_LDRD_I 0x014000d0 8362306a36Sopenharmony_ci#define ARM_INST_LDRH_I 0x015000b0 8462306a36Sopenharmony_ci#define ARM_INST_LDRH_R 0x019000b0 8562306a36Sopenharmony_ci#define ARM_INST_LDR_I 0x05100000 8662306a36Sopenharmony_ci#define ARM_INST_LDR_R 0x07900000 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci#define ARM_INST_LDM 0x08900000 8962306a36Sopenharmony_ci#define ARM_INST_LDM_IA 0x08b00000 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci#define ARM_INST_LSL_I 0x01a00000 9262306a36Sopenharmony_ci#define ARM_INST_LSL_R 0x01a00010 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ci#define ARM_INST_LSR_I 0x01a00020 9562306a36Sopenharmony_ci#define ARM_INST_LSR_R 0x01a00030 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci#define ARM_INST_ASR_I 0x01a00040 9862306a36Sopenharmony_ci#define ARM_INST_ASR_R 0x01a00050 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci#define ARM_INST_MOV_R 0x01a00000 10162306a36Sopenharmony_ci#define ARM_INST_MOVS_R 0x01b00000 10262306a36Sopenharmony_ci#define ARM_INST_MOV_I 0x03a00000 10362306a36Sopenharmony_ci#define ARM_INST_MOVW 0x03000000 10462306a36Sopenharmony_ci#define ARM_INST_MOVT 0x03400000 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ci#define ARM_INST_MUL 0x00000090 10762306a36Sopenharmony_ci 10862306a36Sopenharmony_ci#define ARM_INST_POP 0x08bd0000 10962306a36Sopenharmony_ci#define ARM_INST_PUSH 0x092d0000 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ci#define ARM_INST_ORR_R 0x01800000 11262306a36Sopenharmony_ci#define ARM_INST_ORRS_R 0x01900000 11362306a36Sopenharmony_ci#define ARM_INST_ORR_I 0x03800000 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_ci#define ARM_INST_REV 0x06bf0f30 11662306a36Sopenharmony_ci#define ARM_INST_REV16 0x06bf0fb0 11762306a36Sopenharmony_ci 11862306a36Sopenharmony_ci#define ARM_INST_RSB_I 0x02600000 11962306a36Sopenharmony_ci#define ARM_INST_RSBS_I 0x02700000 12062306a36Sopenharmony_ci#define ARM_INST_RSC_I 0x02e00000 12162306a36Sopenharmony_ci 12262306a36Sopenharmony_ci#define ARM_INST_SUB_R 0x00400000 12362306a36Sopenharmony_ci#define ARM_INST_SUBS_R 0x00500000 12462306a36Sopenharmony_ci#define ARM_INST_RSB_R 0x00600000 12562306a36Sopenharmony_ci#define ARM_INST_SUB_I 0x02400000 12662306a36Sopenharmony_ci#define ARM_INST_SUBS_I 0x02500000 12762306a36Sopenharmony_ci#define ARM_INST_SBC_I 0x02c00000 12862306a36Sopenharmony_ci#define ARM_INST_SBC_R 0x00c00000 12962306a36Sopenharmony_ci#define ARM_INST_SBCS_R 0x00d00000 13062306a36Sopenharmony_ci 13162306a36Sopenharmony_ci#define ARM_INST_STR_I 0x05000000 13262306a36Sopenharmony_ci#define ARM_INST_STRB_I 0x05400000 13362306a36Sopenharmony_ci#define ARM_INST_STRD_I 0x014000f0 13462306a36Sopenharmony_ci#define ARM_INST_STRH_I 0x014000b0 13562306a36Sopenharmony_ci 13662306a36Sopenharmony_ci#define ARM_INST_TST_R 0x01100000 13762306a36Sopenharmony_ci#define ARM_INST_TST_I 0x03100000 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ci#define ARM_INST_UDIV 0x0730f010 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_ci#define ARM_INST_UMULL 0x00800090 14262306a36Sopenharmony_ci 14362306a36Sopenharmony_ci#define ARM_INST_MLS 0x00600090 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_ci#define ARM_INST_UXTH 0x06ff0070 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ci/* 14862306a36Sopenharmony_ci * Use a suitable undefined instruction to use for ARM/Thumb2 faulting. 14962306a36Sopenharmony_ci * We need to be careful not to conflict with those used by other modules 15062306a36Sopenharmony_ci * (BUG, kprobes, etc) and the register_undef_hook() system. 15162306a36Sopenharmony_ci * 15262306a36Sopenharmony_ci * The ARM architecture reference manual guarantees that the following 15362306a36Sopenharmony_ci * instruction space will produce an undefined instruction exception on 15462306a36Sopenharmony_ci * all CPUs: 15562306a36Sopenharmony_ci * 15662306a36Sopenharmony_ci * ARM: xxxx 0111 1111 xxxx xxxx xxxx 1111 xxxx ARMv7-AR, section A5.4 15762306a36Sopenharmony_ci * Thumb: 1101 1110 xxxx xxxx ARMv7-M, section A5.2.6 15862306a36Sopenharmony_ci */ 15962306a36Sopenharmony_ci#define ARM_INST_UDF 0xe7fddef1 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ci/* register */ 16262306a36Sopenharmony_ci#define _AL3_R(op, rd, rn, rm) ((op ## _R) | (rd) << 12 | (rn) << 16 | (rm)) 16362306a36Sopenharmony_ci/* immediate */ 16462306a36Sopenharmony_ci#define _AL3_I(op, rd, rn, imm) ((op ## _I) | (rd) << 12 | (rn) << 16 | (imm)) 16562306a36Sopenharmony_ci/* register with register-shift */ 16662306a36Sopenharmony_ci#define _AL3_SR(inst) (inst | (1 << 4)) 16762306a36Sopenharmony_ci 16862306a36Sopenharmony_ci#define ARM_ADD_R(rd, rn, rm) _AL3_R(ARM_INST_ADD, rd, rn, rm) 16962306a36Sopenharmony_ci#define ARM_ADDS_R(rd, rn, rm) _AL3_R(ARM_INST_ADDS, rd, rn, rm) 17062306a36Sopenharmony_ci#define ARM_ADD_I(rd, rn, imm) _AL3_I(ARM_INST_ADD, rd, rn, imm) 17162306a36Sopenharmony_ci#define ARM_ADDS_I(rd, rn, imm) _AL3_I(ARM_INST_ADDS, rd, rn, imm) 17262306a36Sopenharmony_ci#define ARM_ADC_R(rd, rn, rm) _AL3_R(ARM_INST_ADC, rd, rn, rm) 17362306a36Sopenharmony_ci#define ARM_ADC_I(rd, rn, imm) _AL3_I(ARM_INST_ADC, rd, rn, imm) 17462306a36Sopenharmony_ci 17562306a36Sopenharmony_ci#define ARM_AND_R(rd, rn, rm) _AL3_R(ARM_INST_AND, rd, rn, rm) 17662306a36Sopenharmony_ci#define ARM_ANDS_R(rd, rn, rm) _AL3_R(ARM_INST_ANDS, rd, rn, rm) 17762306a36Sopenharmony_ci#define ARM_AND_I(rd, rn, imm) _AL3_I(ARM_INST_AND, rd, rn, imm) 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci#define ARM_BIC_R(rd, rn, rm) _AL3_R(ARM_INST_BIC, rd, rn, rm) 18062306a36Sopenharmony_ci#define ARM_BIC_I(rd, rn, imm) _AL3_I(ARM_INST_BIC, rd, rn, imm) 18162306a36Sopenharmony_ci 18262306a36Sopenharmony_ci#define ARM_B(imm24) (ARM_INST_B | ((imm24) & 0xffffff)) 18362306a36Sopenharmony_ci#define ARM_BX(rm) (ARM_INST_BX | (rm)) 18462306a36Sopenharmony_ci#define ARM_BLX_R(rm) (ARM_INST_BLX_R | (rm)) 18562306a36Sopenharmony_ci 18662306a36Sopenharmony_ci#define ARM_CMP_R(rn, rm) _AL3_R(ARM_INST_CMP, 0, rn, rm) 18762306a36Sopenharmony_ci#define ARM_CMP_I(rn, imm) _AL3_I(ARM_INST_CMP, 0, rn, imm) 18862306a36Sopenharmony_ci 18962306a36Sopenharmony_ci#define ARM_EOR_R(rd, rn, rm) _AL3_R(ARM_INST_EOR, rd, rn, rm) 19062306a36Sopenharmony_ci#define ARM_EOR_I(rd, rn, imm) _AL3_I(ARM_INST_EOR, rd, rn, imm) 19162306a36Sopenharmony_ci 19262306a36Sopenharmony_ci#define ARM_LDR_R(rt, rn, rm) (ARM_INST_LDR_R | ARM_INST_LDST__U \ 19362306a36Sopenharmony_ci | (rt) << 12 | (rn) << 16 \ 19462306a36Sopenharmony_ci | (rm)) 19562306a36Sopenharmony_ci#define ARM_LDR_R_SI(rt, rn, rm, type, imm) \ 19662306a36Sopenharmony_ci (ARM_INST_LDR_R | ARM_INST_LDST__U \ 19762306a36Sopenharmony_ci | (rt) << 12 | (rn) << 16 \ 19862306a36Sopenharmony_ci | (imm) << 7 | (type) << 5 | (rm)) 19962306a36Sopenharmony_ci#define ARM_LDRB_R(rt, rn, rm) (ARM_INST_LDRB_R | ARM_INST_LDST__U \ 20062306a36Sopenharmony_ci | (rt) << 12 | (rn) << 16 \ 20162306a36Sopenharmony_ci | (rm)) 20262306a36Sopenharmony_ci#define ARM_LDRH_R(rt, rn, rm) (ARM_INST_LDRH_R | ARM_INST_LDST__U \ 20362306a36Sopenharmony_ci | (rt) << 12 | (rn) << 16 \ 20462306a36Sopenharmony_ci | (rm)) 20562306a36Sopenharmony_ci 20662306a36Sopenharmony_ci#define ARM_LDM(rn, regs) (ARM_INST_LDM | (rn) << 16 | (regs)) 20762306a36Sopenharmony_ci#define ARM_LDM_IA(rn, regs) (ARM_INST_LDM_IA | (rn) << 16 | (regs)) 20862306a36Sopenharmony_ci 20962306a36Sopenharmony_ci#define ARM_LSL_R(rd, rn, rm) (_AL3_R(ARM_INST_LSL, rd, 0, rn) | (rm) << 8) 21062306a36Sopenharmony_ci#define ARM_LSL_I(rd, rn, imm) (_AL3_I(ARM_INST_LSL, rd, 0, rn) | (imm) << 7) 21162306a36Sopenharmony_ci 21262306a36Sopenharmony_ci#define ARM_LSR_R(rd, rn, rm) (_AL3_R(ARM_INST_LSR, rd, 0, rn) | (rm) << 8) 21362306a36Sopenharmony_ci#define ARM_LSR_I(rd, rn, imm) (_AL3_I(ARM_INST_LSR, rd, 0, rn) | (imm) << 7) 21462306a36Sopenharmony_ci#define ARM_ASR_R(rd, rn, rm) (_AL3_R(ARM_INST_ASR, rd, 0, rn) | (rm) << 8) 21562306a36Sopenharmony_ci#define ARM_ASR_I(rd, rn, imm) (_AL3_I(ARM_INST_ASR, rd, 0, rn) | (imm) << 7) 21662306a36Sopenharmony_ci 21762306a36Sopenharmony_ci#define ARM_MOV_R(rd, rm) _AL3_R(ARM_INST_MOV, rd, 0, rm) 21862306a36Sopenharmony_ci#define ARM_MOVS_R(rd, rm) _AL3_R(ARM_INST_MOVS, rd, 0, rm) 21962306a36Sopenharmony_ci#define ARM_MOV_I(rd, imm) _AL3_I(ARM_INST_MOV, rd, 0, imm) 22062306a36Sopenharmony_ci#define ARM_MOV_SR(rd, rm, type, rs) \ 22162306a36Sopenharmony_ci (_AL3_SR(ARM_MOV_R(rd, rm)) | (type) << 5 | (rs) << 8) 22262306a36Sopenharmony_ci#define ARM_MOV_SI(rd, rm, type, imm6) \ 22362306a36Sopenharmony_ci (ARM_MOV_R(rd, rm) | (type) << 5 | (imm6) << 7) 22462306a36Sopenharmony_ci 22562306a36Sopenharmony_ci#define ARM_MOVW(rd, imm) \ 22662306a36Sopenharmony_ci (ARM_INST_MOVW | ((imm) >> 12) << 16 | (rd) << 12 | ((imm) & 0x0fff)) 22762306a36Sopenharmony_ci 22862306a36Sopenharmony_ci#define ARM_MOVT(rd, imm) \ 22962306a36Sopenharmony_ci (ARM_INST_MOVT | ((imm) >> 12) << 16 | (rd) << 12 | ((imm) & 0x0fff)) 23062306a36Sopenharmony_ci 23162306a36Sopenharmony_ci#define ARM_MUL(rd, rm, rn) (ARM_INST_MUL | (rd) << 16 | (rm) << 8 | (rn)) 23262306a36Sopenharmony_ci 23362306a36Sopenharmony_ci#define ARM_POP(regs) (ARM_INST_POP | (regs)) 23462306a36Sopenharmony_ci#define ARM_PUSH(regs) (ARM_INST_PUSH | (regs)) 23562306a36Sopenharmony_ci 23662306a36Sopenharmony_ci#define ARM_ORR_R(rd, rn, rm) _AL3_R(ARM_INST_ORR, rd, rn, rm) 23762306a36Sopenharmony_ci#define ARM_ORR_I(rd, rn, imm) _AL3_I(ARM_INST_ORR, rd, rn, imm) 23862306a36Sopenharmony_ci#define ARM_ORR_SR(rd, rn, rm, type, rs) \ 23962306a36Sopenharmony_ci (_AL3_SR(ARM_ORR_R(rd, rn, rm)) | (type) << 5 | (rs) << 8) 24062306a36Sopenharmony_ci#define ARM_ORRS_R(rd, rn, rm) _AL3_R(ARM_INST_ORRS, rd, rn, rm) 24162306a36Sopenharmony_ci#define ARM_ORRS_SR(rd, rn, rm, type, rs) \ 24262306a36Sopenharmony_ci (_AL3_SR(ARM_ORRS_R(rd, rn, rm)) | (type) << 5 | (rs) << 8) 24362306a36Sopenharmony_ci#define ARM_ORR_SI(rd, rn, rm, type, imm6) \ 24462306a36Sopenharmony_ci (ARM_ORR_R(rd, rn, rm) | (type) << 5 | (imm6) << 7) 24562306a36Sopenharmony_ci#define ARM_ORRS_SI(rd, rn, rm, type, imm6) \ 24662306a36Sopenharmony_ci (ARM_ORRS_R(rd, rn, rm) | (type) << 5 | (imm6) << 7) 24762306a36Sopenharmony_ci 24862306a36Sopenharmony_ci#define ARM_REV(rd, rm) (ARM_INST_REV | (rd) << 12 | (rm)) 24962306a36Sopenharmony_ci#define ARM_REV16(rd, rm) (ARM_INST_REV16 | (rd) << 12 | (rm)) 25062306a36Sopenharmony_ci 25162306a36Sopenharmony_ci#define ARM_RSB_I(rd, rn, imm) _AL3_I(ARM_INST_RSB, rd, rn, imm) 25262306a36Sopenharmony_ci#define ARM_RSBS_I(rd, rn, imm) _AL3_I(ARM_INST_RSBS, rd, rn, imm) 25362306a36Sopenharmony_ci#define ARM_RSC_I(rd, rn, imm) _AL3_I(ARM_INST_RSC, rd, rn, imm) 25462306a36Sopenharmony_ci 25562306a36Sopenharmony_ci#define ARM_SUB_R(rd, rn, rm) _AL3_R(ARM_INST_SUB, rd, rn, rm) 25662306a36Sopenharmony_ci#define ARM_SUBS_R(rd, rn, rm) _AL3_R(ARM_INST_SUBS, rd, rn, rm) 25762306a36Sopenharmony_ci#define ARM_RSB_R(rd, rn, rm) _AL3_R(ARM_INST_RSB, rd, rn, rm) 25862306a36Sopenharmony_ci#define ARM_SBC_R(rd, rn, rm) _AL3_R(ARM_INST_SBC, rd, rn, rm) 25962306a36Sopenharmony_ci#define ARM_SBCS_R(rd, rn, rm) _AL3_R(ARM_INST_SBCS, rd, rn, rm) 26062306a36Sopenharmony_ci#define ARM_SUB_I(rd, rn, imm) _AL3_I(ARM_INST_SUB, rd, rn, imm) 26162306a36Sopenharmony_ci#define ARM_SUBS_I(rd, rn, imm) _AL3_I(ARM_INST_SUBS, rd, rn, imm) 26262306a36Sopenharmony_ci#define ARM_SBC_I(rd, rn, imm) _AL3_I(ARM_INST_SBC, rd, rn, imm) 26362306a36Sopenharmony_ci 26462306a36Sopenharmony_ci#define ARM_TST_R(rn, rm) _AL3_R(ARM_INST_TST, 0, rn, rm) 26562306a36Sopenharmony_ci#define ARM_TST_I(rn, imm) _AL3_I(ARM_INST_TST, 0, rn, imm) 26662306a36Sopenharmony_ci 26762306a36Sopenharmony_ci#define ARM_UDIV(rd, rn, rm) (ARM_INST_UDIV | (rd) << 16 | (rn) | (rm) << 8) 26862306a36Sopenharmony_ci 26962306a36Sopenharmony_ci#define ARM_UMULL(rd_lo, rd_hi, rn, rm) (ARM_INST_UMULL | (rd_hi) << 16 \ 27062306a36Sopenharmony_ci | (rd_lo) << 12 | (rm) << 8 | rn) 27162306a36Sopenharmony_ci 27262306a36Sopenharmony_ci#define ARM_MLS(rd, rn, rm, ra) (ARM_INST_MLS | (rd) << 16 | (rn) | (rm) << 8 \ 27362306a36Sopenharmony_ci | (ra) << 12) 27462306a36Sopenharmony_ci#define ARM_UXTH(rd, rm) (ARM_INST_UXTH | (rd) << 12 | (rm)) 27562306a36Sopenharmony_ci 27662306a36Sopenharmony_ci#endif /* PFILTER_OPCODES_ARM_H */ 277