Lines Matching refs:func

97    struct x86_function *func;  member
160 sse_movaps(p->func, reg, in get_const()
178 x86_movzx8(p->func, tmp, src); in emit_load_sse2()
179 sse2_movd(p->func, data, tmp); in emit_load_sse2()
182 x86_movzx16(p->func, tmp, src); in emit_load_sse2()
183 sse2_movd(p->func, data, tmp); in emit_load_sse2()
186 x86_movzx8(p->func, tmp, x86_make_disp(src, 2)); in emit_load_sse2()
187 x86_shl_imm(p->func, tmp, 16); in emit_load_sse2()
188 x86_mov16(p->func, tmp, src); in emit_load_sse2()
189 sse2_movd(p->func, data, tmp); in emit_load_sse2()
192 sse2_movd(p->func, data, src); in emit_load_sse2()
195 sse2_movd(p->func, data, src); in emit_load_sse2()
196 x86_movzx16(p->func, tmp, x86_make_disp(src, 4)); in emit_load_sse2()
197 sse2_movd(p->func, tmpXMM, tmp); in emit_load_sse2()
198 sse2_punpckldq(p->func, data, tmpXMM); in emit_load_sse2()
201 sse2_movq(p->func, data, src); in emit_load_sse2()
204 sse2_movq(p->func, data, src); in emit_load_sse2()
205 sse2_movd(p->func, tmpXMM, x86_make_disp(src, 8)); in emit_load_sse2()
206 sse2_punpcklqdq(p->func, data, tmpXMM); in emit_load_sse2()
209 sse2_movdqu(p->func, data, src); in emit_load_sse2()
239 sse_movss(p->func, data, arg0); in emit_load_float32()
241 sse_orps(p->func, data, get_const(p, CONST_IDENTITY) ); in emit_load_float32()
248 sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), SHUF(X, Y, Z, W) ); in emit_load_float32()
250 sse_movlhps(p->func, data, get_const(p, CONST_IDENTITY) ); in emit_load_float32()
251 sse_movlps(p->func, data, arg0); in emit_load_float32()
261 sse_movss(p->func, data, x86_make_disp(arg0, 8)); in emit_load_float32()
263 sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), SHUF(X,Y,Z,W) ); in emit_load_float32()
264 sse_shufps(p->func, data, data, SHUF(Y,Z,X,W) ); in emit_load_float32()
265 sse_movlps(p->func, data, arg0); in emit_load_float32()
268 sse_movups(p->func, data, arg0); in emit_load_float32()
286 sse2_movsd(p->func, data, arg0); in emit_load_float64to32()
288 sse2_cvtpd2ps(p->func, data, data); in emit_load_float64to32()
290 sse2_cvtsd2ss(p->func, data, data); in emit_load_float64to32()
292 sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), SHUF(X, Y, Z, W) ); in emit_load_float64to32()
295 sse2_movupd(p->func, data, arg0); in emit_load_float64to32()
296 sse2_cvtpd2ps(p->func, data, data); in emit_load_float64to32()
298 sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), SHUF(X, Y, Z, W) ); in emit_load_float64to32()
300 sse_movlhps(p->func, data, get_const(p, CONST_IDENTITY) ); in emit_load_float64to32()
303 sse2_movupd(p->func, data, arg0); in emit_load_float64to32()
304 sse2_cvtpd2ps(p->func, data, data); in emit_load_float64to32()
305 sse2_movsd(p->func, tmpXMM, x86_make_disp(arg0, 16)); in emit_load_float64to32()
307 sse2_cvtpd2ps(p->func, tmpXMM, tmpXMM); in emit_load_float64to32()
309 sse2_cvtsd2ss(p->func, tmpXMM, tmpXMM); in emit_load_float64to32()
310 sse_movlhps(p->func, data, tmpXMM); in emit_load_float64to32()
312 sse_orps(p->func, data, get_const(p, CONST_IDENTITY) ); in emit_load_float64to32()
315 sse2_movupd(p->func, data, arg0); in emit_load_float64to32()
316 sse2_cvtpd2ps(p->func, data, data); in emit_load_float64to32()
317 sse2_movupd(p->func, tmpXMM, x86_make_disp(arg0, 16)); in emit_load_float64to32()
318 sse2_cvtpd2ps(p->func, tmpXMM, tmpXMM); in emit_load_float64to32()
319 sse_movlhps(p->func, data, tmpXMM); in emit_load_float64to32()
326 if(x86_target(p->func) != X86_32) in emit_mov64()
327 x64_mov64(p->func, dst_gpr, src_gpr); in emit_mov64()
331 if(x86_target_caps(p->func) & X86_SSE2) in emit_mov64()
332 sse2_movq(p->func, dst_xmm, src_xmm); in emit_mov64()
334 sse_movlps(p->func, dst_xmm, src_xmm); in emit_mov64()
350 if(x86_target_caps(p->func) & X86_SSE2) in emit_mov128()
351 sse2_movdqu(p->func, dst, src); in emit_mov128()
353 sse_movups(p->func, dst, src); in emit_mov128()
372 x86_mov8(p->func, dataGPR, src); in emit_memcpy()
373 x86_mov8(p->func, dst, dataGPR); in emit_memcpy()
376 x86_mov16(p->func, dataGPR, src); in emit_memcpy()
377 x86_mov16(p->func, dst, dataGPR); in emit_memcpy()
380 x86_mov16(p->func, dataGPR, src); in emit_memcpy()
381 x86_mov8(p->func, dataGPR2, x86_make_disp(src, 2)); in emit_memcpy()
382 x86_mov16(p->func, dst, dataGPR); in emit_memcpy()
383 x86_mov8(p->func, x86_make_disp(dst, 2), dataGPR2); in emit_memcpy()
386 x86_mov(p->func, dataGPR, src); in emit_memcpy()
387 x86_mov(p->func, dst, dataGPR); in emit_memcpy()
390 x86_mov(p->func, dataGPR, src); in emit_memcpy()
391 x86_mov16(p->func, dataGPR2, x86_make_disp(src, 4)); in emit_memcpy()
392 x86_mov(p->func, dst, dataGPR); in emit_memcpy()
393 x86_mov16(p->func, x86_make_disp(dst, 4), dataGPR2); in emit_memcpy()
397 else if(!(x86_target_caps(p->func) & X86_SSE)) in emit_memcpy()
403 x86_mov(p->func, dataGPR, x86_make_disp(src, i)); in emit_memcpy()
404 x86_mov(p->func, x86_make_disp(dst, i), dataGPR); in emit_memcpy()
417 x86_mov(p->func, dataGPR, x86_make_disp(src, 8)); in emit_memcpy()
419 x86_mov(p->func, x86_make_disp(dst, 8), dataGPR); in emit_memcpy()
484 if((x86_target_caps(p->func) & X86_SSE) && (0 in translate_attr_convert()
511 if(!(x86_target_caps(p->func) & X86_SSE2)) in translate_attr_convert()
520 sse2_punpcklbw(p->func, dataXMM, get_const(p, CONST_IDENTITY)); in translate_attr_convert()
521 sse2_punpcklbw(p->func, dataXMM, get_const(p, CONST_IDENTITY)); in translate_attr_convert()
524 sse2_punpcklwd(p->func, dataXMM, get_const(p, CONST_IDENTITY)); in translate_attr_convert()
527 sse2_psrld_imm(p->func, dataXMM, 1); in translate_attr_convert()
532 sse2_cvtdq2ps(p->func, dataXMM, dataXMM); in translate_attr_convert()
555 sse_mulps(p->func, dataXMM, factor); in translate_attr_convert()
558 …sse_addps(p->func, dataXMM, dataXMM); /* compensate for the bit we threw away to fit u32 into s32 … in translate_attr_convert()
561 if(!(x86_target_caps(p->func) & X86_SSE2)) in translate_attr_convert()
569 sse2_punpcklbw(p->func, dataXMM, dataXMM); in translate_attr_convert()
570 sse2_punpcklbw(p->func, dataXMM, dataXMM); in translate_attr_convert()
571 sse2_psrad_imm(p->func, dataXMM, 24); in translate_attr_convert()
574 sse2_punpcklwd(p->func, dataXMM, dataXMM); in translate_attr_convert()
575 sse2_psrad_imm(p->func, dataXMM, 16); in translate_attr_convert()
582 sse2_cvtdq2ps(p->func, dataXMM, dataXMM); in translate_attr_convert()
605 sse_mulps(p->func, dataXMM, factor); in translate_attr_convert()
624 if(!(x86_target_caps(p->func) & X86_SSE2)) in translate_attr_convert()
637 … sse_shufps(p->func, dataXMM, dataXMM, SHUF(swizzle[0], swizzle[1], swizzle[2], swizzle[3]) ); in translate_attr_convert()
646 sse_movups(p->func, dst, dataXMM); in translate_attr_convert()
652 sse_movlps(p->func, dst, dataXMM); in translate_attr_convert()
656 sse_movss(p->func, dst, dataXMM); in translate_attr_convert()
658 x86_mov_imm(p->func, dst, imms[swizzle[0] - UTIL_FORMAT_SWIZZLE_0]); in translate_attr_convert()
664 sse_shufps(p->func, dataXMM, dataXMM, SHUF(1, 1, 2, 3)); in translate_attr_convert()
665 sse_movss(p->func, x86_make_disp(dst, 4), dataXMM); in translate_attr_convert()
668 … x86_mov_imm(p->func, x86_make_disp(dst, 4), imms[swizzle[1] - UTIL_FORMAT_SWIZZLE_0]); in translate_attr_convert()
677 sse_movhps(p->func, x86_make_disp(dst, 8), dataXMM); in translate_attr_convert()
682 sse_shufps(p->func, dataXMM, dataXMM, SHUF(2, 2, 2, 3)); in translate_attr_convert()
683 sse_movss(p->func, x86_make_disp(dst, 8), dataXMM); in translate_attr_convert()
686 … x86_mov_imm(p->func, x86_make_disp(dst, 8), imms[swizzle[2] - UTIL_FORMAT_SWIZZLE_0]); in translate_attr_convert()
692 sse_shufps(p->func, dataXMM, dataXMM, SHUF(3, 3, 3, 3)); in translate_attr_convert()
693 sse_movss(p->func, x86_make_disp(dst, 12), dataXMM); in translate_attr_convert()
696 … x86_mov_imm(p->func, x86_make_disp(dst, 12), imms[swizzle[3] - UTIL_FORMAT_SWIZZLE_0]); in translate_attr_convert()
703 …else if((x86_target_caps(p->func) & X86_SSE2) && input_desc->channel[0].size == 8 && output_desc->… in translate_attr_convert()
739 sse2_punpcklbw(p->func, dataXMM, dataXMM); in translate_attr_convert()
741 sse2_psrlw_imm(p->func, dataXMM, 1); in translate_attr_convert()
744 sse2_punpcklbw(p->func, dataXMM, get_const(p, CONST_IDENTITY)); in translate_attr_convert()
749 sse2_movq(p->func, tmpXMM, get_const(p, CONST_IDENTITY)); in translate_attr_convert()
750 sse2_punpcklbw(p->func, tmpXMM, dataXMM); in translate_attr_convert()
751 sse2_psllw_imm(p->func, dataXMM, 9); in translate_attr_convert()
752 sse2_psrlw_imm(p->func, dataXMM, 8); in translate_attr_convert()
753 sse2_por(p->func, tmpXMM, dataXMM); in translate_attr_convert()
754 sse2_psrlw_imm(p->func, dataXMM, 7); in translate_attr_convert()
755 sse2_por(p->func, tmpXMM, dataXMM); in translate_attr_convert()
764 sse2_punpcklbw(p->func, dataXMM, dataXMM); in translate_attr_convert()
765 sse2_psraw_imm(p->func, dataXMM, 8); in translate_attr_convert()
776 …sse2_pshuflw(p->func, dataXMM, dataXMM, (swizzle[0] & 3) | ((swizzle[1] & 3) << 2) | ((swizzle[2] … in translate_attr_convert()
785 sse2_movq(p->func, dst, dataXMM); in translate_attr_convert()
791 sse2_movd(p->func, dst, dataXMM); in translate_attr_convert()
794 sse2_movd(p->func, tmp, dataXMM); in translate_attr_convert()
795 x86_mov16(p->func, dst, tmp); in translate_attr_convert()
797 … x86_mov16_imm(p->func, x86_make_disp(dst, 2), imms[swizzle[1] - UTIL_FORMAT_SWIZZLE_0]); in translate_attr_convert()
803 …x86_mov_imm(p->func, dst, (imms[swizzle[1] - UTIL_FORMAT_SWIZZLE_0] << 16) | imms[swizzle[0] - UTI… in translate_attr_convert()
806 x86_mov16_imm(p->func, dst, imms[swizzle[0] - UTIL_FORMAT_SWIZZLE_0]); in translate_attr_convert()
809 sse2_movd(p->func, tmp, dataXMM); in translate_attr_convert()
810 x86_shr_imm(p->func, tmp, 16); in translate_attr_convert()
811 x86_mov16(p->func, x86_make_disp(dst, 2), tmp); in translate_attr_convert()
822 sse2_psrlq_imm(p->func, dataXMM, 32); in translate_attr_convert()
823 sse2_movd(p->func, x86_make_disp(dst, 4), dataXMM); in translate_attr_convert()
827 sse2_psrlq_imm(p->func, dataXMM, 32); in translate_attr_convert()
828 sse2_movd(p->func, tmp, dataXMM); in translate_attr_convert()
829 x86_mov16(p->func, x86_make_disp(dst, 4), tmp); in translate_attr_convert()
832 … x86_mov16_imm(p->func, x86_make_disp(dst, 6), imms[swizzle[3] - UTIL_FORMAT_SWIZZLE_0]); in translate_attr_convert()
839 …x86_mov_imm(p->func, x86_make_disp(dst, 4), (imms[swizzle[3] - UTIL_FORMAT_SWIZZLE_0] << 16) | imm… in translate_attr_convert()
842 … x86_mov16_imm(p->func, x86_make_disp(dst, 4), imms[swizzle[2] - UTIL_FORMAT_SWIZZLE_0]); in translate_attr_convert()
846 sse2_psrlq_imm(p->func, dataXMM, 48); in translate_attr_convert()
847 sse2_movd(p->func, tmp, dataXMM); in translate_attr_convert()
848 x86_mov16(p->func, x86_make_disp(dst, 6), tmp); in translate_attr_convert()
867 x86_mov(p->func, tmp, src); in translate_attr_convert()
868 x86_bswap(p->func, tmp); in translate_attr_convert()
869 x86_mov(p->func, dst, tmp); in translate_attr_convert()
895 x86_mov8_imm(p->func, x86_make_disp(dst, i * 1), v); in translate_attr_convert()
899 x86_mov8(p->func, tmp, x86_make_disp(src, swizzle[i] * 1)); in translate_attr_convert()
900 x86_mov8(p->func, x86_make_disp(dst, i * 1), tmp); in translate_attr_convert()
924 x86_mov16_imm(p->func, x86_make_disp(dst, i * 2), v); in translate_attr_convert()
927 x86_mov16_imm(p->func, x86_make_disp(dst, i * 2), 0); in translate_attr_convert()
930 x86_mov16(p->func, tmp, x86_make_disp(src, swizzle[i] * 2)); in translate_attr_convert()
931 x86_mov16(p->func, x86_make_disp(dst, i * 2), tmp); in translate_attr_convert()
955 x86_mov_imm(p->func, x86_make_disp(dst, i * 4), v); in translate_attr_convert()
959 x86_mov(p->func, tmp, x86_make_disp(src, swizzle[i] * 4)); in translate_attr_convert()
960 x86_mov(p->func, x86_make_disp(dst, i * 4), tmp); in translate_attr_convert()
988 x86_mov_imm(p->func, x86_make_disp(dst, i * 8), l); in translate_attr_convert()
989 x86_mov_imm(p->func, x86_make_disp(dst, i * 8 + 4), h); in translate_attr_convert()
993 if(x86_target_caps(p->func) & X86_SSE) in translate_attr_convert()
1001 x86_mov(p->func, tmp, x86_make_disp(src, swizzle[i] * 8)); in translate_attr_convert()
1002 x86_mov(p->func, x86_make_disp(dst, i * 8), tmp); in translate_attr_convert()
1003 x86_mov(p->func, tmp, x86_make_disp(src, swizzle[i] * 8 + 4)); in translate_attr_convert()
1004 x86_mov(p->func, x86_make_disp(dst, i * 8 + 4), tmp); in translate_attr_convert()
1015 else if((x86_target_caps(p->func) & X86_SSE2) && in translate_attr_convert()
1024 sse_movups(p->func, dataXMM, src); in translate_attr_convert()
1027 sse_shufps(p->func, dataXMM, dataXMM, SHUF(2,1,0,3)); in translate_attr_convert()
1030 sse_mulps(p->func, dataXMM, get_const(p, CONST_255)); in translate_attr_convert()
1033 sse2_cvtps2dq(p->func, dataXMM, dataXMM); in translate_attr_convert()
1034 sse2_packssdw(p->func, dataXMM, dataXMM); in translate_attr_convert()
1035 sse2_packuswb(p->func, dataXMM, dataXMM); in translate_attr_convert()
1036 sse2_movd(p->func, dst, dataXMM); in translate_attr_convert()
1087 x86_mov(p->func, tmp_EAX, instance_id); in init_inputs()
1097 x86_xor(p->func, tmp_EDX, tmp_EDX); in init_inputs()
1098 x86_mov_reg_imm(p->func, tmp_ECX, variant->instance_divisor); in init_inputs()
1099 x86_div(p->func, tmp_ECX); /* EAX = EDX:EAX / ECX */ in init_inputs()
1107 x86_mov(p->func, tmp_EAX, elt); in init_inputs()
1111 x86_cmp(p->func, tmp_EAX, buf_max_index); in init_inputs()
1112 x86_cmovcc(p->func, tmp_EAX, buf_max_index, cc_AE); in init_inputs()
1115 x86_imul(p->func, tmp_EAX, buf_stride); in init_inputs()
1116 x64_rexw(p->func); in init_inputs()
1117 x86_add(p->func, tmp_EAX, buf_base_ptr); in init_inputs()
1119 x86_cmp(p->func, p->count_EBP, p->tmp_EAX); in init_inputs()
1126 x64_rexw(p->func); in init_inputs()
1127 x86_mov(p->func, elt, tmp_EAX); in init_inputs()
1131 x64_rexw(p->func); in init_inputs()
1132 x86_mov(p->func, buf_ptr, tmp_EAX); in init_inputs()
1159 x64_rexw(p->func); in get_buffer_ptr()
1160 x86_mov(p->func, ptr, buf_ptr); in get_buffer_ptr()
1186 x86_movzx8(p->func, ptr, elt); in get_buffer_ptr()
1189 x86_movzx16(p->func, ptr, elt); in get_buffer_ptr()
1192 x86_mov(p->func, ptr, elt); in get_buffer_ptr()
1198 x86_cmp(p->func, ptr, buf_max_index); in get_buffer_ptr()
1199 x86_cmovcc(p->func, ptr, buf_max_index, cc_AE); in get_buffer_ptr()
1201 x86_imul(p->func, ptr, buf_stride); in get_buffer_ptr()
1202 x64_rexw(p->func); in get_buffer_ptr()
1203 x86_add(p->func, ptr, buf_base_ptr); in get_buffer_ptr()
1218 x64_rexw(p->func); in incr_inputs()
1219 x86_add(p->func, p->idx_ESI, stride); in incr_inputs()
1220 sse_prefetchnta(p->func, x86_make_disp(p->idx_ESI, 192)); in incr_inputs()
1236 x86_mov(p->func, p->tmp_EAX, buf_stride); in incr_inputs()
1237 x64_rexw(p->func); in incr_inputs()
1238 x86_add(p->func, p->tmp_EAX, buf_ptr); in incr_inputs()
1239 if (i == 0) sse_prefetchnta(p->func, x86_make_disp(p->tmp_EAX, 192)); in incr_inputs()
1240 x64_rexw(p->func); in incr_inputs()
1241 x86_mov(p->func, buf_ptr, p->tmp_EAX); in incr_inputs()
1246 x64_rexw(p->func); in incr_inputs()
1247 x86_lea(p->func, p->idx_ESI, x86_make_disp(p->idx_ESI, index_size)); in incr_inputs()
1271 struct x86_function *func, in build_vertex_emit() argument
1288 p->func = func; in build_vertex_emit()
1290 x86_init_func(p->func); in build_vertex_emit()
1292 if(x86_target(p->func) == X86_64_WIN64_ABI) in build_vertex_emit()
1295 …sse2_movdqa(p->func, x86_make_disp(x86_make_reg(file_REG32, reg_SP), 8), x86_make_reg(file_XMM, 6)… in build_vertex_emit()
1296 …sse2_movdqa(p->func, x86_make_disp(x86_make_reg(file_REG32, reg_SP), 24), x86_make_reg(file_XMM, 7… in build_vertex_emit()
1299 x86_push(p->func, p->outbuf_EBX); in build_vertex_emit()
1300 x86_push(p->func, p->count_EBP); in build_vertex_emit()
1303 if(x86_target(p->func) != X86_64_STD_ABI) in build_vertex_emit()
1305 x86_push(p->func, p->machine_EDI); in build_vertex_emit()
1306 x86_push(p->func, p->idx_ESI); in build_vertex_emit()
1308 x86_mov(p->func, p->machine_EDI, x86_fn_arg(p->func, 1)); in build_vertex_emit()
1309 x86_mov(p->func, p->idx_ESI, x86_fn_arg(p->func, 2)); in build_vertex_emit()
1312 x86_mov(p->func, p->count_EBP, x86_fn_arg(p->func, 3)); in build_vertex_emit()
1314 if(x86_target(p->func) != X86_32) in build_vertex_emit()
1315 x64_mov64(p->func, p->outbuf_EBX, x86_fn_arg(p->func, 5)); in build_vertex_emit()
1317 x86_mov(p->func, p->outbuf_EBX, x86_fn_arg(p->func, 5)); in build_vertex_emit()
1322 x86_mov(p->func, in build_vertex_emit()
1324 x86_fn_arg(p->func, 4)); in build_vertex_emit()
1325 x86_mov(p->func, in build_vertex_emit()
1332 x86_xor(p->func, p->tmp_EAX, p->tmp_EAX); in build_vertex_emit()
1333 x86_cmp(p->func, p->count_EBP, p->tmp_EAX); in build_vertex_emit()
1334 fixup = x86_jcc_forward(p->func, cc_E); in build_vertex_emit()
1342 label = x86_get_label(p->func); in build_vertex_emit()
1367 x64_rexw(p->func); in build_vertex_emit()
1368 x86_lea(p->func, in build_vertex_emit()
1380 x86_dec(p->func, p->count_EBP); in build_vertex_emit()
1381 x86_jcc(p->func, cc_NZ, label); in build_vertex_emit()
1385 if (p->func->need_emms) in build_vertex_emit()
1386 mmx_emms(p->func); in build_vertex_emit()
1390 x86_fixup_fwd_jump(p->func, fixup); in build_vertex_emit()
1395 if(x86_target(p->func) != X86_64_STD_ABI) in build_vertex_emit()
1397 x86_pop(p->func, p->idx_ESI); in build_vertex_emit()
1398 x86_pop(p->func, p->machine_EDI); in build_vertex_emit()
1401 x86_pop(p->func, p->count_EBP); in build_vertex_emit()
1402 x86_pop(p->func, p->outbuf_EBX); in build_vertex_emit()
1404 if(x86_target(p->func) == X86_64_WIN64_ABI) in build_vertex_emit()
1406 …sse2_movdqa(p->func, x86_make_reg(file_XMM, 6), x86_make_disp(x86_make_reg(file_REG32, reg_SP), 8)… in build_vertex_emit()
1407 …sse2_movdqa(p->func, x86_make_reg(file_XMM, 7), x86_make_disp(x86_make_reg(file_REG32, reg_SP), 24… in build_vertex_emit()
1409 x86_ret(p->func); in build_vertex_emit()