This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386] Remove EBX usage from asm code
- From: Jeff Law <law at redhat dot com>
- To: Evgeny Stupachenko <evstupac at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Mon, 05 Jan 2015 13:50:35 -0700
- Subject: Re: [PATCH, i386] Remove EBX usage from asm code
- Authentication-results: sourceware.org; auth=none
- References: <CAOvf_xxRWG-rskfXsgwqTV=DhzPiBrR+2J1QFfH-+eA1BiL_4A at mail dot gmail dot com>
On 12/28/14 09:46, Evgeny Stupachenko wrote:
Hi,
The patch removes EBX usage from asm code used in libgcc/crtstuff.c
It is safe now, but potentially buggy when glibc is rebuild with GCC
5.0 as EBX is not GOT register any more.
x86 bootstrap, make check passed.
Is it ok?
Evgeny
2014-12-28 Evgeny Stupachenko <evstupac@gmail.com>
* gnu-user.h (CRT_GET_RFIB_DATA): Remove EBX register usage.
* config/i386/sysv4.h (CRT_GET_RFIB_DATA): Ditto.
I don't understand the glibc reference above.
Ultimately what matters here, AFAICT is the value assigned to the
parameter to CRT_GET_RFIB_DATA which should be the base of the data
relative relocations. So the comment "It is safe now" seems wrong as well.
ISTM this is a critical fix as it would be possible for the PIC pseudo
to be assigned to something other than %ebx when compiling
libgcc/crtstuff.c. And if that happens, we'll pass in a junk value to
register_frame_info_bases.
Evgeny, can you clarify why you think things are safe now, but would not
be safe if glibc were to be built with the current GCC trunk?
Jeff