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: Evgeny Stupachenko <evstupac at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Mon, 12 Jan 2015 14:56:24 +0300
- 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> <54AAF91B dot 3010805 at redhat dot com> <CAOvf_xzSbm28+E=QzhHb_AMdEWWmcwoZAuLyqR9Sx1n5wZre0A at mail dot gmail dot com> <20150112105008 dot GK1405 at tucnak dot redhat dot com>
Agree, I've missed the usage of the function
"__register_frame_info_bases" (frame_dummy assembly had only indirect
call when I miss "-pie" in compilation).
There is no reference on glibc that way. Sorry for the confusion.
So that is potentially buggy right now.
On Mon, Jan 12, 2015 at 1:50 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Jan 12, 2015 at 01:36:05PM +0300, Evgeny Stupachenko wrote:
>> "frame_dummy" does not use EBX in allocation now as there are enough
>> other registers (that we don't need to save/restore). So if we do not
>> modify "frame_dummy" EBX should stay unchanged.
>> "frame_dummy" does not initialize EBX register at the beginning it
>> expects that EBX is pic from glibc
>> "frame_dummy" is called from glibc and while we have glibc compiled by
>> 4.9 or older compiler EBX should come to "frame_dummy" as pic register
>
> I also don't understand how is this related to glibc in any way.
> From my understanding, the macro relied on %ebx being set to
> _GLOBAL_OFFSET_TABLE_ because the frame_dummy function does access
> GOT, so before the i?86 PIC reg changes it was computing %ebx.
>
> Jakub