source:
scripts/untested/blfs-patches/DirectFB-0.9.21-simd-amd64.patch@
10e90e4
Last change on this file since 10e90e4 was fd5b1fe, checked in by , 19 years ago | |
---|---|
|
|
File size: 6.2 KB |
-
src/gfx/generic/generic_mmx.h
Submitted By: Ryan Oliver <ryan.oliver@pha.com.au> Date: 2005-07-31 Initial Package Version: 0.9.21 Upstream Status: Unknown Origin: Gentoo Description: Supposedly fixes simd instructions on amd64. Didn't work here. diff -urN DirectFB-0.9.21.orig/src/gfx/generic/generic_mmx.h DirectFB-0.9.21/src/gfx/generic/generic_mmx.h
old new 172 172 "movq %%mm1, (%1)\n\t" 173 173 "dec %2\n\t" 174 174 "jz 3f\n\t" 175 "add l$8, %1\n\t"176 "add l%4, %0\n\t"177 "test l$0xFFFF0000, %0\n\t"175 "add $8, %1\n\t" 176 "add %4, %0\n\t" 177 "test $0xFFFF0000, %0\n\t" 178 178 "jz 2b\n\t" 179 "movl %0, %%edx\n\t" 180 "andl $0xFFFF0000, %%edx\n\t" 181 "shrl $14, %%edx\n\t" 179 "mov %0, %%edx\n\t" 180 "and $0xFFFF0000, %%edx\n\t" 181 "shr $14, %%edx\n\t" 182 #ifdef __x86_64__ 183 "add %%rbx, %3\n\t" 184 #else 182 185 "add %%edx, %3\n\t" 183 "andl $0xFFFF, %0\n\t" 186 #endif 187 "and $0xFFFF, %0\n\t" 184 188 "jmp 1b\n" 185 189 "3:\n\t" 186 190 "emms" … … 201 205 "movd (%2), %%mm1\n\t" 202 206 "punpcklbw %%mm0, %%mm1\n\t" 203 207 "movq %%mm1, (%0)\n\t" 204 "add l$4, %2\n\t"205 "add l$8, %0\n\t"208 "add $4, %2\n\t" 209 "add $8, %0\n\t" 206 210 "dec %1\n\t" 207 211 "jnz 1b\n\t" 208 212 "emms" … … 238 242 "dec %1\n\t" 239 243 "jz 2f\n\t" 240 244 "psrlq $16, %%mm0\n\t" 241 "add l$8, %0\n\t"245 "add $8, %0\n\t" 242 246 /* 2. Konvertierung nach 24 bit interleaved */ 243 247 "movq %%mm0, %%mm3\n\t" 244 248 "punpcklwd %%mm3, %%mm3\n\t" … … 252 256 "dec %1\n\t" 253 257 "jz 2f\n\t" 254 258 "psrlq $16, %%mm0\n\t" 255 "add l$8, %0\n\t"259 "add $8, %0\n\t" 256 260 /* 3. Konvertierung nach 24 bit interleaved */ 257 261 "movq %%mm0, %%mm3\n\t" 258 262 "punpcklwd %%mm3, %%mm3\n\t" … … 266 270 "dec %1\n\t" 267 271 "jz 2f\n\t" 268 272 "psrlq $16, %%mm0\n\t" 269 "add l$8, %0\n\t"273 "add $8, %0\n\t" 270 274 /* 4. Konvertierung nach 24 bit interleaved */ 271 275 "movq %%mm0, %%mm3\n\t" 272 276 "punpcklwd %%mm3, %%mm3\n\t" … … 279 283 "movq %%mm3, (%0)\n\t" 280 284 "dec %1\n\t" 281 285 "jz 2f\n\t" 282 "add l$8, %0\n\t"283 "add l$8, %2\n\t"286 "add $8, %0\n\t" 287 "add $8, %2\n\t" 284 288 "jmp 1b\n" 285 289 "2:\n\t" 286 290 "emms" … … 304 308 "punpcklbw %%mm6, %%mm0\n\t" 305 309 "por %%mm7, %%mm0\n\t" 306 310 "movq %%mm0, (%0)\n\t" 307 "add l$4, %2\n\t"308 "add l$8, %0\n\t"311 "add $4, %2\n\t" 312 "add $8, %0\n\t" 309 313 "dec %1\n\t" 310 314 "jnz 1b\n\t" 311 315 "emms" … … 322 326 323 327 __asm__ __volatile__ ( 324 328 "movq %3, %%mm7\n\t" 325 "cmp l$0, %2\n\t"329 "cmp $0, %2\n\t" 326 330 "jne 3f\n\t" 327 331 "movq %4, %%mm6\n\t" 328 332 "movd %5, %%mm0\n\t" … … 341 345 "psrlw $8, %%mm0\n\t" 342 346 "movq %%mm0, (%0)\n" 343 347 "1:\n\t" 344 "add l$8, %0\n\t"348 "add $8, %0\n\t" 345 349 "dec %1\n\t" 346 350 "jnz 4b\n\t" 347 351 "jmp 2f\n\t" … … 360 364 "psrlw $8, %%mm0\n\t" 361 365 "movq %%mm0, (%0)\n" 362 366 "1:\n\t" 363 "add l$8, %2\n\t"364 "add l$8, %0\n\t"367 "add $8, %2\n\t" 368 "add $8, %0\n\t" 365 369 "dec %1\n\t" 366 370 "jnz 3b\n\t" 367 371 "2:\n\t" … … 379 383 380 384 __asm__ __volatile__ ( 381 385 "movq %3, %%mm7\n\t" 382 "cmp l$0, %2\n\t"386 "cmp $0, %2\n\t" 383 387 "jne 3f\n\t" 384 388 "movq %4, %%mm6\n\t" 385 389 "movd %5, %%mm0\n\t" … … 397 401 "psrlw $8, %%mm1\n\t" 398 402 "movq %%mm1, (%0)\n" 399 403 "1:\n\t" 400 "add l$8, %0\n\t"404 "add $8, %0\n\t" 401 405 "dec %1\n\t" 402 406 "jnz 4b\n\t" 403 407 "jmp 2f\n\t" … … 415 419 "psrlw $8, %%mm1\n\t" 416 420 "movq %%mm1, (%0)\n" 417 421 "1:\n\t" 418 "add l$8, %2\n\t"419 "add l$8, %0\n\t"422 "add $8, %2\n\t" 423 "add $8, %0\n\t" 420 424 "dec %1\n\t" 421 425 "jnz 3b\n\t" 422 426 "2:\n\t" -
lib/direct/cpu_accel.c
diff -urN DirectFB-0.9.21.orig/src/misc/cpu_accel.c DirectFB-0.9.21/src/misc/cpu_accel.c
old new 57 57 58 58 #include "cpu_accel.h" 59 59 60 #ifdef __x86_64__ 61 static __u32 arch_accel (void) 62 { 63 return MM_ACCEL_X86_MMX | MM_ACCEL_X86_SSE | MM_ACCEL_X86_MMXEXT | MM_ACCEL_X86_SSE2 | MM_ACCEL_X86_3DNOW; 64 } 65 #endif 66 60 67 #ifdef ARCH_X86 61 68 static __u32 arch_accel (void) 62 69 { … … 175 182 176 183 __u32 dfb_mm_accel (void) 177 184 { 178 #if defined (ARCH_X86) || (defined (ARCH_PPC) && defined (ENABLE_ALTIVEC))185 #if defined(__x86_64__) || defined (ARCH_X86) || (defined (ARCH_PPC) && defined (ENABLE_ALTIVEC)) 179 186 static __u32 accel = ~0U; 180 187 181 188 if (accel != ~0U) … … 183 190 184 191 accel = arch_accel (); 185 192 186 #if def USE_SSE193 #if defined(USE_SSE) && !defined(__x86_64__) 187 194 188 195 /* test OS support for SSE */ 189 196 if (accel & MM_ACCEL_X86_SSE) {
Note:
See TracBrowser
for help on using the repository browser.