Lines Matching refs:dst

284 	const u8 dst = regmap[insn->dst_reg];
290 emit_insn(ctx, addd, t1, dst, t1);
294 /* lock *(size *)(dst + off) <op>= src */
319 /* src = atomic_fetch_<op>(dst + off, src) */
352 /* src = atomic_xchg(dst + off, src); */
361 /* r0 = atomic_cmpxchg(dst + off, r0, src); */
461 const u8 dst = regmap[insn->dst_reg];
467 /* dst = src */
470 move_reg(ctx, dst, src);
471 emit_zext_32(ctx, dst, is32);
474 /* dst = imm */
477 move_imm(ctx, dst, imm, is32);
480 /* dst = dst + src */
483 emit_insn(ctx, addd, dst, dst, src);
484 emit_zext_32(ctx, dst, is32);
487 /* dst = dst + imm */
491 emit_insn(ctx, addid, dst, dst, imm);
494 emit_insn(ctx, addd, dst, dst, t1);
496 emit_zext_32(ctx, dst, is32);
499 /* dst = dst - src */
502 emit_insn(ctx, subd, dst, dst, src);
503 emit_zext_32(ctx, dst, is32);
506 /* dst = dst - imm */
510 emit_insn(ctx, addid, dst, dst, -imm);
513 emit_insn(ctx, subd, dst, dst, t1);
515 emit_zext_32(ctx, dst, is32);
518 /* dst = dst * src */
521 emit_insn(ctx, muld, dst, dst, src);
522 emit_zext_32(ctx, dst, is32);
525 /* dst = dst * imm */
529 emit_insn(ctx, muld, dst, dst, t1);
530 emit_zext_32(ctx, dst, is32);
533 /* dst = dst / src */
536 emit_zext_32(ctx, dst, is32);
539 emit_insn(ctx, divdu, dst, dst, t1);
540 emit_zext_32(ctx, dst, is32);
543 /* dst = dst / imm */
547 emit_zext_32(ctx, dst, is32);
548 emit_insn(ctx, divdu, dst, dst, t1);
549 emit_zext_32(ctx, dst, is32);
552 /* dst = dst % src */
555 emit_zext_32(ctx, dst, is32);
558 emit_insn(ctx, moddu, dst, dst, t1);
559 emit_zext_32(ctx, dst, is32);
562 /* dst = dst % imm */
566 emit_zext_32(ctx, dst, is32);
567 emit_insn(ctx, moddu, dst, dst, t1);
568 emit_zext_32(ctx, dst, is32);
571 /* dst = -dst */
575 emit_insn(ctx, subd, dst, LOONGARCH_GPR_ZERO, dst);
576 emit_zext_32(ctx, dst, is32);
579 /* dst = dst & src */
582 emit_insn(ctx, and, dst, dst, src);
583 emit_zext_32(ctx, dst, is32);
586 /* dst = dst & imm */
590 emit_insn(ctx, andi, dst, dst, imm);
593 emit_insn(ctx, and, dst, dst, t1);
595 emit_zext_32(ctx, dst, is32);
598 /* dst = dst | src */
601 emit_insn(ctx, or, dst, dst, src);
602 emit_zext_32(ctx, dst, is32);
605 /* dst = dst | imm */
609 emit_insn(ctx, ori, dst, dst, imm);
612 emit_insn(ctx, or, dst, dst, t1);
614 emit_zext_32(ctx, dst, is32);
617 /* dst = dst ^ src */
620 emit_insn(ctx, xor, dst, dst, src);
621 emit_zext_32(ctx, dst, is32);
624 /* dst = dst ^ imm */
628 emit_insn(ctx, xori, dst, dst, imm);
631 emit_insn(ctx, xor, dst, dst, t1);
633 emit_zext_32(ctx, dst, is32);
636 /* dst = dst << src (logical) */
638 emit_insn(ctx, sllw, dst, dst, src);
639 emit_zext_32(ctx, dst, is32);
643 emit_insn(ctx, slld, dst, dst, src);
646 /* dst = dst << imm (logical) */
648 emit_insn(ctx, slliw, dst, dst, imm);
649 emit_zext_32(ctx, dst, is32);
653 emit_insn(ctx, sllid, dst, dst, imm);
656 /* dst = dst >> src (logical) */
658 emit_insn(ctx, srlw, dst, dst, src);
659 emit_zext_32(ctx, dst, is32);
663 emit_insn(ctx, srld, dst, dst, src);
666 /* dst = dst >> imm (logical) */
668 emit_insn(ctx, srliw, dst, dst, imm);
669 emit_zext_32(ctx, dst, is32);
673 emit_insn(ctx, srlid, dst, dst, imm);
676 /* dst = dst >> src (arithmetic) */
678 emit_insn(ctx, sraw, dst, dst, src);
679 emit_zext_32(ctx, dst, is32);
683 emit_insn(ctx, srad, dst, dst, src);
686 /* dst = dst >> imm (arithmetic) */
688 emit_insn(ctx, sraiw, dst, dst, imm);
689 emit_zext_32(ctx, dst, is32);
693 emit_insn(ctx, sraid, dst, dst, imm);
696 /* dst = BSWAP##imm(dst) */
701 emit_insn(ctx, bstrpickd, dst, dst, 15, 0);
705 emit_zext_32(ctx, dst, is32);
716 emit_insn(ctx, revb2h, dst, dst);
718 emit_insn(ctx, bstrpickd, dst, dst, 15, 0);
721 emit_insn(ctx, revb2w, dst, dst);
723 emit_zext_32(ctx, dst, is32);
726 emit_insn(ctx, revbd, dst, dst);
731 /* PC += off if dst cond src */
753 move_reg(ctx, t1, dst);
766 /* PC += off if dst cond imm */
795 move_reg(ctx, t2, dst);
807 /* PC += off if dst & src */
811 emit_insn(ctx, and, t1, dst, src);
817 /* PC += off if dst & imm */
822 emit_insn(ctx, and, t1, dst, t1);
865 /* dst = imm64 */
870 move_imm(ctx, dst, imm64, is32);
874 /* dst = *(size *)(src + off) */
886 emit_insn(ctx, ldbu, dst, src, off);
889 emit_insn(ctx, ldxbu, dst, src, t1);
894 emit_insn(ctx, ldhu, dst, src, off);
897 emit_insn(ctx, ldxhu, dst, src, t1);
902 emit_insn(ctx, ldwu, dst, src, off);
904 emit_insn(ctx, ldptrw, dst, src, off);
907 emit_insn(ctx, ldxwu, dst, src, t1);
912 emit_insn(ctx, ldxd, dst, src, t1);
916 ret = add_exception_handler(insn, ctx, dst);
921 /* *(size *)(dst + off) = imm */
930 emit_insn(ctx, stb, t1, dst, off);
933 emit_insn(ctx, stxb, t1, dst, t2);
939 emit_insn(ctx, sth, t1, dst, off);
942 emit_insn(ctx, stxh, t1, dst, t2);
948 emit_insn(ctx, stw, t1, dst, off);
950 emit_insn(ctx, stptrw, t1, dst, off);
953 emit_insn(ctx, stxw, t1, dst, t2);
959 emit_insn(ctx, std, t1, dst, off);
961 emit_insn(ctx, stptrd, t1, dst, off);
964 emit_insn(ctx, stxd, t1, dst, t2);
970 /* *(size *)(dst + off) = src */
978 emit_insn(ctx, stb, src, dst, off);
981 emit_insn(ctx, stxb, src, dst, t1);
986 emit_insn(ctx, sth, src, dst, off);
989 emit_insn(ctx, stxh, src, dst, t1);
994 emit_insn(ctx, stw, src, dst, off);
996 emit_insn(ctx, stptrw, src, dst, off);
999 emit_insn(ctx, stxw, src, dst, t1);
1004 emit_insn(ctx, std, src, dst, off);
1006 emit_insn(ctx, stptrd, src, dst, off);
1009 emit_insn(ctx, stxd, src, dst, t1);