Skip to content

Commit 51570d9

Browse files
committedNov 17, 2024·
build system: disable 3dNow! support by default
Closes: #11472.
1 parent d1af211 commit 51570d9

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
@@ -412,7 +412,7 @@ dep_option(SDL_SSE "Use SSE assembly routines" ON "SDL_ASSEMBLY;
412412
dep_option(SDL_SSE2 "Use SSE2 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
413413
dep_option(SDL_SSE3 "Use SSE3 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
414414
dep_option(SDL_MMX "Use MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
415-
dep_option(SDL_3DNOW "Use 3Dnow! MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
415+
dep_option(SDL_3DNOW "Use 3Dnow! MMX assembly routines" OFF "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
416416
dep_option(SDL_ALTIVEC "Use Altivec assembly routines" ON "SDL_ASSEMBLY" OFF)
417417
dep_option(SDL_ARMSIMD "Use SIMD assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF)
418418
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
@@ -1672,7 +1672,7 @@ Optional Features:
16721672
--enable-ssemath Allow GCC to use SSE floating point math
16731673
[default=maybe]
16741674
--enable-mmx use MMX assembly routines [default=yes]
1675-
--enable-3dnow use 3DNow! assembly routines [default=yes]
1675+
--enable-3dnow use 3DNow! assembly routines [default=no]
16761676
--enable-sse use SSE assembly routines [default=yes]
16771677
--enable-sse2 use SSE2 assembly routines [default=maybe]
16781678
--enable-sse3 use SSE3 assembly routines [default=maybe]
@@ -20699,7 +20699,7 @@ if test ${enable_3dnow+y}
2069920699
then :
2070020700
enableval=$enable_3dnow;
2070120701
else $as_nop
20702-
enable_3dnow=yes
20702+
enable_3dnow=no
2070320703
fi
2070420704

2070520705
if test x$enable_3dnow = xyes; then
@@ -21088,28 +21088,28 @@ printf "%s\n" "#define HAVE_ALTIVEC_H 1" >>confdefs.h
2108821088
fi
2108921089
fi
2109021090

21091-
# Check whether --enable-lsx was given.
21091+
# Check whether --enable-lsx was given.
2109221092
if test ${enable_lsx+y}
2109321093
then :
2109421094
enableval=$enable_lsx;
2109521095
else $as_nop
2109621096
enable_lsx=yes
2109721097
fi
2109821098

21099-
if test x$enable_lsx = xyes; then
21100-
save_CFLAGS="$CFLAGS"
21101-
have_gcc_lsx=no
21102-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC -mlsx option" >&5
21099+
if test x$enable_lsx = xyes; then
21100+
save_CFLAGS="$CFLAGS"
21101+
have_gcc_lsx=no
21102+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC -mlsx option" >&5
2110321103
printf %s "checking for GCC -mlsx option... " >&6; }
21104-
lsx_CFLAGS="-mlsx"
21105-
CFLAGS="$save_CFLAGS $lsx_CFLAGS"
21104+
lsx_CFLAGS="-mlsx"
21105+
CFLAGS="$save_CFLAGS $lsx_CFLAGS"
2110621106

21107-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21107+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110821108
/* end confdefs.h. */
2110921109

21110-
#ifndef __loongarch_sx
21111-
#error Assembler CPP flag not enabled
21112-
#endif
21110+
#ifndef __loongarch_sx
21111+
#error Assembler CPP flag not enabled
21112+
#endif
2111321113

2111421114
int
2111521115
main (void)
@@ -21124,19 +21124,19 @@ then :
2112421124
have_gcc_lsx=yes
2112521125
fi
2112621126
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21127-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_lsx" >&5
21127+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_lsx" >&5
2112821128
printf "%s\n" "$have_gcc_lsx" >&6; }
21129-
CFLAGS="$save_CFLAGS"
21129+
CFLAGS="$save_CFLAGS"
2113021130

21131-
if test x$have_gcc_lsx = xyes; then
21132-
EXTRA_CFLAGS="$EXTRA_CFLAGS $lsx_CFLAGS"
21133-
SUMMARY_math="${SUMMARY_math} lsx"
21134-
fi
21131+
if test x$have_gcc_lsx = xyes; then
21132+
EXTRA_CFLAGS="$EXTRA_CFLAGS $lsx_CFLAGS"
21133+
SUMMARY_math="${SUMMARY_math} lsx"
2113521134
fi
21135+
fi
2113621136

21137-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lsxintrin.h" >&5
21137+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lsxintrin.h" >&5
2113821138
printf %s "checking for lsxintrin.h... " >&6; }
21139-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21139+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2114021140
/* end confdefs.h. */
2114121141
#include <lsxintrin.h>
2114221142
int
@@ -21154,13 +21154,13 @@ else $as_nop
2115421154
have_lsxintrin_h_hdr=no
2115521155
fi
2115621156
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21157-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_lsxintrin_h_hdr" >&5
21157+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_lsxintrin_h_hdr" >&5
2115821158
printf "%s\n" "$have_lsxintrin_h_hdr" >&6; }
21159-
if test x$have_lsxintrin_h_hdr = xyes; then
21159+
if test x$have_lsxintrin_h_hdr = xyes; then
2116021160

2116121161
printf "%s\n" "#define HAVE_LSXINTRIN_H 1" >>confdefs.h
2116221162

21163-
fi
21163+
fi
2116421164

2116521165
CheckOSS()
2116621166
{

‎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
@@ -59,9 +59,11 @@ _m_prefetch(void *__P)
5959
#ifndef __MMX__
6060
#define __MMX__
6161
#endif
62+
/*
6263
#ifndef __3dNOW__
6364
#define __3dNOW__
6465
#endif
66+
*/
6567
#endif
6668
#ifndef __SSE__
6769
#define __SSE__

0 commit comments

Comments
 (0)
Please sign in to comment.