Ticket #1876: mplayer.diff

File mplayer.diff, 787 bytes (added by duvall@…, 15 years ago)

Patch to enable SSE detection on Solaris

  • cpudetect.c

     
    4545#include <os2.h>
    4646#elif defined(__AMIGAOS4__)
    4747#include <proto/exec.h>
     48#elif defined(__sun__)
     49#include <sys/auxv.h>
     50#include <sys/types.h>
    4851#endif
    4952
    5053/* Thanks to the FreeBSD project for some of this cpuid code, and
     
    174177        DosUnsetExceptionHandler( &RegRec );
    175178        mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" );
    176179    }
     180#elif defined(__sun__)
     181    uint_t ui;
     182    (void) getisax(&ui, 1);
     183    gCpuCaps.hasSSE = (ui & AV_386_SSE);
     184    gCpuCaps.hasSSE2 = (ui & AV_386_SSE2);
    177185#elif defined(__linux__)
    178186#if defined(_POSIX_SOURCE)
    179187    struct sigaction saved_sigill;