[pcre-dev] [Bug 1326] pcre-8.33-RC1 build on x86 fails @ "er…

Page principale
Supprimer ce message
Auteur: Zoltan Herczeg
Date:  
À: pcre-dev
Sujet: [pcre-dev] [Bug 1326] pcre-8.33-RC1 build on x86 fails @ "error: PIC register clobbered by '%ebx' in 'asm'"
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1326

Zoltan Herczeg <hzmester@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hzmester@???





--- Comment #1 from Zoltan Herczeg <hzmester@???> 2012-12-23 07:09:56 ---
Thanks for reporting this. I recently removed the push/pop pair around cpuid,
since GCC seemed enough clever to save/restore these registers. This patch add
this back in 32 bit mode:

        /* AT&T syntax. */
        __asm__ (
                "movl $0x1, %%eax\n"
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+               "push %%ebx\n"
+#endif
                "cpuid\n"
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+               "pop %%ebx\n"
+#endif
                "movl %%edx, %0\n"
                : "=g" (features)
                :
 #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-               : "%eax", "%ebx", "%ecx", "%edx"
+               : "%eax", "%ecx", "%edx"
 #else
                : "%rax", "%rbx", "%rcx", "%rdx"
 #endif


The question is, does this workaround only needed for GCC in 32 bit mode, or
Intel C and SunPro C also need it. Daniel could you check it sometimes (the
--disable-static option is important)? Thank you in advance.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email