|
From: <sv...@va...> - 2005-11-11 14:34:05
|
Author: tom
Date: 2005-11-11 14:33:43 +0000 (Fri, 11 Nov 2005)
New Revision: 5087
Log:
Allow 32 bit x86 tests to run on amd64 machines.
Modified:
trunk/cachegrind/tests/Makefile.am
trunk/cachegrind/tests/x86/Makefile.am
trunk/memcheck/tests/Makefile.am
trunk/memcheck/tests/x86/Makefile.am
trunk/none/tests/Makefile.am
trunk/none/tests/x86/Makefile.am
trunk/tests/cputest.c
Modified: trunk/cachegrind/tests/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/tests/Makefile.am 2005-11-11 13:46:52 UTC (rev 5086)
+++ trunk/cachegrind/tests/Makefile.am 2005-11-11 14:33:43 UTC (rev 5087)
@@ -1,4 +1,14 @@
-SUBDIRS =3D ${VG_ARCH} .
+SUBDIRS =3D .
+if VG_X86_LINUX
+SUBDIRS +=3D x86
+endif
+if VG_AMD64_LINUX
+SUBDIRS +=3D amd64
+endif
+if VG_PPC32_LINUX
+SUBDIRS +=3D ppc32
+endif
+
DIST_SUBDIRS =3D ${VG_ARCH_ALL} .
=20
noinst_SCRIPTS =3D filter_stderr filter_cachesim_discards
Modified: trunk/cachegrind/tests/x86/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/tests/x86/Makefile.am 2005-11-11 13:46:52 UTC (rev 5=
086)
+++ trunk/cachegrind/tests/x86/Makefile.am 2005-11-11 14:33:43 UTC (rev 5=
087)
@@ -6,6 +6,6 @@
check_PROGRAMS =3D \
fpu-28-108
=20
-AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g
+AM_CFLAGS =3D $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g
=20
fpu_28_108_SOURCES =3D fpu-28-108.S
Modified: trunk/memcheck/tests/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/Makefile.am 2005-11-11 13:46:52 UTC (rev 5086)
+++ trunk/memcheck/tests/Makefile.am 2005-11-11 14:33:43 UTC (rev 5087)
@@ -1,4 +1,14 @@
-SUBDIRS =3D ${VG_ARCH} .
+SUBDIRS =3D .
+if VG_X86_LINUX
+SUBDIRS +=3D x86
+endif
+if VG_AMD64_LINUX
+SUBDIRS +=3D amd64
+endif
+if VG_PPC32_LINUX
+SUBDIRS +=3D ppc32
+endif
+
DIST_SUBDIRS =3D ${VG_ARCH_ALL} .
=20
noinst_SCRIPTS =3D filter_allocs filter_leak_check_size \
Modified: trunk/memcheck/tests/x86/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/x86/Makefile.am 2005-11-11 13:46:52 UTC (rev 508=
6)
+++ trunk/memcheck/tests/x86/Makefile.am 2005-11-11 14:33:43 UTC (rev 508=
7)
@@ -18,9 +18,10 @@
scalar_exit_group scalar_fork scalar_supp scalar_vfork \
fpeflags pushfpopf scalar tronical
=20
-AM_CPPFLAGS =3D -I$(top_srcdir)/include
-AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g=20
-AM_CXXFLAGS =3D $(AM_CFLAGS)
+AM_CPPFLAGS =3D -I$(top_srcdir)/include
+AM_CFLAGS =3D $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g=20
+AM_CXXFLAGS =3D $(AM_CFLAGS)
+AM_CCASFLAGS =3D @FLAG_M32@
=20
# must be built with these flags -- bug only occurred with them
fpeflags_CFLAGS =3D $(AM_CFLAGS) -march=3Di686
Modified: trunk/none/tests/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/Makefile.am 2005-11-11 13:46:52 UTC (rev 5086)
+++ trunk/none/tests/Makefile.am 2005-11-11 14:33:43 UTC (rev 5087)
@@ -1,4 +1,14 @@
-SUBDIRS =3D ${VG_ARCH} .
+SUBDIRS =3D .
+if VG_X86_LINUX
+SUBDIRS +=3D x86
+endif
+if VG_AMD64_LINUX
+SUBDIRS +=3D amd64
+endif
+if VG_PPC32_LINUX
+SUBDIRS +=3D ppc32
+endif
+
DIST_SUBDIRS =3D ${VG_ARCH_ALL} .
=20
noinst_SCRIPTS =3D \
Modified: trunk/none/tests/x86/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/x86/Makefile.am 2005-11-11 13:46:52 UTC (rev 5086)
+++ trunk/none/tests/x86/Makefile.am 2005-11-11 14:33:43 UTC (rev 5087)
@@ -35,16 +35,16 @@
lahf looper int pushpopseg sbbmisc \
seg_override sigcontext smc1 yield
=20
-AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow \
- -g -I$(top_srcdir)/include \
+AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow \
+ @FLAG_M32@ -g -I$(top_srcdir)/include \
$(FLAG_MMMX) $(FLAG_MSSE)
+AM_CXXFLAGS =3D $(AM_CFLAGS)
+AM_CCASFLAGS =3D @FLAG_M32@
=20
-AM_CXXFLAGS =3D $(AM_CFLAGS)
-
# generic C ones
cpuid_SOURCES =3D cpuid_c.c cpuid_s.s
# fpu_lazy_eflags must use these flags -- the bug only occurred with the=
m
-fpu_lazy_eflags_CFLAGS =3D -O2 -march=3Dpentiumpro
+fpu_lazy_eflags_CFLAGS =3D @FLAG_M32@ -O2 -march=3Dpentiumpro
fxtract_LDADD =3D -lm
insn_basic_SOURCES =3D insn_basic.def
insn_basic_LDADD =3D -lm
Modified: trunk/tests/cputest.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/tests/cputest.c 2005-11-11 13:46:52 UTC (rev 5086)
+++ trunk/tests/cputest.c 2005-11-11 14:33:43 UTC (rev 5087)
@@ -21,16 +21,6 @@
NULL
};
=20
-#ifdef __x86_64__
-static Bool go(char* cpu)
-{
- if ( strcmp( cpu, "amd64" ) =3D=3D 0 )
- return True;
- else=20
- return False;
-}
-#endif // __x86_64__
-
#ifdef __powerpc__
static Bool go(char* cpu)
{
@@ -41,7 +31,7 @@
}
#endif // __powerpc__
=20
-#ifdef __i386__
+#if defined(__i386__) || defined(__x86_64__)
static void cpuid ( unsigned int n,
unsigned int* a, unsigned int* b,
unsigned int* c, unsigned int* d )
@@ -77,6 +67,10 @@
} else if ( strcmp( cpu, "x86-sse2" ) =3D=3D 0 ) {
level =3D 1;
mask =3D 1 << 26;
+#if defined(__x86_64__)
+ } else if ( strcmp( cpu, "amd64" ) =3D=3D 0 ) {
+ return True;
+#endif
} else {
return False;
}
@@ -90,7 +84,7 @@
}
return False;
}
-#endif // __i386__
+#endif // __i386__ || __x86_64__
=20
=20
int main(int argc, char **argv)
|