source: scripts/untested/blfs-patches/DirectFB-0.9.21-simd-amd64.patch @ fd5b1fe

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since fd5b1fe was fd5b1fe, checked in by Jim Gifford <clfs@…>, 18 years ago

r588@server (orig r586): ryan | 2005-08-05 22:47:43 -0700
Add pile of new patches for blfs packages



  • Property mode set to 100644
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  
    172172               "movq     %%mm1, (%1)\n\t"
    173173               "dec      %2\n\t"
    174174               "jz       3f\n\t"
    175                "addl     $8, %1\n\t"
    176                "addl     %4, %0\n\t"
    177                "testl    $0xFFFF0000, %0\n\t"
     175               "add     $8, %1\n\t"
     176               "add     %4, %0\n\t"
     177               "test    $0xFFFF0000, %0\n\t"
    178178               "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
    182185               "add      %%edx, %3\n\t"
    183                "andl     $0xFFFF, %0\n\t"
     186#endif
     187               "and     $0xFFFF, %0\n\t"
    184188               "jmp      1b\n"
    185189               "3:\n\t"
    186190               "emms"
     
    201205               "movd     (%2), %%mm1\n\t"
    202206               "punpcklbw %%mm0, %%mm1\n\t"
    203207               "movq     %%mm1, (%0)\n\t"
    204                "addl     $4, %2\n\t"
    205                "addl     $8, %0\n\t"
     208               "add     $4, %2\n\t"
     209               "add     $8, %0\n\t"
    206210               "dec      %1\n\t"
    207211               "jnz      1b\n\t"
    208212               "emms"
     
    238242               "dec      %1\n\t"
    239243               "jz       2f\n\t"
    240244               "psrlq    $16, %%mm0\n\t"
    241                "addl     $8, %0\n\t"
     245               "add     $8, %0\n\t"
    242246               /* 2. Konvertierung nach 24 bit interleaved */
    243247               "movq     %%mm0, %%mm3\n\t"
    244248               "punpcklwd %%mm3, %%mm3\n\t"
     
    252256               "dec      %1\n\t"
    253257               "jz       2f\n\t"
    254258               "psrlq    $16, %%mm0\n\t"
    255                "addl     $8, %0\n\t"
     259               "add     $8, %0\n\t"
    256260               /* 3. Konvertierung nach 24 bit interleaved */
    257261               "movq     %%mm0, %%mm3\n\t"
    258262               "punpcklwd %%mm3, %%mm3\n\t"
     
    266270               "dec      %1\n\t"
    267271               "jz       2f\n\t"
    268272               "psrlq    $16, %%mm0\n\t"
    269                "addl     $8, %0\n\t"
     273               "add     $8, %0\n\t"
    270274               /* 4. Konvertierung nach 24 bit interleaved */
    271275               "movq     %%mm0, %%mm3\n\t"
    272276               "punpcklwd %%mm3, %%mm3\n\t"
     
    279283               "movq     %%mm3, (%0)\n\t"
    280284               "dec      %1\n\t"
    281285               "jz       2f\n\t"
    282                "addl     $8, %0\n\t"
    283                "addl     $8, %2\n\t"
     286               "add     $8, %0\n\t"
     287               "add     $8, %2\n\t"
    284288               "jmp      1b\n"
    285289               "2:\n\t"
    286290               "emms"
     
    304308               "punpcklbw %%mm6, %%mm0\n\t"
    305309               "por      %%mm7, %%mm0\n\t"
    306310               "movq     %%mm0, (%0)\n\t"
    307                "addl     $4, %2\n\t"
    308                "addl     $8, %0\n\t"
     311               "add     $4, %2\n\t"
     312               "add     $8, %0\n\t"
    309313               "dec      %1\n\t"
    310314               "jnz      1b\n\t"
    311315               "emms"
     
    322326
    323327     __asm__ __volatile__ (
    324328               "movq     %3, %%mm7\n\t"
    325                "cmpl     $0, %2\n\t"
     329               "cmp     $0, %2\n\t"
    326330               "jne      3f\n\t"
    327331               "movq     %4, %%mm6\n\t"
    328332               "movd     %5, %%mm0\n\t"
     
    341345               "psrlw    $8, %%mm0\n\t"
    342346               "movq     %%mm0, (%0)\n"
    343347               "1:\n\t"
    344                "addl     $8, %0\n\t"
     348               "add     $8, %0\n\t"
    345349               "dec      %1\n\t"
    346350               "jnz      4b\n\t"
    347351               "jmp      2f\n\t"
     
    360364               "psrlw    $8, %%mm0\n\t"
    361365               "movq     %%mm0, (%0)\n"
    362366               "1:\n\t"
    363                "addl     $8, %2\n\t"
    364                "addl     $8, %0\n\t"
     367               "add     $8, %2\n\t"
     368               "add     $8, %0\n\t"
    365369               "dec      %1\n\t"
    366370               "jnz      3b\n\t"
    367371               "2:\n\t"
     
    379383
    380384     __asm__ __volatile__ (
    381385               "movq     %3, %%mm7\n\t"
    382                "cmpl     $0, %2\n\t"
     386               "cmp     $0, %2\n\t"
    383387               "jne      3f\n\t"
    384388               "movq     %4, %%mm6\n\t"
    385389               "movd     %5, %%mm0\n\t"
     
    397401               "psrlw    $8, %%mm1\n\t"
    398402               "movq     %%mm1, (%0)\n"
    399403               "1:\n\t"
    400                "addl     $8, %0\n\t"
     404               "add     $8, %0\n\t"
    401405               "dec      %1\n\t"
    402406               "jnz      4b\n\t"
    403407               "jmp      2f\n\t"
     
    415419               "psrlw    $8, %%mm1\n\t"
    416420               "movq     %%mm1, (%0)\n"
    417421               "1:\n\t"
    418                "addl     $8, %2\n\t"
    419                "addl     $8, %0\n\t"
     422               "add     $8, %2\n\t"
     423               "add     $8, %0\n\t"
    420424               "dec      %1\n\t"
    421425               "jnz      3b\n\t"
    422426               "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  
    5757
    5858#include "cpu_accel.h"
    5959
     60#ifdef __x86_64__
     61static __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
    6067#ifdef ARCH_X86
    6168static __u32 arch_accel (void)
    6269{
     
    175182
    176183__u32 dfb_mm_accel (void)
    177184{
    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))
    179186     static __u32 accel = ~0U;
    180187
    181188     if (accel != ~0U)
     
    183190
    184191     accel = arch_accel ();
    185192
    186 #ifdef USE_SSE
     193#if defined(USE_SSE) && !defined(__x86_64__)
    187194
    188195     /* test OS support for SSE */
    189196     if (accel & MM_ACCEL_X86_SSE) {
Note: See TracBrowser for help on using the repository browser.