]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Allow 32 bit x86 tests to run on amd64 machines.
authorTom Hughes <tom@compton.nu>
Fri, 11 Nov 2005 14:33:43 +0000 (14:33 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 11 Nov 2005 14:33:43 +0000 (14:33 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5087

cachegrind/tests/Makefile.am
cachegrind/tests/x86/Makefile.am
memcheck/tests/Makefile.am
memcheck/tests/x86/Makefile.am
none/tests/Makefile.am
none/tests/x86/Makefile.am
tests/cputest.c

index 480c0391d5d22f38883f054f0ce789516acfe9a0..9ebfe9001c17f01e4fafd8b3e119d5aabb3c9bda 100644 (file)
@@ -1,4 +1,14 @@
-SUBDIRS      = ${VG_ARCH}     .
+SUBDIRS = .
+if VG_X86_LINUX
+SUBDIRS += x86
+endif
+if VG_AMD64_LINUX
+SUBDIRS += amd64
+endif
+if VG_PPC32_LINUX
+SUBDIRS += ppc32
+endif
+
 DIST_SUBDIRS = ${VG_ARCH_ALL} .
 
 noinst_SCRIPTS = filter_stderr filter_cachesim_discards
index bc0031dc7677360dd67a874dffd90ad2a627781f..bc98f6a5ed0d846113b2e5c5578b05910d966134 100644 (file)
@@ -6,6 +6,6 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
 check_PROGRAMS = \
        fpu-28-108
 
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g
+AM_CFLAGS   = $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g
 
 fpu_28_108_SOURCES     = fpu-28-108.S
index 3adf2523a17f0b30f9b0fe17b5fe1daab0037683..99094ae6488559380dc5a9c0e681bf81a1bf896f 100644 (file)
@@ -1,4 +1,14 @@
-SUBDIRS      = ${VG_ARCH}     .
+SUBDIRS = .
+if VG_X86_LINUX
+SUBDIRS += x86
+endif
+if VG_AMD64_LINUX
+SUBDIRS += amd64
+endif
+if VG_PPC32_LINUX
+SUBDIRS += ppc32
+endif
+
 DIST_SUBDIRS = ${VG_ARCH_ALL} .
 
 noinst_SCRIPTS = filter_allocs filter_leak_check_size \
index 6a0e0f9af6093b132dd67745e4add7116df68796..d70885170efda485e811463534087f150c5f8b18 100644 (file)
@@ -18,9 +18,10 @@ check_PROGRAMS = \
        scalar_exit_group scalar_fork scalar_supp scalar_vfork \
        fpeflags pushfpopf scalar tronical
 
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g 
-AM_CXXFLAGS = $(AM_CFLAGS)
+AM_CPPFLAGS  = -I$(top_srcdir)/include
+AM_CFLAGS    = $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g 
+AM_CXXFLAGS  = $(AM_CFLAGS)
+AM_CCASFLAGS = @FLAG_M32@
 
 # must be built with these flags -- bug only occurred with them
 fpeflags_CFLAGS                = $(AM_CFLAGS) -march=i686
index 4d91f6db16b2500c97fece8b9e19af836d82a1ab..ae1bb8aa11636b152c980e8cbbebd3b8f0eebeb5 100644 (file)
@@ -1,4 +1,14 @@
-SUBDIRS      = ${VG_ARCH}     .
+SUBDIRS = .
+if VG_X86_LINUX
+SUBDIRS += x86
+endif
+if VG_AMD64_LINUX
+SUBDIRS += amd64
+endif
+if VG_PPC32_LINUX
+SUBDIRS += ppc32
+endif
+
 DIST_SUBDIRS = ${VG_ARCH_ALL} .
 
 noinst_SCRIPTS = \
index 1af97badbf0ea94f9329f8bc8c66382ffa157636..cde65a24446446e575332165883717ccc1a9cc14 100644 (file)
@@ -35,16 +35,16 @@ check_PROGRAMS = \
        lahf looper int pushpopseg sbbmisc \
        seg_override sigcontext smc1 yield
 
-AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow \
-               -g -I$(top_srcdir)/include \
+AM_CFLAGS    = $(WERROR) -Winline -Wall -Wshadow \
+               @FLAG_M32@ -g -I$(top_srcdir)/include \
                $(FLAG_MMMX) $(FLAG_MSSE)
-
-AM_CXXFLAGS = $(AM_CFLAGS)
+AM_CXXFLAGS  = $(AM_CFLAGS)
+AM_CCASFLAGS = @FLAG_M32@
 
 # generic C ones
 cpuid_SOURCES          = cpuid_c.c cpuid_s.s
 # fpu_lazy_eflags must use these flags -- the bug only occurred with them
-fpu_lazy_eflags_CFLAGS = -O2 -march=pentiumpro
+fpu_lazy_eflags_CFLAGS = @FLAG_M32@ -O2 -march=pentiumpro
 fxtract_LDADD          = -lm
 insn_basic_SOURCES     = insn_basic.def
 insn_basic_LDADD       = -lm
index 5db6b9d8291482699124a817e37f3205987ac626..c724b3c94553ba99fa03ef87f614cb4a35a10d08 100644 (file)
@@ -21,16 +21,6 @@ char* all_archs[] = {
    NULL
 };
 
-#ifdef __x86_64__
-static Bool go(char* cpu)
-{
-   if ( strcmp( cpu, "amd64" ) == 0 )
-      return True;
-   else 
-      return False;
-}
-#endif // __x86_64__
-
 #ifdef __powerpc__
 static Bool go(char* cpu)
 {
@@ -41,7 +31,7 @@ static Bool go(char* cpu)
 }
 #endif // __powerpc__
 
-#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 @@ static Bool go(char* cpu)
    } else if ( strcmp( cpu, "x86-sse2" ) == 0 ) {
      level = 1;
      mask = 1 << 26;
+#if defined(__x86_64__)
+   } else if ( strcmp( cpu, "amd64" ) == 0 ) {
+     return True;
+#endif
    } else {
      return False;
    }
@@ -90,7 +84,7 @@ static Bool go(char* cpu)
    }
    return False;
 }
-#endif // __i386__
+#endif // __i386__ || __x86_64__
 
 
 int main(int argc, char **argv)