Lines 3167-3176
Link Here
|
3167 |
{ |
3167 |
{ |
3168 |
#ifdef HAVE_MMX |
3168 |
#ifdef HAVE_MMX |
3169 |
asm volatile( |
3169 |
asm volatile( |
|
|
3170 |
#ifdef __PIC__ |
3171 |
"pushl %%ebx \n\t" |
3172 |
"movl %5, %%ebx \n\t" |
3173 |
#endif |
3170 |
"movq (%%eax), %%mm2 \n\t" // packedYOffset |
3174 |
"movq (%%eax), %%mm2 \n\t" // packedYOffset |
3171 |
"movq 8(%%eax), %%mm3 \n\t" // packedYScale |
3175 |
"movq 8(%%eax), %%mm3 \n\t" // packedYScale |
3172 |
"leal (%2,%4), %%eax \n\t" |
3176 |
"leal (%2,%4), %%eax \n\t" |
|
|
3177 |
#ifdef __PIC__ |
3178 |
"leal (%3,%%ebx), %%edx \n\t" |
3179 |
#else |
3173 |
"leal (%3,%5), %%edx \n\t" |
3180 |
"leal (%3,%5), %%edx \n\t" |
|
|
3181 |
#endif |
3174 |
"pxor %%mm4, %%mm4 \n\t" |
3182 |
"pxor %%mm4, %%mm4 \n\t" |
3175 |
#ifdef HAVE_MMX2 |
3183 |
#ifdef HAVE_MMX2 |
3176 |
#define SCALED_CPY(src1, src2, dst1, dst2) \ |
3184 |
#define SCALED_CPY(src1, src2, dst1, dst2) \ |
Lines 3223-3235
Link Here
|
3223 |
"movq %%mm1, " #dst2 " \n\t"\ |
3231 |
"movq %%mm1, " #dst2 " \n\t"\ |
3224 |
|
3232 |
|
3225 |
#endif //!HAVE_MMX2 |
3233 |
#endif //!HAVE_MMX2 |
3226 |
|
3234 |
#ifdef __PIC__ |
|
|
3235 |
SCALED_CPY((%2) , (%2, %4) , (%3) , (%3, %%ebx)) |
3236 |
SCALED_CPY((%2, %4, 2), (%%eax, %4, 2), (%3, %%ebx, 2), (%%edx, %%ebx, 2)) |
3237 |
SCALED_CPY((%2, %4, 4), (%%eax, %4, 4), (%3, %%ebx, 4), (%%edx, %%ebx, 4)) |
3238 |
"leal (%%eax,%4,4), %%eax \n\t" |
3239 |
"leal (%%edx,%%ebx,4), %%edx \n\t" |
3240 |
SCALED_CPY((%%eax, %4), (%%eax, %4, 2), (%%edx, %%ebx), (%%edx, %%ebx, 2)) |
3241 |
"popl %%ebx \n\t" |
3242 |
#else |
3227 |
SCALED_CPY((%2) , (%2, %4) , (%3) , (%3, %5)) |
3243 |
SCALED_CPY((%2) , (%2, %4) , (%3) , (%3, %5)) |
3228 |
SCALED_CPY((%2, %4, 2), (%%eax, %4, 2), (%3, %5, 2), (%%edx, %5, 2)) |
3244 |
SCALED_CPY((%2, %4, 2), (%%eax, %4, 2), (%3, %5, 2), (%%edx, %5, 2)) |
3229 |
SCALED_CPY((%2, %4, 4), (%%eax, %4, 4), (%3, %5, 4), (%%edx, %5, 4)) |
3245 |
SCALED_CPY((%2, %4, 4), (%%eax, %4, 4), (%3, %5, 4), (%%edx, %5, 4)) |
3230 |
"leal (%%eax,%4,4), %%eax \n\t" |
3246 |
"leal (%%eax,%4,4), %%eax \n\t" |
3231 |
"leal (%%edx,%5,4), %%edx \n\t" |
3247 |
"leal (%%edx,%5,4), %%edx \n\t" |
3232 |
SCALED_CPY((%%eax, %4), (%%eax, %4, 2), (%%edx, %5), (%%edx, %5, 2)) |
3248 |
SCALED_CPY((%%eax, %4), (%%eax, %4, 2), (%%edx, %5), (%%edx, %5, 2)) |
|
|
3249 |
#endif |
3233 |
|
3250 |
|
3234 |
|
3251 |
|
3235 |
: "=&a" (packedOffsetAndScale) |
3252 |
: "=&a" (packedOffsetAndScale) |
Lines 3237-3243
Link Here
|
3237 |
"r"(src), |
3254 |
"r"(src), |
3238 |
"r"(dst), |
3255 |
"r"(dst), |
3239 |
"r" (srcStride), |
3256 |
"r" (srcStride), |
|
|
3257 |
#ifdef __PIC__ |
3258 |
"m" (dstStride) |
3259 |
#else |
3240 |
"r" (dstStride) |
3260 |
"r" (dstStride) |
|
|
3261 |
#endif |
3241 |
: "%edx" |
3262 |
: "%edx" |
3242 |
); |
3263 |
); |
3243 |
#else |
3264 |
#else |
Lines 3250-3257
Link Here
|
3250 |
{ |
3271 |
{ |
3251 |
#ifdef HAVE_MMX |
3272 |
#ifdef HAVE_MMX |
3252 |
asm volatile( |
3273 |
asm volatile( |
|
|
3274 |
#ifdef __PIC__ |
3275 |
"pushl %%ebx \n\t" |
3276 |
"movl %3, %%ebx \n\t" |
3277 |
#endif |
3253 |
"leal (%0,%2), %%eax \n\t" |
3278 |
"leal (%0,%2), %%eax \n\t" |
|
|
3279 |
#ifdef __PIC__ |
3280 |
"leal (%1,%%ebx), %%edx \n\t" |
3281 |
#else |
3254 |
"leal (%1,%3), %%edx \n\t" |
3282 |
"leal (%1,%3), %%edx \n\t" |
|
|
3283 |
#endif |
3255 |
|
3284 |
|
3256 |
#define SIMPLE_CPY(src1, src2, dst1, dst2) \ |
3285 |
#define SIMPLE_CPY(src1, src2, dst1, dst2) \ |
3257 |
"movq " #src1 ", %%mm0 \n\t"\ |
3286 |
"movq " #src1 ", %%mm0 \n\t"\ |
Lines 3259-3275
Link Here
|
3259 |
"movq %%mm0, " #dst1 " \n\t"\ |
3288 |
"movq %%mm0, " #dst1 " \n\t"\ |
3260 |
"movq %%mm1, " #dst2 " \n\t"\ |
3289 |
"movq %%mm1, " #dst2 " \n\t"\ |
3261 |
|
3290 |
|
|
|
3291 |
#ifdef __PIC__ |
3292 |
SIMPLE_CPY((%0) , (%0, %2) , (%1) , (%1, %%ebx)) |
3293 |
SIMPLE_CPY((%0, %2, 2), (%%eax, %2, 2), (%1, %%ebx, 2), (%%edx, %%ebx, 2)) |
3294 |
SIMPLE_CPY((%0, %2, 4), (%%eax, %2, 4), (%1, %%ebx, 4), (%%edx, %%ebx, 4)) |
3295 |
"leal (%%eax,%2,4), %%eax \n\t" |
3296 |
"leal (%%edx,%%ebx,4), %%edx \n\t" |
3297 |
SIMPLE_CPY((%%eax, %2), (%%eax, %2, 2), (%%edx, %%ebx), (%%edx, %%ebx, 2)) |
3298 |
"popl %%ebx \n\t" |
3299 |
#else |
3262 |
SIMPLE_CPY((%0) , (%0, %2) , (%1) , (%1, %3)) |
3300 |
SIMPLE_CPY((%0) , (%0, %2) , (%1) , (%1, %3)) |
3263 |
SIMPLE_CPY((%0, %2, 2), (%%eax, %2, 2), (%1, %3, 2), (%%edx, %3, 2)) |
3301 |
SIMPLE_CPY((%0, %2, 2), (%%eax, %2, 2), (%1, %3, 2), (%%edx, %3, 2)) |
3264 |
SIMPLE_CPY((%0, %2, 4), (%%eax, %2, 4), (%1, %3, 4), (%%edx, %3, 4)) |
3302 |
SIMPLE_CPY((%0, %2, 4), (%%eax, %2, 4), (%1, %3, 4), (%%edx, %3, 4)) |
3265 |
"leal (%%eax,%2,4), %%eax \n\t" |
3303 |
"leal (%%eax,%2,4), %%eax \n\t" |
3266 |
"leal (%%edx,%3,4), %%edx \n\t" |
3304 |
"leal (%%edx,%3,4), %%edx \n\t" |
3267 |
SIMPLE_CPY((%%eax, %2), (%%eax, %2, 2), (%%edx, %3), (%%edx, %3, 2)) |
3305 |
SIMPLE_CPY((%%eax, %2), (%%eax, %2, 2), (%%edx, %3), (%%edx, %3, 2)) |
|
|
3306 |
#endif |
3268 |
|
3307 |
|
3269 |
: : "r" (src), |
3308 |
: : "r" (src), |
3270 |
"r" (dst), |
3309 |
"r" (dst), |
3271 |
"r" (srcStride), |
3310 |
"r" (srcStride), |
|
|
3311 |
#ifdef __PIC__ |
3312 |
"m" (dstStride) |
3313 |
#else |
3272 |
"r" (dstStride) |
3314 |
"r" (dstStride) |
|
|
3315 |
#endif |
3273 |
: "%eax", "%edx" |
3316 |
: "%eax", "%edx" |
3274 |
); |
3317 |
); |
3275 |
#else |
3318 |
#else |