File: pushfpopf_s.S

package info (click to toggle)
valgrind 1%3A3.24.0-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 176,332 kB
  • sloc: ansic: 795,029; exp: 26,134; xml: 23,472; asm: 14,393; cpp: 9,397; makefile: 7,464; sh: 6,122; perl: 5,446; python: 1,498; javascript: 981; awk: 166; csh: 1
file content (48 lines) | stat: -rw-r--r-- 1,183 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "tests/asm.h"

#if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd)
	.version	"01.01"
#endif
gcc2_compiled.:
.text
	.align 4
.globl VG_SYM_ASM(fooble)
#if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd)
	.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) || defined(VGO_freebsd)
	.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)"