Don't use register ebx - it's GOT pointer for -fPIC libraries

This commit is contained in:
Jaroslav Kysela 2004-02-04 08:25:19 +00:00
parent bd93d0a672
commit 75190c6ed2

View file

@ -45,6 +45,7 @@ static void MIX_AREAS1(unsigned int size,
__asm__ __volatile__ ( __asm__ __volatile__ (
"\n" "\n"
"\tpush %%ebx\n" /* ebx is GOT pointer (-fPIC) */
/* /*
* initialization, load ESI, EDI, EBX registers * initialization, load ESI, EDI, EBX registers
*/ */
@ -134,13 +135,13 @@ static void MIX_AREAS1(unsigned int size,
"\tjnz 4b\n" "\tjnz 4b\n"
"\tdecl %0\n" "\tdecl %0\n"
"\tjnz 1b\n" "\tjnz 1b\n"
// "\tjmp 6f\n"
"7:" "7:"
"\tpop %%ebx\n" /* ebx is GOT pointer (-fPIC) */
: /* no output regs */ : /* no output regs */
: "m" (size), "m" (dst), "m" (src), "m" (sum), "m" (dst_step), "m" (src_step), "m" (sum_step) : "m" (size), "m" (dst), "m" (src), "m" (sum), "m" (dst_step), "m" (src_step), "m" (sum_step)
: "esi", "edi", "edx", "ecx", "ebx", "eax" : "esi", "edi", "edx", "ecx", "eax"
); );
} }
@ -163,6 +164,7 @@ static void MIX_AREAS1_MMX(unsigned int size,
__asm__ __volatile__ ( __asm__ __volatile__ (
"\n" "\n"
"\tpush %%ebx\n" /* ebx is GOT pointer (-fPIC) */
/* /*
* initialization, load ESI, EDI, EBX registers * initialization, load ESI, EDI, EBX registers
*/ */
@ -219,10 +221,11 @@ static void MIX_AREAS1_MMX(unsigned int size,
"\tdecl %0\n" "\tdecl %0\n"
"\tjnz 1b\n" "\tjnz 1b\n"
"\temms\n" "\temms\n"
"\tpop %%ebx\n" /* ebx is GOT pointer (-fPIC) */
: /* no output regs */ : /* no output regs */
: "m" (size), "m" (dst), "m" (src), "m" (sum), "m" (dst_step), "m" (src_step), "m" (sum_step) : "m" (size), "m" (dst), "m" (src), "m" (sum), "m" (dst_step), "m" (src_step), "m" (sum_step)
: "esi", "edi", "edx", "ecx", "ebx", "eax" : "esi", "edi", "edx", "ecx", "eax"
); );
} }
@ -245,6 +248,7 @@ static void MIX_AREAS2(unsigned int size,
__asm__ __volatile__ ( __asm__ __volatile__ (
"\n" "\n"
"\tpush %%ebx\n" /* ebx is GOT pointer (-fPIC) */
/* /*
* initialization, load ESI, EDI, EBX registers * initialization, load ESI, EDI, EBX registers
*/ */
@ -323,9 +327,10 @@ static void MIX_AREAS2(unsigned int size,
"\tjmp 1b\n" "\tjmp 1b\n"
"6:" "6:"
"\tpop %%ebx\n" /* ebx is GOT pointer (-fPIC) */
: /* no output regs */ : /* no output regs */
: "m" (size), "m" (dst), "m" (src), "m" (sum), "m" (dst_step), "m" (src_step), "m" (sum_step) : "m" (size), "m" (dst), "m" (src), "m" (sum), "m" (dst_step), "m" (src_step), "m" (sum_step)
: "esi", "edi", "edx", "ecx", "ebx", "eax" : "esi", "edi", "edx", "ecx", "eax"
); );
} }