Lines Matching full:len

1315 	u8 len = 0;  in mov_r32()  local
1319 len = arc_sexb_r(buf, REG_LO(rd), REG_LO(rs)); in mov_r32()
1321 len = arc_sexh_r(buf, REG_LO(rd), REG_LO(rs)); in mov_r32()
1323 len = arc_mov_r(buf, REG_LO(rd), REG_LO(rs)); in mov_r32()
1325 return len; in mov_r32()
1331 len = arc_mov_r(buf, REG_LO(rd), REG_LO(rs)); in mov_r32()
1333 return len; in mov_r32()
1343 u8 len = 0; in mov_r64() local
1347 len = mov_r32(buf, rd, rs, sign_ext); in mov_r64()
1351 len += arc_asri_r(BUF(buf, len), in mov_r64()
1355 return len; in mov_r64()
1363 len = arc_mov_r(buf, REG_LO(rd), REG_LO(rs)); in mov_r64()
1366 len += arc_mov_r(BUF(buf, len), REG_HI(rd), REG_HI(rs)); in mov_r64()
1369 len += arc_movi_r(BUF(buf, len), REG_HI(rd), 0); in mov_r64()
1371 return len; in mov_r64()
1377 u8 len = 0; in mov_r64_i32() local
1379 len = arc_mov_i(buf, REG_LO(reg), imm); in mov_r64_i32()
1384 len += arc_movi_r(BUF(buf, len), REG_HI(reg), 0); in mov_r64_i32()
1386 len += arc_movi_r(BUF(buf, len), REG_HI(reg), -1); in mov_r64_i32()
1389 return len; in mov_r64_i32()
1421 u8 len; in mov_r64_i64() local
1423 len = arc_mov_i_fixed(buf, REG_LO(reg), lo); in mov_r64_i64()
1424 len += arc_mov_i_fixed(BUF(buf, len), REG_HI(reg), hi); in mov_r64_i64()
1426 return len; in mov_r64_i64()
1445 u8 len = 0; in adjust_mem_access() local
1450 len += arc_add_i(BUF(buf, len), in adjust_mem_access()
1456 return len; in adjust_mem_access()
1462 u8 len, arc_reg_mem; in store_r() local
1464 len = adjust_mem_access(buf, &off, size, rd, &arc_reg_mem); in store_r()
1467 len += arc_st_r(BUF(buf, len), REG_LO(rs), arc_reg_mem, in store_r()
1469 len += arc_st_r(BUF(buf, len), REG_HI(rs), arc_reg_mem, in store_r()
1474 len += arc_st_r(BUF(buf, len), REG_LO(rs), arc_reg_mem, in store_r()
1478 return len; in store_r()
1493 u8 len, arc_reg_mem; in store_i() local
1497 len = adjust_mem_access(buf, &off, size, rd, &arc_reg_mem); in store_i()
1500 len += arc_mov_i(BUF(buf, len), arc_rs, imm); in store_i()
1501 len += arc_st_r(BUF(buf, len), arc_rs, arc_reg_mem, in store_i()
1504 len += arc_mov_i(BUF(buf, len), arc_rs, imm); in store_i()
1505 len += arc_st_r(BUF(buf, len), arc_rs, arc_reg_mem, in store_i()
1510 len += arc_mov_i(BUF(buf, len), arc_rs, imm); in store_i()
1511 len += arc_st_r(BUF(buf, len), arc_rs, arc_reg_mem, off, zz); in store_i()
1514 return len; in store_i()
1523 u8 len = 0; in push_r64() local
1528 len += arc_push_r(BUF(buf, len), REG_HI(reg)); in push_r64()
1529 len += arc_push_r(BUF(buf, len), REG_LO(reg)); in push_r64()
1531 len += arc_push_r(BUF(buf, len), REG_LO(reg)); in push_r64()
1533 len += arc_push_r(BUF(buf, len), REG_HI(reg)); in push_r64()
1536 return len; in push_r64()
1542 u8 len, arc_reg_mem; in load_r() local
1544 len = adjust_mem_access(buf, &off, size, rs, &arc_reg_mem); in load_r()
1551 len += arc_ldx_r(BUF(buf, len), REG_LO(rd), in load_r()
1554 len += arc_ld_r(BUF(buf, len), REG_LO(rd), in load_r()
1560 len += arc_asri_r(BUF(buf, len), in load_r()
1563 len += arc_movi_r(BUF(buf, len), REG_HI(rd), 0); in load_r()
1580 len += arc_ld_r(BUF(buf, len), REG_LO(rd), arc_reg_mem, in load_r()
1582 len += arc_ld_r(BUF(buf, len), REG_HI(rd), arc_reg_mem, in load_r()
1585 len += arc_ld_r(BUF(buf, len), REG_HI(rd), arc_reg_mem, in load_r()
1587 len += arc_ld_r(BUF(buf, len), REG_LO(rd), arc_reg_mem, in load_r()
1592 return len; in load_r()
1610 u8 len; in add_r64() local
1612 len = arc_addf_r(buf, REG_LO(rd), REG_LO(rs)); in add_r64()
1613 len += arc_adc_r(BUF(buf, len), REG_HI(rd), REG_HI(rs)); in add_r64()
1614 return len; in add_r64()
1619 u8 len; in add_r64_i32() local
1622 len = arc_addif_r(buf, REG_LO(rd), imm); in add_r64_i32()
1623 len += arc_adci_r(BUF(buf, len), REG_HI(rd), 0); in add_r64_i32()
1625 len = mov_r64_i32(buf, JIT_REG_TMP, imm); in add_r64_i32()
1626 len += add_r64(BUF(buf, len), rd, JIT_REG_TMP); in add_r64_i32()
1628 return len; in add_r64_i32()
1646 u8 len; in sub_r64() local
1648 len = arc_subf_r(buf, REG_LO(rd), REG_LO(rs)); in sub_r64()
1649 len += arc_sbc_r(BUF(buf, len), REG_HI(rd), REG_HI(rs)); in sub_r64()
1650 return len; in sub_r64()
1655 u8 len; in sub_r64_i32() local
1657 len = mov_r64_i32(buf, JIT_REG_TMP, imm); in sub_r64_i32()
1658 len += sub_r64(BUF(buf, len), rd, JIT_REG_TMP); in sub_r64_i32()
1659 return len; in sub_r64_i32()
1675 u8 len; in neg_r64() local
1677 len = arc_not_r(buf, REG_LO(r), REG_LO(r)); in neg_r64()
1678 len += arc_not_r(BUF(buf, len), REG_HI(r), REG_HI(r)); in neg_r64()
1679 len += add_r64_i32(BUF(buf, len), r, 1); in neg_r64()
1680 return len; in neg_r64()
1710 u8 len; in mul_r64() local
1712 len = arc_mpy_r(buf, t0, B_hi, C_lo); in mul_r64()
1713 len += arc_mpy_r(BUF(buf, len), t1, B_lo, C_hi); in mul_r64()
1714 len += arc_mpydu_r(BUF(buf, len), B_lo, C_lo); in mul_r64()
1715 len += arc_add_r(BUF(buf, len), B_hi, t0); in mul_r64()
1716 len += arc_add_r(BUF(buf, len), B_hi, t1); in mul_r64()
1718 return len; in mul_r64()
1754 u8 len = 0; in mul_r64_i32() local
1761 len += arc_neg_r(BUF(buf, len), t1, B_lo); in mul_r64_i32()
1763 len += arc_mpy_i(BUF(buf, len), t0, B_hi, imm); in mul_r64_i32()
1764 len += arc_mpydu_i(BUF(buf, len), B_lo, imm); in mul_r64_i32()
1765 len += arc_add_r(BUF(buf, len), B_hi, t0); in mul_r64_i32()
1769 len += arc_add_r(BUF(buf, len), B_hi, t1); in mul_r64_i32()
1771 return len; in mul_r64_i32()
1824 u8 len; in and_r64() local
1826 len = arc_and_r(buf, REG_LO(rd), REG_LO(rs)); in and_r64()
1827 len += arc_and_r(BUF(buf, len), REG_HI(rd), REG_HI(rs)); in and_r64()
1828 return len; in and_r64()
1833 u8 len; in and_r64_i32() local
1835 len = mov_r64_i32(buf, JIT_REG_TMP, imm); in and_r64_i32()
1836 len += and_r64(BUF(buf, len), rd, JIT_REG_TMP); in and_r64_i32()
1837 return len; in and_r64_i32()
1857 u8 len; in or_r64() local
1859 len = arc_or_r(buf, REG_LO(rd), REG_LO(rd), REG_LO(rs)); in or_r64()
1860 len += arc_or_r(BUF(buf, len), REG_HI(rd), REG_HI(rd), REG_HI(rs)); in or_r64()
1861 return len; in or_r64()
1866 u8 len; in or_r64_i32() local
1868 len = mov_r64_i32(buf, JIT_REG_TMP, imm); in or_r64_i32()
1869 len += or_r64(BUF(buf, len), rd, JIT_REG_TMP); in or_r64_i32()
1870 return len; in or_r64_i32()
1885 u8 len; in xor_r64() local
1887 len = arc_xor_r(buf, REG_LO(rd), REG_LO(rs)); in xor_r64()
1888 len += arc_xor_r(BUF(buf, len), REG_HI(rd), REG_HI(rs)); in xor_r64()
1889 return len; in xor_r64()
1894 u8 len; in xor_r64_i32() local
1896 len = mov_r64_i32(buf, JIT_REG_TMP, imm); in xor_r64_i32()
1897 len += xor_r64(BUF(buf, len), rd, JIT_REG_TMP); in xor_r64_i32()
1898 return len; in xor_r64_i32()
1955 u8 len; in lsh_r64() local
1957 len = arc_not_r(buf, t0, C_lo); in lsh_r64()
1958 len += arc_lsri_r(BUF(buf, len), t1, B_lo, 1); in lsh_r64()
1959 len += arc_lsr_r(BUF(buf, len), t1, t1, t0); in lsh_r64()
1960 len += arc_mov_r(BUF(buf, len), t0, C_lo); in lsh_r64()
1961 len += arc_asl_r(BUF(buf, len), B_lo, B_lo, t0); in lsh_r64()
1962 len += arc_asl_r(BUF(buf, len), B_hi, B_hi, t0); in lsh_r64()
1963 len += arc_or_r(BUF(buf, len), B_hi, B_hi, t1); in lsh_r64()
1964 len += arc_btst_i(BUF(buf, len), t0, 5); in lsh_r64()
1965 len += arc_mov_cc_r(BUF(buf, len), CC_unequal, B_hi, B_lo); in lsh_r64()
1966 len += arc_movu_cc_r(BUF(buf, len), CC_unequal, B_lo, 0); in lsh_r64()
1968 return len; in lsh_r64()
1987 u8 len = 0; in lsh_r64_i32() local
1992 len = arc_lsri_r(buf, t0, B_lo, 32 - n); in lsh_r64_i32()
1993 len += arc_asli_r(BUF(buf, len), B_lo, B_lo, n); in lsh_r64_i32()
1994 len += arc_asli_r(BUF(buf, len), B_hi, B_hi, n); in lsh_r64_i32()
1995 len += arc_or_r(BUF(buf, len), B_hi, B_hi, t0); in lsh_r64_i32()
1997 len = arc_asli_r(buf, B_hi, B_lo, n - 32); in lsh_r64_i32()
1998 len += arc_movi_r(BUF(buf, len), B_lo, 0); in lsh_r64_i32()
2002 return len; in lsh_r64_i32()
2050 u8 len; in rsh_r64() local
2052 len = arc_not_r(buf, t0, C_lo); in rsh_r64()
2053 len += arc_asli_r(BUF(buf, len), t1, B_hi, 1); in rsh_r64()
2054 len += arc_asl_r(BUF(buf, len), t1, t1, t0); in rsh_r64()
2055 len += arc_mov_r(BUF(buf, len), t0, C_lo); in rsh_r64()
2056 len += arc_lsr_r(BUF(buf, len), B_hi, B_hi, t0); in rsh_r64()
2057 len += arc_lsr_r(BUF(buf, len), B_lo, B_lo, t0); in rsh_r64()
2058 len += arc_or_r(BUF(buf, len), B_lo, B_lo, t1); in rsh_r64()
2059 len += arc_btst_i(BUF(buf, len), t0, 5); in rsh_r64()
2060 len += arc_mov_cc_r(BUF(buf, len), CC_unequal, B_lo, B_hi); in rsh_r64()
2061 len += arc_movu_cc_r(BUF(buf, len), CC_unequal, B_hi, 0); in rsh_r64()
2063 return len; in rsh_r64()
2082 u8 len = 0; in rsh_r64_i32() local
2087 len = arc_asli_r(buf, t0, B_hi, 32 - n); in rsh_r64_i32()
2088 len += arc_lsri_r(BUF(buf, len), B_lo, B_lo, n); in rsh_r64_i32()
2089 len += arc_lsri_r(BUF(buf, len), B_hi, B_hi, n); in rsh_r64_i32()
2090 len += arc_or_r(BUF(buf, len), B_lo, B_lo, t0); in rsh_r64_i32()
2092 len = arc_lsri_r(buf, B_lo, B_hi, n - 32); in rsh_r64_i32()
2093 len += arc_movi_r(BUF(buf, len), B_hi, 0); in rsh_r64_i32()
2097 return len; in rsh_r64_i32()
2147 u8 len; in arsh_r64() local
2149 len = arc_not_r(buf, t0, C_lo); in arsh_r64()
2150 len += arc_asli_r(BUF(buf, len), t1, B_hi, 1); in arsh_r64()
2151 len += arc_asl_r(BUF(buf, len), t1, t1, t0); in arsh_r64()
2152 len += arc_mov_r(BUF(buf, len), t0, C_lo); in arsh_r64()
2153 len += arc_asr_r(BUF(buf, len), B_hi, B_hi, t0); in arsh_r64()
2154 len += arc_lsr_r(BUF(buf, len), B_lo, B_lo, t0); in arsh_r64()
2155 len += arc_or_r(BUF(buf, len), B_lo, B_lo, t1); in arsh_r64()
2156 len += arc_btst_i(BUF(buf, len), t0, 5); in arsh_r64()
2157 len += arc_asri_r(BUF(buf, len), t0, B_hi, 31); in arsh_r64()
2158 len += arc_mov_cc_r(BUF(buf, len), CC_unequal, B_lo, B_hi); in arsh_r64()
2159 len += arc_mov_cc_r(BUF(buf, len), CC_unequal, B_hi, t0); in arsh_r64()
2161 return len; in arsh_r64()
2180 u8 len = 0; in arsh_r64_i32() local
2185 len = arc_asli_r(buf, t0, B_hi, 32 - n); in arsh_r64_i32()
2186 len += arc_lsri_r(BUF(buf, len), B_lo, B_lo, n); in arsh_r64_i32()
2187 len += arc_asri_r(BUF(buf, len), B_hi, B_hi, n); in arsh_r64_i32()
2188 len += arc_or_r(BUF(buf, len), B_lo, B_lo, t0); in arsh_r64_i32()
2190 len = arc_asri_r(buf, B_lo, B_hi, n - 32); in arsh_r64_i32()
2191 len += arc_movi_r(BUF(buf, len), B_hi, -1); in arsh_r64_i32()
2192 len += arc_btst_i(BUF(buf, len), B_lo, 31); in arsh_r64_i32()
2193 len += arc_movu_cc_r(BUF(buf, len), CC_equal, B_hi, 0); in arsh_r64_i32()
2197 return len; in arsh_r64_i32()
2202 u8 len = 0; in gen_swap() local
2215 len = arc_asli_r(buf, REG_LO(rd), REG_LO(rd), 16); in gen_swap()
2218 len += arc_swape_r(BUF(buf, len), REG_LO(rd)); in gen_swap()
2220 len += zext(BUF(buf, len), rd); in gen_swap()
2230 len = arc_xor_r(buf, REG_HI(rd), REG_LO(rd)); in gen_swap()
2231 len += arc_xor_r(BUF(buf, len), REG_LO(rd), REG_HI(rd)); in gen_swap()
2232 len += arc_xor_r(BUF(buf, len), REG_HI(rd), REG_LO(rd)); in gen_swap()
2233 len += arc_swape_r(BUF(buf, len), REG_LO(rd)); in gen_swap()
2234 len += arc_swape_r(BUF(buf, len), REG_HI(rd)); in gen_swap()
2247 len = arc_and_i(buf, REG_LO(rd), 0xffff); in gen_swap()
2251 len += zext(BUF(buf, len), rd); in gen_swap()
2261 return len; in gen_swap()
2277 u8 len; in frame_create() local
2279 len = arc_mov_r(buf, ARC_R_FP, ARC_R_SP); in frame_create()
2281 len += arc_subi_r(BUF(buf, len), ARC_R_SP, size); in frame_create()
2283 len += arc_sub_i(BUF(buf, len), ARC_R_SP, size); in frame_create()
2284 return len; in frame_create()
2305 u8 len; in bpf_to_arc_return() local
2307 len = arc_mov_r(buf, ARC_R_0, REG_LO(BPF_REG_0)); in bpf_to_arc_return()
2308 len += arc_mov_r(BUF(buf, len), ARC_R_1, REG_HI(BPF_REG_0)); in bpf_to_arc_return()
2309 return len; in bpf_to_arc_return()
2320 u8 len; in arc_to_bpf_return() local
2322 len = arc_mov_r(buf, REG_LO(BPF_REG_0), ARC_R_0); in arc_to_bpf_return()
2323 len += arc_mov_r(BUF(buf, len), REG_HI(BPF_REG_0), ARC_R_1); in arc_to_bpf_return()
2324 return len; in arc_to_bpf_return()
2349 u8 len; in jump_and_link() local
2351 len = arc_mov_i_fixed(buf, REG_LO(JIT_REG_TMP), addr); in jump_and_link()
2352 len += arc_jl(BUF(buf, len), REG_LO(JIT_REG_TMP)); in jump_and_link()
2353 return len; in jump_and_link()
2406 u8 len = 0; in arc_prologue() local
2411 len += arc_push_r(BUF(buf, len), ARC_R_BLINK); in arc_prologue()
2417 len += arc_push_r(BUF(buf, len), reg); in arc_prologue()
2423 len += arc_push_r(BUF(buf, len), ARC_R_FP); in arc_prologue()
2426 len += frame_create(BUF(buf, len), frame_size); in arc_prologue()
2435 return len; in arc_prologue()
2452 u32 len = 0; in arc_epilogue() local
2463 len += frame_restore(BUF(buf, len)); in arc_epilogue()
2467 len += arc_pop_r(BUF(buf, len), ARC_R_FP); in arc_epilogue()
2474 len += arc_pop_r(BUF(buf, len), reg); in arc_epilogue()
2480 len += arc_pop_r(BUF(buf, len), ARC_R_BLINK); in arc_epilogue()
2483 len += bpf_to_arc_return(BUF(buf, len)); in arc_epilogue()
2484 len += arc_jmp_return(BUF(buf, len)); in arc_epilogue()
2486 return len; in arc_epilogue()
2680 u8 len = 0; in gen_j_eq_64() local
2682 len += arc_cmp_r(BUF(buf, len), REG_HI(rd), REG_HI(rs)); in gen_j_eq_64()
2683 len += arc_cmpz_r(BUF(buf, len), REG_LO(rd), REG_LO(rs)); in gen_j_eq_64()
2684 disp = get_displacement(curr_off + len, targ_off); in gen_j_eq_64()
2685 len += arc_bcc(BUF(buf, len), eq ? CC_equal : CC_unequal, disp); in gen_j_eq_64()
2687 return len; in gen_j_eq_64()
2697 u8 len = 0; in gen_jset_64() local
2700 len += arc_tst_r(BUF(buf, len), REG_HI(rd), REG_HI(rs)); in gen_jset_64()
2701 len += arc_tstz_r(BUF(buf, len), REG_LO(rd), REG_LO(rs)); in gen_jset_64()
2702 disp = get_displacement(curr_off + len, targ_off); in gen_jset_64()
2703 len += arc_bcc(BUF(buf, len), CC_unequal, disp); in gen_jset_64()
2705 return len; in gen_jset_64()
2810 u8 len = 0; in gen_jcc_64() local
2813 len += arc_cmp_r(buf, REG_HI(rd), REG_HI(rs)); in gen_jcc_64()
2816 disp = get_displacement(curr_off + len, targ_off); in gen_jcc_64()
2817 len += arc_bcc(BUF(buf, len), cc[0], disp); in gen_jcc_64()
2820 end_off = curr_off + len + (JCC64_INSNS_TO_END * INSN_len_normal); in gen_jcc_64()
2821 disp = get_displacement(curr_off + len, end_off); in gen_jcc_64()
2822 len += arc_bcc(BUF(buf, len), cc[1], disp); in gen_jcc_64()
2825 len += arc_cmp_r(BUF(buf, len), REG_LO(rd), REG_LO(rs)); in gen_jcc_64()
2828 disp = get_displacement(curr_off + len, targ_off); in gen_jcc_64()
2829 len += arc_bcc(BUF(buf, len), cc[2], disp); in gen_jcc_64()
2831 return len; in gen_jcc_64()
2841 u8 len = 0; in gen_jmp_64() local
2848 len = arc_b(buf, disp); in gen_jmp_64()
2858 len = gen_jcc_64(buf, rd, rs, cond, curr_off, targ_off); in gen_jmp_64()
2864 len = gen_j_eq_64(buf, rd, rs, eq, curr_off, targ_off); in gen_jmp_64()
2867 len = gen_jset_64(buf, rd, rs, curr_off, targ_off); in gen_jmp_64()
2875 return len; in gen_jmp_64()
2942 u8 len = 0; in gen_jmp_32() local
2960 len = tst_r32(buf, rd, rs); in gen_jmp_32()
2962 len = cmp_r32(buf, rd, rs); in gen_jmp_32()
2965 * it alters the "curr_off" by its "len"gth. The "curr_off" in gen_jmp_32()
2968 disp = get_displacement(curr_off + len, targ_off); in gen_jmp_32()
2969 len += arc_bcc(BUF(buf, len), arcv2_32_jmps[cond], disp); in gen_jmp_32()
2973 len = arc_b(buf, disp); in gen_jmp_32()
2976 return len; in gen_jmp_32()
2990 u8 len = 0; in gen_func_call() local
2999 len += push_r64(BUF(buf, len), BPF_REG_5); in gen_func_call()
3001 len += jump_and_link(BUF(buf, len), func_addr); in gen_func_call()
3004 len += arc_add_i(BUF(buf, len), ARC_R_SP, ARC_R_SP, ARG5_SIZE); in gen_func_call()
3006 return len; in gen_func_call()