Files
ftmemsim-valgrind/memcheck/tests/x86/pushfpopf_s.S
Julian Seward ac60633d65 Bug 345248 - add support for Solaris OS in valgrind
Authors of this port:
    Petr Pavlu         setup@dagobah.cz
    Ivo Raisr          ivosh@ivosh.net
    Theo Schlossnagle  theo@omniti.com
            


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426
2015-07-21 14:44:28 +00:00

49 lines
1.1 KiB
ArmAsm

#include "tests/asm.h"
#if defined(VGO_linux) || defined(VGO_solaris)
.version "01.01"
#endif
gcc2_compiled.:
.text
.align 4
.globl VG_SYM_ASM(fooble)
#if defined(VGO_linux) || defined(VGO_solaris)
.type VG_SYM_ASM(fooble),@function
#endif
VG_SYM_ASM(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:
#if defined(VGO_linux) || defined(VGO_solaris)
.size VG_SYM_ASM(fooble),.Lfe1-VG_SYM_ASM(fooble)
#endif
.ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-98)"