public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kewen.Lin" <linkw@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>,
	       Umesh Kalappa <umesh.kalappa0@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: [PowerPC 64]r12 is not updated to GEP when control transferred from virtual thunk function .
Date: Fri, 17 May 2019 06:22:00 -0000	[thread overview]
Message-ID: <1c9540e2-81c8-83b3-60c1-8ef316a1a30c@linux.ibm.com> (raw)
In-Reply-To: <20190515233719.GM8599@gate.crashing.org>

Hi,

on 2019/5/16 脡脧脦莽7:37, Segher Boessenkool wrote:
> Hi Umesh,
> 
> Please spell out "global entry point", almost everything and everyone does.
> 
> On Wed, May 15, 2019 at 08:57:29PM +0530, Umesh Kalappa wrote:
> 
>>         .set    .LTHUNK0,_ZN12Intermediate1vEv
> 
>> _ZThn8_N12Intermediate1vEv:
>> .LCF2:
>> 0:      addis 2,12,.TOC.-.LCF2@ha
>>         addi 2,2,.TOC.-.LCF2@l
>>         .localentry     _ZThn8_N12Intermediate1vEv,.-_ZThn8_N12Intermediate1vEv
>>         b .LTHUNK0
> 
>> _ZN12Intermediate1vEv:
>> .LCF1:
>> 0:      addis 2,12,.TOC.-.LCF1@ha
>>         addi 2,2,.TOC.-.LCF1@l
> 
>> like above the control  from "_ZThn8_N12Intermediate1vEv" (support
>> function for this pointer update)  is transferred
>> "_ZN12Intermediate1vEv" by b  inst (where its not updating the r12)
>> and in the beginning  of   "_ZN12Intermediate1vEv" we are loading the
>> toc base from r12 (which is incorrect ) ,we are investigating the
>> issue and one way to fix the issue is that make THUNK to update the
>> r12 ,the cal like bctrl  or  load the r12 with the function address in
>> the _ZN12Intermediate1vEv prologue code .
> 
> The thunk should point to the local entry point instead, I guess?
> 

I do think so.  The call is locally, linker should know it's local and 
fix it up with local entry instead.  We don't need to keep r12 always
hold the entry of being called function.

> Please open a PR, with compilable testcase, and other relevant info (if
> you need some specific -mcpu= for example, or other flags, do mention
> that!)  See https://gcc.gnu.org/bugs.html for more info.  Thanks!
> 
> 
> Segher
> 

  reply	other threads:[~2019-05-17  6:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15 15:27 Umesh Kalappa
2019-05-15 16:05 ` Eric Botcazou
2019-05-15 17:47   ` Umesh Kalappa
2019-05-15 18:31     ` Eric Botcazou
2019-05-15 23:52       ` Segher Boessenkool
2019-05-16  3:30         ` Umesh Kalappa
2019-05-16 12:43           ` Umesh Kalappa
2019-05-16 22:52             ` Segher Boessenkool
2019-05-17  3:58               ` Umesh Kalappa
2019-05-20  6:50               ` Alan Modra
2019-05-20  7:55                 ` Segher Boessenkool
2019-05-20  8:19                   ` Alan Modra
2019-05-20  8:39                     ` Segher Boessenkool
2019-05-20  9:48                       ` Alan Modra
2019-05-15 23:37 ` Segher Boessenkool
2019-05-17  6:22   ` Kewen.Lin [this message]
2019-05-17  7:24     ` Eric Botcazou
2019-05-17  9:29       ` Kewen.Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c9540e2-81c8-83b3-60c1-8ef316a1a30c@linux.ibm.com \
    --to=linkw@linux.ibm.com \
    --cc=gcc@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    --cc=umesh.kalappa0@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).