changeset 8215:a8ce4cbc3283 libavcodec

Replace pushf/popf by explicit pushfl/popfl (32 bit) or pushfq/popfq (x86_64), to fix generated code on ICC 11.0.
author reimar
date Tue, 25 Nov 2008 07:34:20 +0000
parents c5276ad92ff8
children 018299720403
files i386/cpuid.c
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/i386/cpuid.c	Tue Nov 25 00:20:49 2008 +0000
+++ b/i386/cpuid.c	Tue Nov 25 07:34:20 2008 +0000
@@ -44,10 +44,17 @@
     int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
     x86_reg a, c;
 
+#ifdef ARCH_X86_64
+#define PUSHF "pushfq\n\t"
+#define POPF "popfq\n\t"
+#else
+#define PUSHF "pushfl\n\t"
+#define POPF "popfl\n\t"
+#endif
     __asm__ volatile (
         /* See if CPUID instruction is supported ... */
         /* ... Get copies of EFLAGS into eax and ecx */
-        "pushf\n\t"
+        PUSHF
         "pop %0\n\t"
         "mov %0, %1\n\t"
 
@@ -55,10 +62,10 @@
         /*     to the EFLAGS reg */
         "xor $0x200000, %0\n\t"
         "push %0\n\t"
-        "popf\n\t"
+        POPF
 
         /* ... Get the (hopefully modified) EFLAGS */
-        "pushf\n\t"
+        PUSHF
         "pop %0\n\t"
         : "=a" (a), "=c" (c)
         :