]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Don't trash %eflags before snapshotting the state of the machine at
authorJulian Seward <jseward@acm.org>
Sun, 27 Apr 2003 22:23:23 +0000 (22:23 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 27 Apr 2003 22:23:23 +0000 (22:23 +0000)
startup.  I don't know if this is actually of interest, since surely
the flags are not live at the point where the section's .init function
is called, but still, it's a form of state pollution.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1570

coregrind/vg_startup.S

index 9122ebf3f13b914e42663334e444d17fd21f993a..f6c17a52a3dec5613748111bdc4cbceb2dba17d9 100644 (file)
@@ -64,11 +64,14 @@ valgrind_already_initted:
 
 .global VG_(startup)
 VG_(startup):
+       pushfl
        cmpl    $0, valgrind_already_initted
        je      really_start_up
+       popfl
        ret
 
 really_start_up:
+       popfl
        movl    $1, valgrind_already_initted
        
         # Record %esp as it was when we got here.  This is because argv/c