|
From: <sv...@va...> - 2009-04-24 07:00:15
|
Author: njn Date: 2009-04-24 08:00:11 +0100 (Fri, 24 Apr 2009) New Revision: 9603 Log: Rename two .s files as .S files. This ensures that the preprocessor is run over them on Linux. (On Darwin, the preprocessor is also run over .s files because Darwin seems to have a weird case-insensitive file system. This is also why I had to removed the old files and then add them under the new names, rather than using 'svn mv'. Sigh.) Added: branches/DARWIN/memcheck/tests/x86/pushfpopf_s.S branches/DARWIN/none/tests/x86/cpuid_s.S Removed: branches/DARWIN/memcheck/tests/x86/pushfpopf_s.s branches/DARWIN/none/tests/x86/cpuid_s.s Modified: branches/DARWIN/memcheck/tests/x86/Makefile.am branches/DARWIN/none/tests/x86/Makefile.am Modified: branches/DARWIN/memcheck/tests/x86/Makefile.am =================================================================== --- branches/DARWIN/memcheck/tests/x86/Makefile.am 2009-04-24 06:25:15 UTC (rev 9602) +++ branches/DARWIN/memcheck/tests/x86/Makefile.am 2009-04-24 07:00:11 UTC (rev 9603) @@ -53,7 +53,7 @@ # fpeflags must use 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 if VGCONF_OS_IS_DARWIN pushpopmem_CFLAGS = $(AM_CFLAGS) -mdynamic-no-pic else Added: branches/DARWIN/memcheck/tests/x86/pushfpopf_s.S =================================================================== --- branches/DARWIN/memcheck/tests/x86/pushfpopf_s.S (rev 0) +++ branches/DARWIN/memcheck/tests/x86/pushfpopf_s.S 2009-04-24 07:00:11 UTC (rev 9603) @@ -0,0 +1,41 @@ + .file "twoparams.c" + .version "01.01" +gcc2_compiled.: +.text + .align 4 +.globl fooble + .type fooble,@function +fooble: + pushl %ebp + movl %esp, %ebp + movl 8(%ebp), %eax + + subl 12(%ebp), %eax + # flags are now undef if either operand is + # save possibly undef flags on stack + pushfl + + movl $0, %eax + addl $0, %eax + # flags are now definitely defined + + popfl + # resulting flag definedness depends on outcome of sub above + # should override that created by 0 + 0 above + # because Vex does an emulation-warning check on the popfl, + # an error should be reported for the popfl + + # now use the condition codes to generate a value + # in a way which will cause undefinedness to get reported + # (a second time) + jz labelz + movl $22, %eax + jmp theend +labelz: + movl $33, %eax +theend: + popl %ebp + ret +.Lfe1: + .size fooble,.Lfe1-fooble + .ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-98)" Deleted: branches/DARWIN/memcheck/tests/x86/pushfpopf_s.s =================================================================== --- branches/DARWIN/memcheck/tests/x86/pushfpopf_s.s 2009-04-24 06:25:15 UTC (rev 9602) +++ branches/DARWIN/memcheck/tests/x86/pushfpopf_s.s 2009-04-24 07:00:11 UTC (rev 9603) @@ -1,41 +0,0 @@ - .file "twoparams.c" - .version "01.01" -gcc2_compiled.: -.text - .align 4 -.globl fooble - .type fooble,@function -fooble: - pushl %ebp - movl %esp, %ebp - movl 8(%ebp), %eax - - subl 12(%ebp), %eax - # flags are now undef if either operand is - # save possibly undef flags on stack - pushfl - - movl $0, %eax - addl $0, %eax - # flags are now definitely defined - - popfl - # resulting flag definedness depends on outcome of sub above - # should override that created by 0 + 0 above - # because Vex does an emulation-warning check on the popfl, - # an error should be reported for the popfl - - # now use the condition codes to generate a value - # in a way which will cause undefinedness to get reported - # (a second time) - jz labelz - movl $22, %eax - jmp theend -labelz: - movl $33, %eax -theend: - popl %ebp - ret -.Lfe1: - .size fooble,.Lfe1-fooble - .ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-98)" Modified: branches/DARWIN/none/tests/x86/Makefile.am =================================================================== --- branches/DARWIN/none/tests/x86/Makefile.am 2009-04-24 06:25:15 UTC (rev 9602) +++ branches/DARWIN/none/tests/x86/Makefile.am 2009-04-24 07:00:11 UTC (rev 9603) @@ -101,7 +101,7 @@ AM_CFLAGS += -mdynamic-no-pic endif -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 Added: branches/DARWIN/none/tests/x86/cpuid_s.S =================================================================== --- branches/DARWIN/none/tests/x86/cpuid_s.S (rev 0) +++ branches/DARWIN/none/tests/x86/cpuid_s.S 2009-04-24 07:00:11 UTC (rev 9603) @@ -0,0 +1,71 @@ +#include "tests/asm.h" + + .file "oneparam.c" + .version "01.01" +gcc2_compiled.: +.text + .align 4 + +.globl VG_SYM_ASM(get_cpuid0) +VG_SYM_ASM(get_cpuid0): + pushl %ebp + movl %esp, %ebp + movl 8(%ebp), %eax + + pushl %edi + pushl %eax + pushl %ebx + pushl %ecx + pushl %edx + + movl %eax, %edi + movl $0, %eax + cpuid + movl %eax, (%edi) + movl %ebx, 4(%edi) + movl %ecx, 8(%edi) + movl %edx, 12(%edi) + + popl %edx + popl %ecx + popl %ebx + popl %eax + popl %edi + + popl %ebp + ret + + +.globl VG_SYM_ASM(get_cpuid1) +VG_SYM_ASM(get_cpuid1): + pushl %ebp + movl %esp, %ebp + movl 8(%ebp), %eax + + pushl %edi + pushl %eax + pushl %ebx + pushl %ecx + pushl %edx + + movl %eax, %edi + movl $1, %eax + cpuid + movl %eax, (%edi) + movl %ebx, 4(%edi) + movl %ecx, 8(%edi) + movl %edx, 12(%edi) + + popl %edx + popl %ecx + popl %ebx + popl %eax + popl %edi + + popl %ebp + ret + + + + + .ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-98)" Deleted: branches/DARWIN/none/tests/x86/cpuid_s.s =================================================================== --- branches/DARWIN/none/tests/x86/cpuid_s.s 2009-04-24 06:25:15 UTC (rev 9602) +++ branches/DARWIN/none/tests/x86/cpuid_s.s 2009-04-24 07:00:11 UTC (rev 9603) @@ -1,71 +0,0 @@ -#include "tests/asm.h" - - .file "oneparam.c" - .version "01.01" -gcc2_compiled.: -.text - .align 4 - -.globl VG_SYM_ASM(get_cpuid0) -VG_SYM_ASM(get_cpuid0): - pushl %ebp - movl %esp, %ebp - movl 8(%ebp), %eax - - pushl %edi - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - - movl %eax, %edi - movl $0, %eax - cpuid - movl %eax, (%edi) - movl %ebx, 4(%edi) - movl %ecx, 8(%edi) - movl %edx, 12(%edi) - - popl %edx - popl %ecx - popl %ebx - popl %eax - popl %edi - - popl %ebp - ret - - -.globl VG_SYM_ASM(get_cpuid1) -VG_SYM_ASM(get_cpuid1): - pushl %ebp - movl %esp, %ebp - movl 8(%ebp), %eax - - pushl %edi - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - - movl %eax, %edi - movl $1, %eax - cpuid - movl %eax, (%edi) - movl %ebx, 4(%edi) - movl %ecx, 8(%edi) - movl %edx, 12(%edi) - - popl %edx - popl %ecx - popl %ebx - popl %eax - popl %edi - - popl %ebp - ret - - - - - .ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-98)" |