Lines Matching refs:imm
175 static bool is_addsub_imm(u32 imm) in is_addsub_imm() argument
178 return !(imm & ~0xfff) || !(imm & ~0xfff000); in is_addsub_imm()
436 const s32 imm = insn->imm; in build_insn() local
446 #define check_imm(bits, imm) do { \ in build_insn() argument
447 if ((((imm) > 0) && ((imm) >> (bits))) || \ in build_insn()
448 (((imm) < 0) && (~(imm) >> (bits)))) { \ in build_insn()
450 i, imm, imm); \ in build_insn()
454 #define check_imm19(imm) check_imm(19, imm) in build_insn() argument
455 #define check_imm26(imm) check_imm(26, imm) in build_insn() argument
529 switch (imm) { in build_insn()
545 switch (imm) { in build_insn()
562 emit_a64_mov_i(is64, dst, imm, ctx); in build_insn()
567 if (is_addsub_imm(imm)) { in build_insn()
568 emit(A64_ADD_I(is64, dst, dst, imm), ctx); in build_insn()
569 } else if (is_addsub_imm(-imm)) { in build_insn()
570 emit(A64_SUB_I(is64, dst, dst, -imm), ctx); in build_insn()
572 emit_a64_mov_i(is64, tmp, imm, ctx); in build_insn()
578 if (is_addsub_imm(imm)) { in build_insn()
579 emit(A64_SUB_I(is64, dst, dst, imm), ctx); in build_insn()
580 } else if (is_addsub_imm(-imm)) { in build_insn()
581 emit(A64_ADD_I(is64, dst, dst, -imm), ctx); in build_insn()
583 emit_a64_mov_i(is64, tmp, imm, ctx); in build_insn()
589 a64_insn = A64_AND_I(is64, dst, dst, imm); in build_insn()
593 emit_a64_mov_i(is64, tmp, imm, ctx); in build_insn()
599 a64_insn = A64_ORR_I(is64, dst, dst, imm); in build_insn()
603 emit_a64_mov_i(is64, tmp, imm, ctx); in build_insn()
609 a64_insn = A64_EOR_I(is64, dst, dst, imm); in build_insn()
613 emit_a64_mov_i(is64, tmp, imm, ctx); in build_insn()
619 emit_a64_mov_i(is64, tmp, imm, ctx); in build_insn()
624 emit_a64_mov_i(is64, tmp, imm, ctx); in build_insn()
629 emit_a64_mov_i(is64, tmp2, imm, ctx); in build_insn()
635 emit(A64_LSL(is64, dst, dst, imm), ctx); in build_insn()
639 emit(A64_LSR(is64, dst, dst, imm), ctx); in build_insn()
643 emit(A64_ASR(is64, dst, dst, imm), ctx); in build_insn()
739 if (is_addsub_imm(imm)) { in build_insn()
740 emit(A64_CMP_I(is64, dst, imm), ctx); in build_insn()
741 } else if (is_addsub_imm(-imm)) { in build_insn()
742 emit(A64_CMN_I(is64, dst, -imm), ctx); in build_insn()
744 emit_a64_mov_i(is64, tmp, imm, ctx); in build_insn()
750 a64_insn = A64_TST_I(is64, dst, imm); in build_insn()
754 emit_a64_mov_i(is64, tmp, imm, ctx); in build_insn()
796 imm64 = (u64)insn1.imm << 32 | (u32)imm; in build_insn()
852 emit_a64_mov_i(1, tmp, imm, ctx); in build_insn()