From: Nicholas Nethercote Date: Thu, 22 Apr 2004 18:47:07 +0000 (+0000) Subject: Fix bug in helper_{IN,OUT} -- they weren't preserving %eflags as they should. X-Git-Tag: svn/VALGRIND_2_1_2~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e26fa084b9f75d38aaaa8c8b492727e610ded2f7;p=thirdparty%2Fvalgrind.git Fix bug in helper_{IN,OUT} -- they weren't preserving %eflags as they should. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2385 --- diff --git a/coregrind/vg_helpers.S b/coregrind/vg_helpers.S index 291c88b87d..08bbfc95b4 100644 --- a/coregrind/vg_helpers.S +++ b/coregrind/vg_helpers.S @@ -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