Lines Matching refs:reg

516 	sljit_si reg;  in emit_op_imm()  local
527 reg = (flags & ARG2_IMM) ? arg1 : arg2; in emit_op_imm()
546 if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(reg, dst)) { in emit_op_imm()
548 return push_inst16(compiler, ADDSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); in emit_op_imm()
550 return push_inst16(compiler, SUBSI3 | IMM3(nimm) | RD3(dst) | RN3(reg)); in emit_op_imm()
551 if (reg == dst) { in emit_op_imm()
560 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(imm)); in emit_op_imm()
562 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(nimm)); in emit_op_imm()
566 return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
571 return push_inst32(compiler, ADCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
575 if (!(flags & KEEP_FLAGS) && imm == 0 && IS_2_LO_REGS(reg, dst)) in emit_op_imm()
576 return push_inst16(compiler, RSBSI | RD3(dst) | RN3(reg)); in emit_op_imm()
579 return push_inst32(compiler, RSB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
583 if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(reg, dst)) { in emit_op_imm()
585 return push_inst16(compiler, SUBSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); in emit_op_imm()
587 return push_inst16(compiler, ADDSI3 | IMM3(nimm) | RD3(dst) | RN3(reg)); in emit_op_imm()
588 if (reg == dst) { in emit_op_imm()
595 return push_inst16(compiler, CMPI | IMM8(imm) | RDN3(reg)); in emit_op_imm()
599 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(imm)); in emit_op_imm()
601 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(nimm)); in emit_op_imm()
605 return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
612 return push_inst32(compiler, SBCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
617 return push_inst32(compiler, ANDI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
620 return push_inst32(compiler, BICI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
625 return push_inst32(compiler, ORRI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
628 return push_inst32(compiler, ORNI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
633 return push_inst32(compiler, EORI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
643 return push_inst16(compiler, MOV | SET_REGS44(dst, reg)); in emit_op_imm()
644 if (IS_2_LO_REGS(dst, reg)) in emit_op_imm()
645 return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg)); in emit_op_imm()
646 return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg)); in emit_op_imm()
650 if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg)) in emit_op_imm()
651 return push_inst16(compiler, LSLSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
652 return push_inst32(compiler, LSL_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
654 if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg)) in emit_op_imm()
655 return push_inst16(compiler, LSRSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
656 return push_inst32(compiler, LSR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
658 if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg)) in emit_op_imm()
659 return push_inst16(compiler, ASRSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
660 return push_inst32(compiler, ASR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
870 static sljit_si emit_set_delta(struct sljit_compiler *compiler, sljit_si dst, sljit_si reg, sljit_s… in emit_set_delta() argument
874 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(value)); in emit_set_delta()
877 return push_inst32(compiler, ADD_WI | RD4(dst) | RN4(reg) | value); in emit_set_delta()
882 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(value)); in emit_set_delta()
885 return push_inst32(compiler, SUB_WI | RD4(dst) | RN4(reg) | value); in emit_set_delta()
891 static sljit_si getput_arg_fast(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, slji… in getput_arg_fast() argument
911 …FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | MEM_IMM8 | RT4(reg) | RN4(arg) | 0x100 | argw)); in getput_arg_fast()
925 if (!argw && IS_3_LO_REGS(reg, arg, other_r)) in getput_arg_fast()
926 FAIL_IF(push_inst16(compiler, sljit_mem16[flags] | RD3(reg) | RN3(arg) | RM3(other_r))); in getput_arg_fast()
928 …FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(other_r) | (argw << 4… in getput_arg_fast()
939 if (IS_2_LO_REGS(reg, arg) && sljit_mem16_imm5[flags]) { in getput_arg_fast()
957 …FAIL_IF(push_inst16(compiler, sljit_mem16_imm5[flags] | RD3(reg) | RN3(arg) | (argw << (6 - shift)… in getput_arg_fast()
963 …if (SLJIT_UNLIKELY(arg == SLJIT_SP) && OFFSET_CHECK(0xff, 2) && IS_WORD_SIZE(flags) && reg_map[reg in getput_arg_fast()
964 FAIL_IF(push_inst16(compiler, STR_SP | ((flags & STORE) ? 0 : 0x800) | RDN3(reg) | (argw >> 2))); in getput_arg_fast()
969 FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(arg) | argw)); in getput_arg_fast()
971 FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | MEM_IMM8 | RT4(reg) | RN4(arg) | -argw)); in getput_arg_fast()
1002 static sljit_si getput_arg(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, in getput_arg() argument
1014 tmp_r = (flags & STORE) ? TMP_REG3 : reg; in getput_arg()
1025 FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(arg) | argw)); in getput_arg()
1052 if (!argw && IS_3_LO_REGS(reg, arg, other_r)) { in getput_arg()
1053 FAIL_IF(push_inst16(compiler, sljit_mem16[flags] | RD3(reg) | RN3(arg) | RM3(other_r))); in getput_arg()
1056 …FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(other_r) | (argw << 4… in getput_arg()
1066 return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(TMP_REG3) | diff); in getput_arg()
1068 …return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM8 | RT4(reg) | RN4(TMP_REG3) | (compiler-… in getput_arg()
1071 return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(TMP_REG3) | 0); in getput_arg()
1079 return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(TMP_REG3)); in getput_arg()
1083 return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(TMP_REG3)); in getput_arg()
1106 return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(TMP_REG3)); in getput_arg()
1107 return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(TMP_REG3) | 0); in getput_arg()
1110 …t_si emit_op_mem(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_si arg, slji… in emit_op_mem() argument
1112 if (getput_arg_fast(compiler, flags, reg, arg, argw)) in emit_op_mem()
1116 return getput_arg(compiler, flags, reg, arg, argw, 0, 0); in emit_op_mem()
1119 …_si emit_op_mem2(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_si arg1, slj… in emit_op_mem2() argument
1121 if (getput_arg_fast(compiler, flags, reg, arg1, arg1w)) in emit_op_mem2()
1123 return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w); in emit_op_mem2()
1494 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg) in sljit_get_register_index() argument
1496 CHECK_REG_INDEX(check_sljit_get_register_index(reg)); in sljit_get_register_index()
1497 return reg_map[reg]; in sljit_get_register_index()
1500 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_float_register_index(sljit_si reg) in sljit_get_float_register_index() argument
1502 CHECK_REG_INDEX(check_sljit_get_float_register_index(reg)); in sljit_get_float_register_index()
1503 return reg << 1; in sljit_get_float_register_index()
1533 static sljit_si emit_fop_mem(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_s… in emit_fop_mem() argument
1550 return push_inst32(compiler, inst | 0x800000 | RN4(arg & REG_MASK) | DD4(reg) | (argw >> 2)); in emit_fop_mem()
1552 return push_inst32(compiler, inst | RN4(arg & REG_MASK) | DD4(reg) | (-argw >> 2)); in emit_fop_mem()
1560 return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG3) | DD4(reg) | (tmp >> 2)); in emit_fop_mem()
1562 return push_inst32(compiler, inst | RN4(TMP_REG3) | DD4(reg) | (-tmp >> 2)); in emit_fop_mem()
1566 return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG3) | DD4(reg)); in emit_fop_mem()
1573 return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG1) | DD4(reg)); in emit_fop_mem()
1578 return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG1) | DD4(reg) | ((argw & 0x3fc) >> 2)); in emit_fop_mem()
1584 return push_inst32(compiler, inst | RN4(TMP_REG1) | DD4(reg) | ((argw & 0x3fc) >> 2)); in emit_fop_mem()
1594 return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG3) | DD4(reg)); in emit_fop_mem()