Skip to content

Commit 3ee780c

Browse files
committed
build system: disable 3dNow! support by default
Closes: #11472. (cherry picked from commit 51570d9)
1 parent bee8874 commit 3ee780c

File tree

4 files changed

+54
-52
lines changed

4 files changed

+54
-52
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ dep_option(SDL_SSE "Use SSE assembly routines" ON "SDL_ASSEMBLY;
409409
dep_option(SDL_SSE2 "Use SSE2 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
410410
dep_option(SDL_SSE3 "Use SSE3 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
411411
dep_option(SDL_MMX "Use MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
412-
dep_option(SDL_3DNOW "Use 3Dnow! MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
412+
dep_option(SDL_3DNOW "Use 3Dnow! MMX assembly routines" OFF "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
413413
dep_option(SDL_ALTIVEC "Use Altivec assembly routines" ON "SDL_ASSEMBLY" OFF)
414414
dep_option(SDL_ARMSIMD "Use SIMD assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF)
415415
dep_option(SDL_ARMNEON "Use NEON assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF)

configure

+24-24
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ Optional Features:
16681668
--enable-ssemath Allow GCC to use SSE floating point math
16691669
[default=maybe]
16701670
--enable-mmx use MMX assembly routines [default=yes]
1671-
--enable-3dnow use 3DNow! assembly routines [default=yes]
1671+
--enable-3dnow use 3DNow! assembly routines [default=no]
16721672
--enable-sse use SSE assembly routines [default=yes]
16731673
--enable-sse2 use SSE2 assembly routines [default=maybe]
16741674
--enable-sse3 use SSE3 assembly routines [default=maybe]
@@ -20647,7 +20647,7 @@ if test ${enable_3dnow+y}
2064720647
then :
2064820648
enableval=$enable_3dnow;
2064920649
else $as_nop
20650-
enable_3dnow=yes
20650+
enable_3dnow=no
2065120651
fi
2065220652

2065320653
if test x$enable_3dnow = xyes; then
@@ -21036,28 +21036,28 @@ printf "%s\n" "#define HAVE_ALTIVEC_H 1" >>confdefs.h
2103621036
fi
2103721037
fi
2103821038

21039-
# Check whether --enable-lsx was given.
21039+
# Check whether --enable-lsx was given.
2104021040
if test ${enable_lsx+y}
2104121041
then :
2104221042
enableval=$enable_lsx;
2104321043
else $as_nop
2104421044
enable_lsx=yes
2104521045
fi
2104621046

21047-
if test x$enable_lsx = xyes; then
21048-
save_CFLAGS="$CFLAGS"
21049-
have_gcc_lsx=no
21050-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC -mlsx option" >&5
21047+
if test x$enable_lsx = xyes; then
21048+
save_CFLAGS="$CFLAGS"
21049+
have_gcc_lsx=no
21050+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC -mlsx option" >&5
2105121051
printf %s "checking for GCC -mlsx option... " >&6; }
21052-
lsx_CFLAGS="-mlsx"
21053-
CFLAGS="$save_CFLAGS $lsx_CFLAGS"
21052+
lsx_CFLAGS="-mlsx"
21053+
CFLAGS="$save_CFLAGS $lsx_CFLAGS"
2105421054

21055-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21055+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105621056
/* end confdefs.h. */
2105721057

21058-
#ifndef __loongarch_sx
21059-
#error Assembler CPP flag not enabled
21060-
#endif
21058+
#ifndef __loongarch_sx
21059+
#error Assembler CPP flag not enabled
21060+
#endif
2106121061

2106221062
int
2106321063
main (void)
@@ -21072,19 +21072,19 @@ then :
2107221072
have_gcc_lsx=yes
2107321073
fi
2107421074
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21075-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_lsx" >&5
21075+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_lsx" >&5
2107621076
printf "%s\n" "$have_gcc_lsx" >&6; }
21077-
CFLAGS="$save_CFLAGS"
21077+
CFLAGS="$save_CFLAGS"
2107821078

21079-
if test x$have_gcc_lsx = xyes; then
21080-
EXTRA_CFLAGS="$EXTRA_CFLAGS $lsx_CFLAGS"
21081-
SUMMARY_math="${SUMMARY_math} lsx"
21082-
fi
21079+
if test x$have_gcc_lsx = xyes; then
21080+
EXTRA_CFLAGS="$EXTRA_CFLAGS $lsx_CFLAGS"
21081+
SUMMARY_math="${SUMMARY_math} lsx"
2108321082
fi
21083+
fi
2108421084

21085-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lsxintrin.h" >&5
21085+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lsxintrin.h" >&5
2108621086
printf %s "checking for lsxintrin.h... " >&6; }
21087-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21087+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2108821088
/* end confdefs.h. */
2108921089
#include <lsxintrin.h>
2109021090
int
@@ -21102,13 +21102,13 @@ else $as_nop
2110221102
have_lsxintrin_h_hdr=no
2110321103
fi
2110421104
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21105-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_lsxintrin_h_hdr" >&5
21105+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_lsxintrin_h_hdr" >&5
2110621106
printf "%s\n" "$have_lsxintrin_h_hdr" >&6; }
21107-
if test x$have_lsxintrin_h_hdr = xyes; then
21107+
if test x$have_lsxintrin_h_hdr = xyes; then
2110821108

2110921109
printf "%s\n" "#define HAVE_LSXINTRIN_H 1" >>confdefs.h
2111021110

21111-
fi
21111+
fi
2111221112

2111321113
CheckOSS()
2111421114
{

configure.ac

+27-27
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,8 @@ dnl Check for various instruction support
698698
fi
699699

700700
AC_ARG_ENABLE(3dnow,
701-
[AS_HELP_STRING([--enable-3dnow], [use 3DNow! assembly routines [default=yes]])],
702-
, enable_3dnow=yes)
701+
[AS_HELP_STRING([--enable-3dnow], [use 3DNow! assembly routines [default=no]])],
702+
, enable_3dnow=no)
703703
if test x$enable_3dnow = xyes; then
704704
save_CFLAGS="$CFLAGS"
705705
have_gcc_3dnow=no
@@ -906,37 +906,37 @@ dnl Check for various instruction support
906906
fi
907907
fi
908908

909-
AC_ARG_ENABLE(lsx,
909+
AC_ARG_ENABLE(lsx,
910910
[AS_HELP_STRING([--enable-lsx], [use LSX assembly routines [default=yes]])],
911911
, enable_lsx=yes)
912-
if test x$enable_lsx = xyes; then
913-
save_CFLAGS="$CFLAGS"
914-
have_gcc_lsx=no
915-
AC_MSG_CHECKING(for GCC -mlsx option)
916-
lsx_CFLAGS="-mlsx"
917-
CFLAGS="$save_CFLAGS $lsx_CFLAGS"
912+
if test x$enable_lsx = xyes; then
913+
save_CFLAGS="$CFLAGS"
914+
have_gcc_lsx=no
915+
AC_MSG_CHECKING(for GCC -mlsx option)
916+
lsx_CFLAGS="-mlsx"
917+
CFLAGS="$save_CFLAGS $lsx_CFLAGS"
918918

919-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
920-
#ifndef __loongarch_sx
921-
#error Assembler CPP flag not enabled
922-
#endif
923-
]], [])], [have_gcc_lsx=yes], [])
924-
AC_MSG_RESULT($have_gcc_lsx)
925-
CFLAGS="$save_CFLAGS"
919+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
920+
#ifndef __loongarch_sx
921+
#error Assembler CPP flag not enabled
922+
#endif
923+
]], [])], [have_gcc_lsx=yes], [])
924+
AC_MSG_RESULT($have_gcc_lsx)
925+
CFLAGS="$save_CFLAGS"
926926

927-
if test x$have_gcc_lsx = xyes; then
928-
EXTRA_CFLAGS="$EXTRA_CFLAGS $lsx_CFLAGS"
929-
SUMMARY_math="${SUMMARY_math} lsx"
930-
fi
927+
if test x$have_gcc_lsx = xyes; then
928+
EXTRA_CFLAGS="$EXTRA_CFLAGS $lsx_CFLAGS"
929+
SUMMARY_math="${SUMMARY_math} lsx"
931930
fi
931+
fi
932932

933-
AC_MSG_CHECKING(for lsxintrin.h)
934-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <lsxintrin.h>]])],
935-
[have_lsxintrin_h_hdr=yes],[have_lsxintrin_h_hdr=no])
936-
AC_MSG_RESULT($have_lsxintrin_h_hdr)
937-
if test x$have_lsxintrin_h_hdr = xyes; then
938-
AC_DEFINE(HAVE_LSXINTRIN_H, 1, [ ])
939-
fi
933+
AC_MSG_CHECKING(for lsxintrin.h)
934+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <lsxintrin.h>]])],
935+
[have_lsxintrin_h_hdr=yes],[have_lsxintrin_h_hdr=no])
936+
AC_MSG_RESULT($have_lsxintrin_h_hdr)
937+
if test x$have_lsxintrin_h_hdr = xyes; then
938+
AC_DEFINE(HAVE_LSXINTRIN_H, 1, [ ])
939+
fi
940940

941941
dnl See if the OSS audio interface is supported
942942
CheckOSS()

include/SDL_cpuinfo.h

+2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ _m_prefetch(void *__P)
5353
#ifndef __MMX__
5454
#define __MMX__
5555
#endif
56+
/*
5657
#ifndef __3dNOW__
5758
#define __3dNOW__
5859
#endif
60+
*/
5961
#endif
6062
#ifndef __SSE__
6163
#define __SSE__

0 commit comments

Comments
 (0)