Commit f5da07b6 authored by Christophe Massiot's avatar Christophe Massiot

Fixed bugs in the altivec detection, courtesy of Michel Lanners <mlan@cpu.lu>.

parent c15864db
This diff is collapsed.
......@@ -338,11 +338,11 @@ fi
AC_CACHE_CHECK([if \$CC groks Altivec inline assembly],
[ac_cv_altivec_inline],
[AC_TRY_COMPILE(,[void quux(){asm("mtspr 256,%0"::"r"(-1));}],
[AC_TRY_COMPILE(,[void quux(){asm("vperm 0,1,2,3");}],
ac_cv_altivec_inline=yes,
[save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Wa,-m7400"
AC_TRY_COMPILE(,[void quux(){asm("mtspr 256,%0"::"r"(-1));}],
AC_TRY_COMPILE(,[void quux(){asm("vperm 0,1,2,3");}],
[ac_cv_altivec_inline=yes; CFLAGS_ALTIVEC="-Wa,-m7400"],
ac_cv_altivec_inline=no)
CFLAGS=$save_CFLAGS
......
......@@ -50,7 +50,7 @@ $(BUILTIN_MOTION3DNOW): BUILTIN_MOTION3DNOW_%.o: %.c
$(BUILTIN_MOTIONALTIVEC): BUILTIN_MOTIONALTIVEC_%.o: .dep/%.d
$(BUILTIN_MOTIONALTIVEC): BUILTIN_MOTIONALTIVEC_%.o: %.c
$(CC) $(CFLAGS) $(CFLAGS_ALTIVEC) -DBUILTIN -DMODULE_NAME=motionaltivec -faltivec -c -o $@ $<
$(CC) $(CFLAGS) $(CFLAGS_ALTIVEC) -DBUILTIN -DMODULE_NAME=motionaltivec -c -o $@ $<
#
# Real targets
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment