• Home
  • Raw
  • Download

Lines Matching refs:func

101    struct x86_function *func;  member
168 sse_movaps(p->func, reg, in get_const()
185 x86_movzx8(p->func, tmp, src); in emit_load_sse2()
186 sse2_movd(p->func, data, tmp); in emit_load_sse2()
189 x86_movzx16(p->func, tmp, src); in emit_load_sse2()
190 sse2_movd(p->func, data, tmp); in emit_load_sse2()
193 x86_movzx8(p->func, tmp, x86_make_disp(src, 2)); in emit_load_sse2()
194 x86_shl_imm(p->func, tmp, 16); in emit_load_sse2()
195 x86_mov16(p->func, tmp, src); in emit_load_sse2()
196 sse2_movd(p->func, data, tmp); in emit_load_sse2()
199 sse2_movd(p->func, data, src); in emit_load_sse2()
202 sse2_movd(p->func, data, src); in emit_load_sse2()
203 x86_movzx16(p->func, tmp, x86_make_disp(src, 4)); in emit_load_sse2()
204 sse2_movd(p->func, tmpXMM, tmp); in emit_load_sse2()
205 sse2_punpckldq(p->func, data, tmpXMM); in emit_load_sse2()
208 sse2_movq(p->func, data, src); in emit_load_sse2()
211 sse2_movq(p->func, data, src); in emit_load_sse2()
212 sse2_movd(p->func, tmpXMM, x86_make_disp(src, 8)); in emit_load_sse2()
213 sse2_punpcklqdq(p->func, data, tmpXMM); in emit_load_sse2()
216 sse2_movdqu(p->func, data, src); in emit_load_sse2()
245 sse_movss(p->func, data, arg0); in emit_load_float32()
247 sse_orps(p->func, data, get_const(p, CONST_IDENTITY)); in emit_load_float32()
254 sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), in emit_load_float32()
257 sse_movlhps(p->func, data, get_const(p, CONST_IDENTITY)); in emit_load_float32()
258 sse_movlps(p->func, data, arg0); in emit_load_float32()
268 sse_movss(p->func, data, x86_make_disp(arg0, 8)); in emit_load_float32()
270 sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), in emit_load_float32()
272 sse_shufps(p->func, data, data, SHUF(Y, Z, X, W)); in emit_load_float32()
273 sse_movlps(p->func, data, arg0); in emit_load_float32()
276 sse_movups(p->func, data, arg0); in emit_load_float32()
291 sse2_movsd(p->func, data, arg0); in emit_load_float64to32()
293 sse2_cvtpd2ps(p->func, data, data); in emit_load_float64to32()
295 sse2_cvtsd2ss(p->func, data, data); in emit_load_float64to32()
297 sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), in emit_load_float64to32()
301 sse2_movupd(p->func, data, arg0); in emit_load_float64to32()
302 sse2_cvtpd2ps(p->func, data, data); in emit_load_float64to32()
304 sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), in emit_load_float64to32()
307 sse_movlhps(p->func, data, get_const(p, CONST_IDENTITY)); in emit_load_float64to32()
310 sse2_movupd(p->func, data, arg0); in emit_load_float64to32()
311 sse2_cvtpd2ps(p->func, data, data); in emit_load_float64to32()
312 sse2_movsd(p->func, tmpXMM, x86_make_disp(arg0, 16)); in emit_load_float64to32()
314 sse2_cvtpd2ps(p->func, tmpXMM, tmpXMM); in emit_load_float64to32()
316 sse2_cvtsd2ss(p->func, tmpXMM, tmpXMM); in emit_load_float64to32()
317 sse_movlhps(p->func, data, tmpXMM); in emit_load_float64to32()
319 sse_orps(p->func, data, get_const(p, CONST_IDENTITY)); in emit_load_float64to32()
322 sse2_movupd(p->func, data, arg0); in emit_load_float64to32()
323 sse2_cvtpd2ps(p->func, data, data); in emit_load_float64to32()
324 sse2_movupd(p->func, tmpXMM, x86_make_disp(arg0, 16)); in emit_load_float64to32()
325 sse2_cvtpd2ps(p->func, tmpXMM, tmpXMM); in emit_load_float64to32()
326 sse_movlhps(p->func, data, tmpXMM); in emit_load_float64to32()
337 if (x86_target(p->func) != X86_32) in emit_mov64()
338 x64_mov64(p->func, dst_gpr, src_gpr); in emit_mov64()
341 if (x86_target_caps(p->func) & X86_SSE2) in emit_mov64()
342 sse2_movq(p->func, dst_xmm, src_xmm); in emit_mov64()
344 sse_movlps(p->func, dst_xmm, src_xmm); in emit_mov64()
368 if (x86_target_caps(p->func) & X86_SSE2) in emit_mov128()
369 sse2_movdqu(p->func, dst, src); in emit_mov128()
371 sse_movups(p->func, dst, src); in emit_mov128()
391 x86_mov8(p->func, dataGPR, src); in emit_memcpy()
392 x86_mov8(p->func, dst, dataGPR); in emit_memcpy()
395 x86_mov16(p->func, dataGPR, src); in emit_memcpy()
396 x86_mov16(p->func, dst, dataGPR); in emit_memcpy()
399 x86_mov16(p->func, dataGPR, src); in emit_memcpy()
400 x86_mov8(p->func, dataGPR2, x86_make_disp(src, 2)); in emit_memcpy()
401 x86_mov16(p->func, dst, dataGPR); in emit_memcpy()
402 x86_mov8(p->func, x86_make_disp(dst, 2), dataGPR2); in emit_memcpy()
405 x86_mov(p->func, dataGPR, src); in emit_memcpy()
406 x86_mov(p->func, dst, dataGPR); in emit_memcpy()
409 x86_mov(p->func, dataGPR, src); in emit_memcpy()
410 x86_mov16(p->func, dataGPR2, x86_make_disp(src, 4)); in emit_memcpy()
411 x86_mov(p->func, dst, dataGPR); in emit_memcpy()
412 x86_mov16(p->func, x86_make_disp(dst, 4), dataGPR2); in emit_memcpy()
416 else if (!(x86_target_caps(p->func) & X86_SSE)) { in emit_memcpy()
420 x86_mov(p->func, dataGPR, x86_make_disp(src, i)); in emit_memcpy()
421 x86_mov(p->func, x86_make_disp(dst, i), dataGPR); in emit_memcpy()
432 x86_mov(p->func, dataGPR, x86_make_disp(src, 8)); in emit_memcpy()
434 x86_mov(p->func, x86_make_disp(dst, 8), dataGPR); in emit_memcpy()
505 if ((x86_target_caps(p->func) & X86_SSE) && in translate_attr_convert()
528 if (!(x86_target_caps(p->func) & X86_SSE2)) in translate_attr_convert()
540 sse2_punpcklbw(p->func, dataXMM, get_const(p, CONST_IDENTITY)); in translate_attr_convert()
541 sse2_punpcklbw(p->func, dataXMM, get_const(p, CONST_IDENTITY)); in translate_attr_convert()
544 sse2_punpcklwd(p->func, dataXMM, get_const(p, CONST_IDENTITY)); in translate_attr_convert()
547 sse2_psrld_imm(p->func, dataXMM, 1); in translate_attr_convert()
552 sse2_cvtdq2ps(p->func, dataXMM, dataXMM); in translate_attr_convert()
573 sse_mulps(p->func, dataXMM, factor); in translate_attr_convert()
577 sse_addps(p->func, dataXMM, dataXMM); in translate_attr_convert()
580 if (!(x86_target_caps(p->func) & X86_SSE2)) in translate_attr_convert()
589 sse2_punpcklbw(p->func, dataXMM, dataXMM); in translate_attr_convert()
590 sse2_punpcklbw(p->func, dataXMM, dataXMM); in translate_attr_convert()
591 sse2_psrad_imm(p->func, dataXMM, 24); in translate_attr_convert()
594 sse2_punpcklwd(p->func, dataXMM, dataXMM); in translate_attr_convert()
595 sse2_psrad_imm(p->func, dataXMM, 16); in translate_attr_convert()
602 sse2_cvtdq2ps(p->func, dataXMM, dataXMM); in translate_attr_convert()
623 sse_mulps(p->func, dataXMM, factor); in translate_attr_convert()
644 if (!(x86_target_caps(p->func) & X86_SSE2)) in translate_attr_convert()
658 sse_shufps(p->func, dataXMM, dataXMM, in translate_attr_convert()
668 sse_movups(p->func, dst, dataXMM); in translate_attr_convert()
674 sse_movlps(p->func, dst, dataXMM); in translate_attr_convert()
678 sse_movss(p->func, dst, dataXMM); in translate_attr_convert()
681 x86_mov_imm(p->func, dst, in translate_attr_convert()
687 sse_shufps(p->func, dataXMM, dataXMM, SHUF(1, 1, 2, 3)); in translate_attr_convert()
688 sse_movss(p->func, x86_make_disp(dst, 4), dataXMM); in translate_attr_convert()
691 x86_mov_imm(p->func, x86_make_disp(dst, 4), in translate_attr_convert()
701 sse_movhps(p->func, x86_make_disp(dst, 8), dataXMM); in translate_attr_convert()
705 sse_shufps(p->func, dataXMM, dataXMM, SHUF(2, 2, 2, 3)); in translate_attr_convert()
706 sse_movss(p->func, x86_make_disp(dst, 8), dataXMM); in translate_attr_convert()
709 x86_mov_imm(p->func, x86_make_disp(dst, 8), in translate_attr_convert()
715 sse_shufps(p->func, dataXMM, dataXMM, SHUF(3, 3, 3, 3)); in translate_attr_convert()
716 sse_movss(p->func, x86_make_disp(dst, 12), dataXMM); in translate_attr_convert()
719 x86_mov_imm(p->func, x86_make_disp(dst, 12), in translate_attr_convert()
728 else if ((x86_target_caps(p->func) & X86_SSE2) in translate_attr_convert()
766 sse2_punpcklbw(p->func, dataXMM, dataXMM); in translate_attr_convert()
768 sse2_psrlw_imm(p->func, dataXMM, 1); in translate_attr_convert()
771 sse2_punpcklbw(p->func, dataXMM, get_const(p, CONST_IDENTITY)); in translate_attr_convert()
775 sse2_movq(p->func, tmpXMM, get_const(p, CONST_IDENTITY)); in translate_attr_convert()
776 sse2_punpcklbw(p->func, tmpXMM, dataXMM); in translate_attr_convert()
777 sse2_psllw_imm(p->func, dataXMM, 9); in translate_attr_convert()
778 sse2_psrlw_imm(p->func, dataXMM, 8); in translate_attr_convert()
779 sse2_por(p->func, tmpXMM, dataXMM); in translate_attr_convert()
780 sse2_psrlw_imm(p->func, dataXMM, 7); in translate_attr_convert()
781 sse2_por(p->func, tmpXMM, dataXMM); in translate_attr_convert()
789 sse2_punpcklbw(p->func, dataXMM, dataXMM); in translate_attr_convert()
790 sse2_psraw_imm(p->func, dataXMM, 8); in translate_attr_convert()
803 sse2_pshuflw(p->func, dataXMM, dataXMM, in translate_attr_convert()
813 sse2_movq(p->func, dst, dataXMM); in translate_attr_convert()
819 sse2_movd(p->func, dst, dataXMM); in translate_attr_convert()
822 sse2_movd(p->func, tmp, dataXMM); in translate_attr_convert()
823 x86_mov16(p->func, dst, tmp); in translate_attr_convert()
825 x86_mov16_imm(p->func, x86_make_disp(dst, 2), in translate_attr_convert()
832 x86_mov_imm(p->func, dst, in translate_attr_convert()
837 x86_mov16_imm(p->func, dst, in translate_attr_convert()
840 sse2_movd(p->func, tmp, dataXMM); in translate_attr_convert()
841 x86_shr_imm(p->func, tmp, 16); in translate_attr_convert()
842 x86_mov16(p->func, x86_make_disp(dst, 2), tmp); in translate_attr_convert()
851 sse2_psrlq_imm(p->func, dataXMM, 32); in translate_attr_convert()
852 sse2_movd(p->func, x86_make_disp(dst, 4), dataXMM); in translate_attr_convert()
855 sse2_psrlq_imm(p->func, dataXMM, 32); in translate_attr_convert()
856 sse2_movd(p->func, tmp, dataXMM); in translate_attr_convert()
857 x86_mov16(p->func, x86_make_disp(dst, 4), tmp); in translate_attr_convert()
859 x86_mov16_imm(p->func, x86_make_disp(dst, 6), in translate_attr_convert()
867 x86_mov_imm(p->func, x86_make_disp(dst, 4), in translate_attr_convert()
872 x86_mov16_imm(p->func, x86_make_disp(dst, 4), in translate_attr_convert()
876 sse2_psrlq_imm(p->func, dataXMM, 48); in translate_attr_convert()
877 sse2_movd(p->func, tmp, dataXMM); in translate_attr_convert()
878 x86_mov16(p->func, x86_make_disp(dst, 6), tmp); in translate_attr_convert()
898 x86_mov(p->func, tmp, src); in translate_attr_convert()
899 x86_bswap(p->func, tmp); in translate_attr_convert()
900 x86_mov(p->func, dst, tmp); in translate_attr_convert()
921 x86_mov8_imm(p->func, x86_make_disp(dst, i * 1), v); in translate_attr_convert()
924 x86_mov8(p->func, tmp, x86_make_disp(src, swizzle[i] * 1)); in translate_attr_convert()
925 x86_mov8(p->func, x86_make_disp(dst, i * 1), tmp); in translate_attr_convert()
946 x86_mov16_imm(p->func, x86_make_disp(dst, i * 2), v); in translate_attr_convert()
949 x86_mov16_imm(p->func, x86_make_disp(dst, i * 2), 0); in translate_attr_convert()
952 x86_mov16(p->func, tmp, x86_make_disp(src, swizzle[i] * 2)); in translate_attr_convert()
953 x86_mov16(p->func, x86_make_disp(dst, i * 2), tmp); in translate_attr_convert()
974 x86_mov_imm(p->func, x86_make_disp(dst, i * 4), v); in translate_attr_convert()
977 x86_mov(p->func, tmp, x86_make_disp(src, swizzle[i] * 4)); in translate_attr_convert()
978 x86_mov(p->func, x86_make_disp(dst, i * 4), tmp); in translate_attr_convert()
1003 x86_mov_imm(p->func, x86_make_disp(dst, i * 8), l); in translate_attr_convert()
1004 x86_mov_imm(p->func, x86_make_disp(dst, i * 8 + 4), h); in translate_attr_convert()
1007 if (x86_target_caps(p->func) & X86_SSE) { in translate_attr_convert()
1014 x86_mov(p->func, tmp, x86_make_disp(src, swizzle[i] * 8)); in translate_attr_convert()
1015 x86_mov(p->func, x86_make_disp(dst, i * 8), tmp); in translate_attr_convert()
1016 x86_mov(p->func, tmp, in translate_attr_convert()
1018 x86_mov(p->func, x86_make_disp(dst, i * 8 + 4), tmp); in translate_attr_convert()
1029 else if ((x86_target_caps(p->func) & X86_SSE2) && in translate_attr_convert()
1036 sse_movups(p->func, dataXMM, src); in translate_attr_convert()
1039 sse_shufps(p->func, dataXMM, dataXMM, SHUF(2, 1, 0, 3)); in translate_attr_convert()
1043 sse_mulps(p->func, dataXMM, get_const(p, CONST_255)); in translate_attr_convert()
1046 sse2_cvtps2dq(p->func, dataXMM, dataXMM); in translate_attr_convert()
1047 sse2_packssdw(p->func, dataXMM, dataXMM); in translate_attr_convert()
1048 sse2_packuswb(p->func, dataXMM, dataXMM); in translate_attr_convert()
1049 sse2_movd(p->func, dst, dataXMM); in translate_attr_convert()
1106 x86_mov(p->func, tmp_EAX, instance_id); in init_inputs()
1114 x86_xor(p->func, tmp_EDX, tmp_EDX); in init_inputs()
1115 x86_mov_reg_imm(p->func, tmp_ECX, variant->instance_divisor); in init_inputs()
1116 x86_div(p->func, tmp_ECX); /* EAX = EDX:EAX / ECX */ in init_inputs()
1121 x86_mov(p->func, tmp_EDX, start_instance); in init_inputs()
1122 x86_add(p->func, tmp_EAX, tmp_EDX); in init_inputs()
1130 x86_mov(p->func, tmp_EAX, elt); in init_inputs()
1134 x86_cmp(p->func, tmp_EAX, buf_max_index); in init_inputs()
1135 x86_cmovcc(p->func, tmp_EAX, buf_max_index, cc_AE); in init_inputs()
1138 x86_mov(p->func, p->tmp2_EDX, buf_stride); in init_inputs()
1139 x64_rexw(p->func); in init_inputs()
1140 x86_imul(p->func, tmp_EAX, p->tmp2_EDX); in init_inputs()
1141 x64_rexw(p->func); in init_inputs()
1142 x86_add(p->func, tmp_EAX, buf_base_ptr); in init_inputs()
1144 x86_cmp(p->func, p->count_EBP, p->tmp_EAX); in init_inputs()
1150 x64_rexw(p->func); in init_inputs()
1151 x86_mov(p->func, elt, tmp_EAX); in init_inputs()
1154 x64_rexw(p->func); in init_inputs()
1155 x86_mov(p->func, buf_ptr, tmp_EAX); in init_inputs()
1180 x64_rexw(p->func); in get_buffer_ptr()
1181 x86_mov(p->func, ptr, buf_ptr); in get_buffer_ptr()
1202 x86_movzx8(p->func, ptr, elt); in get_buffer_ptr()
1205 x86_movzx16(p->func, ptr, elt); in get_buffer_ptr()
1208 x86_mov(p->func, ptr, elt); in get_buffer_ptr()
1214 x86_cmp(p->func, ptr, buf_max_index); in get_buffer_ptr()
1215 x86_cmovcc(p->func, ptr, buf_max_index, cc_AE); in get_buffer_ptr()
1217 x86_mov(p->func, p->tmp2_EDX, buf_stride); in get_buffer_ptr()
1218 x64_rexw(p->func); in get_buffer_ptr()
1219 x86_imul(p->func, ptr, p->tmp2_EDX); in get_buffer_ptr()
1220 x64_rexw(p->func); in get_buffer_ptr()
1221 x86_add(p->func, ptr, buf_base_ptr); in get_buffer_ptr()
1237 x64_rexw(p->func); in incr_inputs()
1238 x86_add(p->func, p->idx_ESI, stride); in incr_inputs()
1239 sse_prefetchnta(p->func, x86_make_disp(p->idx_ESI, 192)); in incr_inputs()
1256 x86_mov(p->func, p->tmp_EAX, buf_stride); in incr_inputs()
1257 x64_rexw(p->func); in incr_inputs()
1258 x86_add(p->func, p->tmp_EAX, buf_ptr); in incr_inputs()
1260 sse_prefetchnta(p->func, x86_make_disp(p->tmp_EAX, 192)); in incr_inputs()
1261 x64_rexw(p->func); in incr_inputs()
1262 x86_mov(p->func, buf_ptr, p->tmp_EAX); in incr_inputs()
1267 x64_rexw(p->func); in incr_inputs()
1268 x86_lea(p->func, p->idx_ESI, x86_make_disp(p->idx_ESI, index_size)); in incr_inputs()
1293 struct x86_function *func, unsigned index_size) in build_vertex_emit() argument
1309 p->func = func; in build_vertex_emit()
1311 x86_init_func(p->func); in build_vertex_emit()
1313 if (x86_target(p->func) == X86_64_WIN64_ABI) { in build_vertex_emit()
1317 sse2_movdqa(p->func, x86_make_disp(x86_make_reg(file_REG32, reg_SP), 8), in build_vertex_emit()
1319 sse2_movdqa(p->func, in build_vertex_emit()
1324 x86_push(p->func, p->outbuf_EBX); in build_vertex_emit()
1325 x86_push(p->func, p->count_EBP); in build_vertex_emit()
1328 if (x86_target(p->func) != X86_64_STD_ABI) { in build_vertex_emit()
1329 x86_push(p->func, p->machine_EDI); in build_vertex_emit()
1330 x86_push(p->func, p->idx_ESI); in build_vertex_emit()
1332 if (x86_target(p->func) != X86_32) { in build_vertex_emit()
1333 x64_mov64(p->func, p->machine_EDI, x86_fn_arg(p->func, 1)); in build_vertex_emit()
1334 x64_mov64(p->func, p->idx_ESI, x86_fn_arg(p->func, 2)); in build_vertex_emit()
1337 x86_mov(p->func, p->machine_EDI, x86_fn_arg(p->func, 1)); in build_vertex_emit()
1338 x86_mov(p->func, p->idx_ESI, x86_fn_arg(p->func, 2)); in build_vertex_emit()
1342 x86_mov(p->func, p->count_EBP, x86_fn_arg(p->func, 3)); in build_vertex_emit()
1344 if (x86_target(p->func) != X86_32) in build_vertex_emit()
1345 x64_mov64(p->func, p->outbuf_EBX, x86_fn_arg(p->func, 6)); in build_vertex_emit()
1347 x86_mov(p->func, p->outbuf_EBX, x86_fn_arg(p->func, 6)); in build_vertex_emit()
1352 x86_mov(p->func, p->tmp2_EDX, x86_fn_arg(p->func, 4)); in build_vertex_emit()
1353 x86_mov(p->func, in build_vertex_emit()
1357 x86_mov(p->func, p->tmp_EAX, x86_fn_arg(p->func, 5)); in build_vertex_emit()
1358 x86_mov(p->func, in build_vertex_emit()
1365 x86_xor(p->func, p->tmp_EAX, p->tmp_EAX); in build_vertex_emit()
1366 x86_cmp(p->func, p->count_EBP, p->tmp_EAX); in build_vertex_emit()
1367 fixup = x86_jcc_forward(p->func, cc_E); in build_vertex_emit()
1375 label = x86_get_label(p->func); in build_vertex_emit()
1400 x64_rexw(p->func); in build_vertex_emit()
1401 x86_lea(p->func, p->outbuf_EBX, in build_vertex_emit()
1411 x86_dec(p->func, p->count_EBP); in build_vertex_emit()
1412 x86_jcc(p->func, cc_NZ, label); in build_vertex_emit()
1416 if (p->func->need_emms) in build_vertex_emit()
1417 mmx_emms(p->func); in build_vertex_emit()
1421 x86_fixup_fwd_jump(p->func, fixup); in build_vertex_emit()
1425 if (x86_target(p->func) != X86_64_STD_ABI) { in build_vertex_emit()
1426 x86_pop(p->func, p->idx_ESI); in build_vertex_emit()
1427 x86_pop(p->func, p->machine_EDI); in build_vertex_emit()
1430 x86_pop(p->func, p->count_EBP); in build_vertex_emit()
1431 x86_pop(p->func, p->outbuf_EBX); in build_vertex_emit()
1433 if (x86_target(p->func) == X86_64_WIN64_ABI) { in build_vertex_emit()
1434 sse2_movdqa(p->func, x86_make_reg(file_XMM, 6), in build_vertex_emit()
1436 sse2_movdqa(p->func, x86_make_reg(file_XMM, 7), in build_vertex_emit()
1439 x86_ret(p->func); in build_vertex_emit()