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:
@@ -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}
|
||||
|
||||
@@ -424,7 +424,7 @@ if test x$enable_cpucheck != xno; then
|
||||
#if __GNUC__ > 2
|
||||
if (strstr(flags, " 3dnow "))
|
||||
{
|
||||
if (strstr(flags, " 3dnowext ") && (atoi(cpu_family) > 5))
|
||||
if (strstr(flags, " 3dnowext ") && (atoi(cpu_family) > 5))
|
||||
{
|
||||
#if __GNUC__ > 3 || __GNUC_MINOR__ > 0
|
||||
if (strstr(flags, " sse "))
|
||||
@@ -512,28 +512,21 @@ if test x$enable_cpucheck != xno; then
|
||||
}
|
||||
}
|
||||
#if __GNUC__ > 2
|
||||
else if (strstr(model_name, "VIA"))
|
||||
#if __GNUC__ > 3 || __GNUC_MINOR__ > 2
|
||||
else if (!strcmp(vendor_id, "CentaurHauls") && strstr(flags, " mmx "))
|
||||
{
|
||||
if (strstr(flags, " mmx "))
|
||||
if (strstr(flags, " 3dnow "))
|
||||
{
|
||||
#if __GNUC__ > 3 || __GNUC_MINOR__ > 2
|
||||
if (strstr(flags, " 3dnow ")) { cpu = "c3"; }
|
||||
#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";
|
||||
cpu = (atoi(cpu_family) > 5) ? "c3" : "winchip2";
|
||||
}
|
||||
#if __GNUC__ > 3 || __GNUC_MINOR__ > 3
|
||||
else if (strstr(flags, " sse ")) { cpu = "c3-2"; }
|
||||
#endif
|
||||
|
||||
if (!cpu) { cpu = "winchip-c6"; }
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (!cpu)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user