kwave  18.07.70
cputest.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MM_ACCEL_X86_MMX   0x80000000
 
#define MM_ACCEL_X86_3DNOW   0x40000000
 
#define MM_ACCEL_X86_MMXEXT   0x20000000
 
#define MM_ACCEL_X86_SSE   0x10000000
 
#define MM_ACCEL_X86_SSE2   0x08000000
 
#define MM_ACCEL_X86_SSE3   0x04000000
 
#define MM_ACCEL_X86_SSSE3   0x02000000
 
#define MM_ACCEL_X86_SSE4   0x01000000
 
#define MM_ACCEL_X86_SSE42   0x00800000
 
#define MM_ACCEL_X86_AVX   0x00400000
 
#define MM_MMX   MM_ACCEL_X86_MMX
 
#define MM_3DNOW   MM_ACCEL_X86_3DNOW
 
#define MM_MMXEXT   MM_ACCEL_X86_MMXEXT
 
#define MM_SSE   MM_ACCEL_X86_SSE
 
#define MM_SSE2   MM_ACCEL_X86_SSE2
 

Functions

uint32_t xine_mm_accel (void)
 

Macro Definition Documentation

◆ MM_3DNOW

#define MM_3DNOW   MM_ACCEL_X86_3DNOW

Definition at line 35 of file cputest.h.

◆ MM_ACCEL_X86_3DNOW

#define MM_ACCEL_X86_3DNOW   0x40000000

Definition at line 23 of file cputest.h.

◆ MM_ACCEL_X86_AVX

#define MM_ACCEL_X86_AVX   0x00400000

Definition at line 31 of file cputest.h.

◆ MM_ACCEL_X86_MMX

#define MM_ACCEL_X86_MMX   0x80000000

Definition at line 22 of file cputest.h.

◆ MM_ACCEL_X86_MMXEXT

#define MM_ACCEL_X86_MMXEXT   0x20000000

Definition at line 24 of file cputest.h.

◆ MM_ACCEL_X86_SSE

#define MM_ACCEL_X86_SSE   0x10000000

Definition at line 25 of file cputest.h.

◆ MM_ACCEL_X86_SSE2

#define MM_ACCEL_X86_SSE2   0x08000000

Definition at line 26 of file cputest.h.

◆ MM_ACCEL_X86_SSE3

#define MM_ACCEL_X86_SSE3   0x04000000

Definition at line 27 of file cputest.h.

◆ MM_ACCEL_X86_SSE4

#define MM_ACCEL_X86_SSE4   0x01000000

Definition at line 29 of file cputest.h.

◆ MM_ACCEL_X86_SSE42

#define MM_ACCEL_X86_SSE42   0x00800000

Definition at line 30 of file cputest.h.

◆ MM_ACCEL_X86_SSSE3

#define MM_ACCEL_X86_SSSE3   0x02000000

Definition at line 28 of file cputest.h.

◆ MM_MMX

#define MM_MMX   MM_ACCEL_X86_MMX

Definition at line 34 of file cputest.h.

◆ MM_MMXEXT

#define MM_MMXEXT   MM_ACCEL_X86_MMXEXT

Definition at line 36 of file cputest.h.

◆ MM_SSE

#define MM_SSE   MM_ACCEL_X86_SSE

Definition at line 37 of file cputest.h.

◆ MM_SSE2

#define MM_SSE2   MM_ACCEL_X86_SSE2

Definition at line 38 of file cputest.h.

Function Documentation

◆ xine_mm_accel()

uint32_t xine_mm_accel ( void  )

Definition at line 398 of file cpu_accel.cpp.

Referenced by probe_fast_memcpy(), and rdtsc().

399 {
400  static int initialized = 0;
401  static uint32_t accel = 0;
402 
403  if (!initialized) {
404 #ifdef HAVE_MLIB
405 #ifdef MLIB_LAZYLOAD
406  void *hndl;
407 
408  if ((hndl = dlopen("libmlib.so.2", RTLD_LAZY | RTLD_GLOBAL | RTLD_NODELETE)) != NULL) {
409  dlclose(hndl);
410  accel |= MM_ACCEL_MLIB;
411  }
412 #else
413  accel |= MM_ACCEL_MLIB;
414 #endif
415 #endif
416 
417 #if defined(__i386__) || defined(__x86_64__) || (defined(ARCH_PPC) && defined(ENABLE_ALTIVEC)) || (defined(ARCH_SPARC) && defined(ENABLE_VIS))
418  accel |= arch_accel();
419 #endif
420 
421  initialized = 1;
422  }
423 
424  return accel;
425 }
Here is the caller graph for this function: