Browse Source

cpu: define VLC_ALTIVEC attribute macro

Like on x86 (e.g. VLC_SSE), this macro enables the use of AltiVec for
just a given function. Thus the other functions in the same C module
can be compiled without AltiVec and run on non-AltiVec processors.
pull/136/head
Rémi Denis-Courmont 4 years ago
committed by Hugo Beauzée-Luyssen
parent
commit
cb303e77f4
  1. 2
      include/vlc_cpu.h

2
include/vlc_cpu.h

@ -98,8 +98,10 @@ unsigned vlc_CPU_raw(void);
# ifdef ALTIVEC
# define vlc_CPU_ALTIVEC() (1)
# define VLC_ALTIVEC
# else
# define vlc_CPU_ALTIVEC() ((vlc_CPU() & VLC_CPU_ALTIVEC) != 0)
# define VLC_ALTIVEC __attribute__ ((__target__ ("altivec")))
# endif
# elif defined (__arm__)

Loading…
Cancel
Save