# list of all preprocessor HAVE values we can define
CONFIG_HAVE="MALLOC_H ALTIVEC ALTIVEC_H MMX ARMV6 ARMV6T2 NEON BEOSTHREAD POSIXTHREAD WIN32THREAD THREAD LOG2F SWSCALE \
LAVF FFMS GPAC AVS GPL VECTOREXT INTERLACED CPU_COUNT OPENCL THP LSMASH X86_INLINE_ASM AS_FUNC INTEL_DISPATCHER \
- MSA MMAP WINRT VSX"
+ MSA MMAP WINRT VSX ARM_INLINE_ASM"
# parse options
;;
arm*)
ARCH="ARM"
- AS="${AS-${CC}}"
if [ "$SYS" = MACOSX ] ; then
+ AS="${AS-${CC}}"
ASFLAGS="$ASFLAGS -DPREFIX -DPIC" # apple's ld doesn't support movw/movt relocations at all
# build for armv7 by default
if ! echo $CFLAGS | grep -Eq '\-arch' ; then
CFLAGS="$CFLAGS -arch armv7"
LDFLAGS="$LDFLAGS -arch armv7"
fi
+ elif [ "$SYS" = WINDOWS ] ; then
+ AS="${AS-${SRCPATH}/tools/gas-preprocessor.pl -arch arm -as-type armasm -force-thumb -- armasm -nologo -ignore 4509}"
+ else
+ AS="${AS-${CC}}"
fi
;;
aarch64)
if [ $asm = auto -a $ARCH = ARM ] ; then
# set flags so neon is built by default
- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
-
- if cc_check '' '' '__asm__("rev ip, ip");' ; then define HAVE_ARMV6
+ [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
+
+ cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM
+ if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then
+ define HAVE_ARMV6
+ define HAVE_ARMV6T2
+ define HAVE_NEON
+ elif cc_check '' '' '__asm__("rev ip, ip");' ; then define HAVE_ARMV6
cc_check '' '' '__asm__("movt r0, #0");' && define HAVE_ARMV6T2
cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON
ASFLAGS="$ASFLAGS -c"
: "=a"(a) :: "edx", "memory" );
#elif ARCH_PPC
asm volatile( "mftb %0" : "=r"(a) :: "memory" );
-#elif ARCH_ARM // ARMv7 only
+#elif HAVE_ARM_INLINE_ASM // ARMv7 only
asm volatile( "mrc p15, 0, %0, c9, c13, 0" : "=r"(a) :: "memory" );
#elif ARCH_AARCH64
uint64_t b = 0;