]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix bug in helper_{IN,OUT} -- they weren't preserving %eflags as they should.
authorNicholas Nethercote <n.nethercote@gmail.com>
Thu, 22 Apr 2004 18:47:07 +0000 (18:47 +0000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Thu, 22 Apr 2004 18:47:07 +0000 (18:47 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2385

coregrind/vg_helpers.S

index 291c88b87d469ae32c90a55207427bc07a0dc789..08bbfc95b4ada1f46ef1c6d73432f62877830ffe 100644 (file)
@@ -132,6 +132,8 @@ VG_(helper_IN):
        pushl   %edx
        movl    16(%esp), %eax
        movl    12(%esp), %edx
+
+       pushfl
        cmpl    $4, %eax
        je      in_dword
        cmpl    $2, %eax
@@ -145,6 +147,7 @@ in_word:
 in_dword:
        inl     (%dx),%eax
 in_done:
+       popfl
        movl    %eax,12(%esp)
        popl    %edx
        popl    %eax
@@ -164,6 +167,8 @@ VG_(helper_OUT):
        pushl   %edx
        movl    16(%esp), %edx
        movl    12(%esp), %eax
+
+       pushfl
        cmpl    $4, 20(%esp)
        je      out_dword
        cmpl    $2, 20(%esp)
@@ -177,6 +182,7 @@ out_word:
 out_dword:
        outl    %eax,(%dx)
 out_done:
+       popfl
        popl    %edx
        popl    %eax
        ret