From 3b383dab10c63c236113d9ab9452495f8e933ca0 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 24 Apr 2009 07:12:39 +0000 Subject: [PATCH] Merged r9602 and r9603 (make cpuid pass on Darwin, rename .s files to .S) from the DARWIN branch. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9604 --- cachegrind/tests/x86/Makefile.am | 2 +- memcheck/tests/x86/Makefile.am | 2 +- .../tests/x86/{pushfpopf_s.s => pushfpopf_s.S} | 0 none/tests/x86/Makefile.am | 9 +++++---- none/tests/x86/{cpuid_s.s => cpuid_s.S} | 16 +++++----------- 5 files changed, 12 insertions(+), 17 deletions(-) rename memcheck/tests/x86/{pushfpopf_s.s => pushfpopf_s.S} (100%) rename none/tests/x86/{cpuid_s.s => cpuid_s.S} (78%) diff --git a/cachegrind/tests/x86/Makefile.am b/cachegrind/tests/x86/Makefile.am index 8c8e7e24a7..db9a875867 100644 --- a/cachegrind/tests/x86/Makefile.am +++ b/cachegrind/tests/x86/Makefile.am @@ -12,6 +12,6 @@ check_PROGRAMS = \ AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) -AM_CCASFLAGS = @FLAG_M32@ +AM_CCASFLAGS = $(AM_CPPFLAGS) @FLAG_M32@ fpu_28_108_SOURCES = fpu-28-108.S diff --git a/memcheck/tests/x86/Makefile.am b/memcheck/tests/x86/Makefile.am index bba38b5737..49c9d3fb1a 100644 --- a/memcheck/tests/x86/Makefile.am +++ b/memcheck/tests/x86/Makefile.am @@ -46,7 +46,7 @@ AM_CCASFLAGS = @FLAG_M32@ # must be built with these flags -- bug only occurred with them fpeflags_CFLAGS = $(AM_CFLAGS) -march=i686 -pushfpopf_SOURCES = pushfpopf_c.c pushfpopf_s.s +pushfpopf_SOURCES = pushfpopf_c.c pushfpopf_s.S tronical_SOURCES = tronical.S more_x86_fp_LDADD = -lm diff --git a/memcheck/tests/x86/pushfpopf_s.s b/memcheck/tests/x86/pushfpopf_s.S similarity index 100% rename from memcheck/tests/x86/pushfpopf_s.s rename to memcheck/tests/x86/pushfpopf_s.S diff --git a/none/tests/x86/Makefile.am b/none/tests/x86/Makefile.am index 5ddfeb2bd0..bce98a83f5 100644 --- a/none/tests/x86/Makefile.am +++ b/none/tests/x86/Makefile.am @@ -67,8 +67,8 @@ check_PROGRAMS = \ bug137714-x86 \ bug152818-x86 \ cmpxchg8b \ - cpuid \ - cse_fail \ + cpuid \ + cse_fail \ faultstatus \ fcmovnu \ fpu_lazy_eflags \ @@ -89,13 +89,14 @@ if BUILD_SSSE3_TESTS check_PROGRAMS += ssse3_misaligned endif + AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) -AM_CCASFLAGS = @FLAG_M32@ +AM_CCASFLAGS = $(AM_CPPFLAGS) @FLAG_M32@ # generic C ones -cpuid_SOURCES = cpuid_c.c cpuid_s.s +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 = $(AM_CFLAGS) -O2 -march=pentiumpro fxtract_LDADD = -lm diff --git a/none/tests/x86/cpuid_s.s b/none/tests/x86/cpuid_s.S similarity index 78% rename from none/tests/x86/cpuid_s.s rename to none/tests/x86/cpuid_s.S index 27bcc935da..3dabdcd01e 100644 --- a/none/tests/x86/cpuid_s.s +++ b/none/tests/x86/cpuid_s.S @@ -1,4 +1,4 @@ - +#include "tests/asm.h" .file "oneparam.c" .version "01.01" @@ -6,9 +6,8 @@ gcc2_compiled.: .text .align 4 -.globl get_cpuid0 - .type get_cpuid0,@function -get_cpuid0: +.globl VG_SYM_ASM(get_cpuid0) +VG_SYM_ASM(get_cpuid0): pushl %ebp movl %esp, %ebp movl 8(%ebp), %eax @@ -35,13 +34,10 @@ get_cpuid0: popl %ebp ret -.Lfe1: - .size get_cpuid0,.Lfe1-get_cpuid0 -.globl get_cpuid1 - .type get_cpuid1,@function -get_cpuid1: +.globl VG_SYM_ASM(get_cpuid1) +VG_SYM_ASM(get_cpuid1): pushl %ebp movl %esp, %ebp movl 8(%ebp), %eax @@ -68,8 +64,6 @@ get_cpuid1: popl %ebp ret -.Lfe2: - .size get_cpuid1,.Lfe2-get_cpuid1 -- 2.47.3