From dd7595a3475407a7fa96a97393bae8c5220e8762 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 4 Jan 2012 18:41:13 +1000 Subject: Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje. Note that embryo wont be used, but I'm not sure yet if you can build edje without it. --- .../engines/common/evas_op_mul/op_mul_color_i386.c | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c (limited to 'libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c') diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c new file mode 100644 index 0000000..95f43f6 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c @@ -0,0 +1,66 @@ +/* mul color --> dst */ + +#ifdef BUILD_MMX +static void +_op_mul_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { + DATA32 *e = d + l; + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + MOV_P2R(c, mm2, mm0) + for (; d < e; d++) { + MOV_P2R(*d, mm1, mm0) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) + } +} + +#define _op_mul_can_dp_mmx _op_mul_c_dp_mmx +#define _op_mul_caa_dp_mmx _op_mul_c_dp_mmx + +#define _op_mul_c_dpan_mmx _op_mul_c_dp_mmx +#define _op_mul_can_dpan_mmx _op_mul_can_dp_mmx +#define _op_mul_caa_dpan_mmx _op_mul_caa_dp_mmx + +static void +init_mul_color_span_funcs_mmx(void) +{ + op_mul_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mul_c_dp_mmx; + op_mul_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_can_dp_mmx; + op_mul_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_caa_dp_mmx; + + op_mul_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_c_dpan_mmx; + op_mul_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_can_dpan_mmx; + op_mul_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_caa_dpan_mmx; +} +#endif + +#ifdef BUILD_MMX +static void +_op_mul_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { + pxor_r2r(mm0, mm0); + MOV_A2R(ALPHA_255, mm5) + MOV_P2R(c, mm2, mm0) + MOV_P2R(*d, mm1, mm0) + MUL4_SYM_R2R(mm2, mm1, mm5) + MOV_R2P(mm1, *d, mm0) +} + +#define _op_mul_pt_caa_dp_mmx _op_mul_pt_c_dp_mmx +#define _op_mul_pt_can_dp_mmx _op_mul_pt_c_dp_mmx + +#define _op_mul_pt_c_dpan_mmx _op_mul_pt_c_dp_mmx +#define _op_mul_pt_can_dpan_mmx _op_mul_pt_can_dp_mmx +#define _op_mul_pt_caa_dpan_mmx _op_mul_pt_caa_dp_mmx + +static void +init_mul_color_pt_funcs_mmx(void) +{ + op_mul_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_c_dp_mmx; + op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_can_dp_mmx; + op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_caa_dp_mmx; + + op_mul_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_c_dpan_mmx; + op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_can_dpan_mmx; + op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_caa_dpan_mmx; +} +#endif -- cgit v1.1