Architecture detector updated (also necessary cflag added), now should work for everything thrown at it [Nach]. Updated tools compile info and 'make tools' for new tool.

This commit is contained in:
grinvader
2005-11-02 03:56:39 +00:00
parent 70dc0095df
commit 49d1ad1080
4 changed files with 20 additions and 18 deletions

View File

@@ -115,7 +115,10 @@ ${PSR}: parsegen.cpp
ALL:
rm -f version.o
tools: cutrtype extraext minwhite nreplace sec-test srccount
tools: archopt cutrtype extraext minwhite nreplace sec-test srccount
archopt:
@CC@ @CFLAGS@ -m32 -o ${TOOLSDIR}/archopt ${TOOLSDIR}/archopt.c
cutrtype: ${TOOLSOBJ}
@CXX@ @CXXFLAGS@ -o ${TOOLSDIR}/cutrtype ${TOOLSDIR}/cutrtype.cpp ${TOOLSOBJ}

View File

@@ -512,27 +512,20 @@ if test x$enable_cpucheck != xno; then
}
}
#if __GNUC__ > 2
else if (strstr(model_name, "VIA"))
{
if (strstr(flags, " mmx "))
{
#if __GNUC__ > 3 || __GNUC_MINOR__ > 2
if (strstr(flags, " 3dnow ")) { cpu = "c3"; }
else if (!strcmp(vendor_id, "CentaurHauls") && strstr(flags, " mmx "))
{
if (strstr(flags, " 3dnow "))
{
cpu = (atoi(cpu_family) > 5) ? "c3" : "winchip2";
}
#if __GNUC__ > 3 || __GNUC_MINOR__ > 3
else if (strstr(flags, " sse ")) { cpu = "c3-2"; }
#endif
#endif
}
}
else if (strstr(model_name, "WinChip"))
{
#if __GNUC__ > 3 || __GNUC_MINOR__ > 2
if (strstr(flags, " mmx "))
{
cpu = (strstr(flags, " 3dnow ")) ? "winchip2" : "winchip-c6";
if (!cpu) { cpu = "winchip-c6"; }
}
#endif
}
#endif
if (!cpu)

View File

@@ -132,7 +132,10 @@ else
NFLAGS="$NFLAGS -O1"
fi
CFLAGSBAK="$CFLAGS"
CFLAGS="$CFLAGS -m32" dnl 64 bit cpus must use that for the arch detector
AM_ARCH_DETECT()
CFLAGS="$CFLAGSBAK"
AC_MSG_CHECKING(which cpu architecture to optimize for)
if test x$ARCH_INFO = x ; then

View File

@@ -6,6 +6,9 @@ g++ -Wall -O3 -o fileutil.o -c fileutil.cpp
g++ -Wall -O3 -o strutil.o -c strutil.cpp
Architecture detector:
gcc -Wall -O3 -m32 -o archopt.exe archopt.c
Cut Redundant ASM Typecasts:
g++ -Wall -O3 -o cutrtype.exe cutrtype.cpp fileutil.o strutil.o