|
From: Tom H. <th...@cy...> - 2005-01-23 17:10:05
|
CVS commit by thughes:
Link in libarch.a and use VG_(cpuid) for x86 CPU feature tests rather
than trying to use our own inline version which has a habit of failing
to compile on some versions of gcc due to register starvation.
BUG: 96321
M +2 -1 Makefile.am 1.38
M +9 -8 cputest.c 1.7
--- valgrind/tests/Makefile.am #1.37:1.38
@@ -23,5 +23,6 @@
cputest_SOURCES = cputest.c
cputest_CFLAGS = $(AM_CFLAGS) -D__$(VG_ARCH)__
+cputest_DEPENDENCIES = ../coregrind/${VG_ARCH}/libarch.a
+cputest_LDADD = ../coregrind/${VG_ARCH}/libarch.a
toobig_allocs_SOURCES = toobig-allocs.c
true_SOURCES = true.c
-
--- valgrind/tests/cputest.c #1.6:1.7
@@ -23,13 +23,14 @@ char* all_archs[] = {
#ifdef __x86__
-static __inline__ void cpuid(unsigned int n,
+extern void vgPlain_cpuid(unsigned int n,
+ unsigned int *a, unsigned int *b,
+ unsigned int *c, unsigned int *d);
+
+static inline void cpuid(unsigned int n,
unsigned int *a, unsigned int *b,
unsigned int *c, unsigned int *d)
{
- __asm__ __volatile__ (
- "cpuid"
- : "=a" (*a), "=b" (*b), "=c" (*c), "=d" (*d) /* output */
- : "0" (n) /* input */
- );
+ vgPlain_cpuid(n, a, b, c, d);
+ return;
}
|