diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
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.
Diffstat (limited to 'libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c | 176 |
1 files changed, 176 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c new file mode 100644 index 0000000..2511c41 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c | |||
@@ -0,0 +1,176 @@ | |||
1 | /* copy pixel x mask --> dst */ | ||
2 | |||
3 | #ifdef BUILD_MMX | ||
4 | static void | ||
5 | _op_copy_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { | ||
6 | DATA32 *e = d + l; | ||
7 | pxor_r2r(mm0, mm0); | ||
8 | MOV_A2R(ALPHA_255, mm5) | ||
9 | while (d < e) { | ||
10 | l = *m; | ||
11 | switch(l) | ||
12 | { | ||
13 | case 0: | ||
14 | break; | ||
15 | case 255: | ||
16 | *d = *s; | ||
17 | break; | ||
18 | default: | ||
19 | l++; | ||
20 | MOV_A2R(l, mm3) | ||
21 | MOV_P2R(*s, mm2, mm0) | ||
22 | MOV_P2R(*d, mm1, mm0) | ||
23 | INTERP_256_R2R(mm3, mm2, mm1, mm5); | ||
24 | MOV_R2P(mm1, *d, mm0) | ||
25 | break; | ||
26 | } | ||
27 | m++; d++; | ||
28 | } | ||
29 | } | ||
30 | |||
31 | #define _op_copy_pan_mas_dp_mmx _op_copy_p_mas_dp_mmx | ||
32 | #define _op_copy_pas_mas_dp_mmx _op_copy_p_mas_dp_mmx | ||
33 | |||
34 | #define _op_copy_p_mas_dpan_mmx _op_copy_p_mas_dp_mmx | ||
35 | #define _op_copy_pan_mas_dpan_mmx _op_copy_p_mas_dpan_mmx | ||
36 | #define _op_copy_pas_mas_dpan_mmx _op_copy_p_mas_dpan_mmx | ||
37 | |||
38 | static void | ||
39 | init_copy_pixel_mask_span_funcs_mmx(void) | ||
40 | { | ||
41 | op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_p_mas_dp_mmx; | ||
42 | op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pan_mas_dp_mmx; | ||
43 | op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pas_mas_dp_mmx; | ||
44 | |||
45 | op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_p_mas_dpan_mmx; | ||
46 | op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pan_mas_dpan_mmx; | ||
47 | op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pas_mas_dpan_mmx; | ||
48 | } | ||
49 | #endif | ||
50 | |||
51 | #ifdef BUILD_MMX | ||
52 | static void | ||
53 | _op_copy_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { | ||
54 | c = m + 1; | ||
55 | MOV_A2R(ALPHA_255, mm5) | ||
56 | MOV_A2R(c, mm3) | ||
57 | pxor_r2r(mm0, mm0); | ||
58 | MOV_P2R(s, mm2, mm0) | ||
59 | MOV_P2R(*d, mm1, mm0) | ||
60 | INTERP_256_R2R(mm3, mm2, mm1, mm5); | ||
61 | MOV_R2P(mm1, *d, mm0) | ||
62 | } | ||
63 | |||
64 | #define _op_copy_pt_pan_mas_dp_mmx _op_copy_pt_p_mas_dp_mmx | ||
65 | #define _op_copy_pt_pas_mas_dp_mmx _op_copy_pt_p_mas_dp_mmx | ||
66 | |||
67 | #define _op_copy_pt_p_mas_dpan_mmx _op_copy_pt_p_mas_dp_mmx | ||
68 | #define _op_copy_pt_pan_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx | ||
69 | #define _op_copy_pt_pas_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx | ||
70 | |||
71 | static void | ||
72 | init_copy_pixel_mask_pt_funcs_mmx(void) | ||
73 | { | ||
74 | op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_p_mas_dp_mmx; | ||
75 | op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_pan_mas_dp_mmx; | ||
76 | op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_pas_mas_dp_mmx; | ||
77 | |||
78 | op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_p_mas_dpan_mmx; | ||
79 | op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pan_mas_dpan_mmx; | ||
80 | op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pas_mas_dpan_mmx; | ||
81 | } | ||
82 | #endif | ||
83 | |||
84 | /*-----*/ | ||
85 | |||
86 | /* copy_rel pixel x mask --> dst */ | ||
87 | |||
88 | #ifdef BUILD_MMX | ||
89 | static void | ||
90 | _op_copy_rel_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { | ||
91 | DATA32 *e = d + l; | ||
92 | pxor_r2r(mm0, mm0); | ||
93 | MOV_A2R(ALPHA_255, mm5) | ||
94 | while (d < e) { | ||
95 | l = *m; | ||
96 | switch(l) | ||
97 | { | ||
98 | case 0: | ||
99 | break; | ||
100 | case 255: | ||
101 | MOV_P2R(*s, mm2, mm0) | ||
102 | MOV_PA2R(*d, mm1) | ||
103 | MUL4_SYM_R2R(mm2, mm1, mm5) | ||
104 | MOV_R2P(mm1, *d, mm0) | ||
105 | break; | ||
106 | default: | ||
107 | l++; | ||
108 | MOV_P2R(*s, mm3, mm0) | ||
109 | MOV_P2R(*d, mm1, mm0) | ||
110 | MOV_RA2R(mm1, mm2) | ||
111 | MUL4_SYM_R2R(mm3, mm2, mm5) | ||
112 | MOV_A2R(l, mm3) | ||
113 | INTERP_256_R2R(mm3, mm2, mm1, mm5) | ||
114 | MOV_R2P(mm1, *d, mm0) | ||
115 | break; | ||
116 | } | ||
117 | m++; s++; d++; | ||
118 | } | ||
119 | } | ||
120 | |||
121 | #define _op_copy_rel_pan_mas_dp_mmx _op_copy_rel_p_mas_dp_mmx | ||
122 | #define _op_copy_rel_pas_mas_dp_mmx _op_copy_rel_p_mas_dp_mmx | ||
123 | |||
124 | #define _op_copy_rel_p_mas_dpan_mmx _op_copy_p_mas_dpan_mmx | ||
125 | #define _op_copy_rel_pan_mas_dpan_mmx _op_copy_pan_mas_dpan_mmx | ||
126 | #define _op_copy_rel_pas_mas_dpan_mmx _op_copy_pas_mas_dpan_mmx | ||
127 | |||
128 | static void | ||
129 | init_copy_rel_pixel_mask_span_funcs_mmx(void) | ||
130 | { | ||
131 | op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_p_mas_dp_mmx; | ||
132 | op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pan_mas_dp_mmx; | ||
133 | op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pas_mas_dp_mmx; | ||
134 | |||
135 | op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_p_mas_dpan_mmx; | ||
136 | op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pan_mas_dpan_mmx; | ||
137 | op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pas_mas_dpan_mmx; | ||
138 | } | ||
139 | #endif | ||
140 | |||
141 | #ifdef BUILD_MMX | ||
142 | static void | ||
143 | _op_copy_rel_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { | ||
144 | c = m + 1; | ||
145 | pxor_r2r(mm0, mm0); | ||
146 | MOV_A2R(ALPHA_255, mm5) | ||
147 | MOV_P2R(s, mm3, mm0) | ||
148 | MOV_P2R(*d, mm1, mm0) | ||
149 | MOV_RA2R(mm1, mm2) | ||
150 | MUL4_SYM_R2R(mm3, mm2, mm5) | ||
151 | MOV_A2R(c, mm3) | ||
152 | INTERP_256_R2R(mm3, mm2, mm1, mm5) | ||
153 | MOV_R2P(mm1, *d, mm0) | ||
154 | } | ||
155 | |||
156 | |||
157 | #define _op_copy_rel_pt_pan_mas_dp_mmx _op_copy_rel_pt_p_mas_dp_mmx | ||
158 | #define _op_copy_rel_pt_pas_mas_dp_mmx _op_copy_rel_pt_p_mas_dp_mmx | ||
159 | |||
160 | #define _op_copy_rel_pt_p_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx | ||
161 | #define _op_copy_rel_pt_pan_mas_dpan_mmx _op_copy_pt_pan_mas_dpan_mmx | ||
162 | #define _op_copy_rel_pt_pas_mas_dpan_mmx _op_copy_pt_pas_mas_dpan_mmx | ||
163 | |||
164 | static void | ||
165 | init_copy_rel_pixel_mask_pt_funcs_mmx(void) | ||
166 | { | ||
167 | op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_p_mas_dp_mmx; | ||
168 | op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pan_mas_dp_mmx; | ||
169 | op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pas_mas_dp_mmx; | ||
170 | |||
171 | op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_mas_dpan_mmx; | ||
172 | op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_mas_dpan_mmx; | ||
173 | op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_mas_dpan_mmx; | ||
174 | } | ||
175 | #endif | ||
176 | |||