public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Bill Schmidt <wschmidt@linux.ibm.com>
To: Florian Weimer <fweimer@redhat.com>,
	Tulio Magno Quites Machado Filho via Libc-alpha
	<libc-alpha@sourceware.org>
Cc: Nemanja Ivanovic <nemanjai@ca.ibm.com>,
	Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>,
	Alan Modra <amodra@gmail.com>
Subject: Re: [PATCH] powerpc: Define USE_PPC64_NOTOC iff compiler and linker also supports it
Date: Tue, 16 Nov 2021 16:46:39 -0600	[thread overview]
Message-ID: <28cb0f50-b742-939b-b35b-efdec78dcbf2@linux.ibm.com> (raw)
In-Reply-To: <87tugbakst.fsf@oldenburg.str.redhat.com>


On 11/16/21 2:48 PM, Florian Weimer via Libc-alpha wrote:
> * Tulio Magno Quites Machado Filho via Libc-alpha:
>
>> Tulio Magno Quites Machado Filho via Libc-alpha <libc-alpha@sourceware.org> writes:
>>
>>> Alan Modra via Libc-alpha <libc-alpha@sourceware.org> writes:
>>>
>>>> I have a question about powerpc64/ppc-mcount.S.  Why is the assembly
>>>> wrapper using ENTRY and a NOTOC call?  By using ENTRY you are saying
>>>> that calls to _mcount must have r2 valid.  Given that r2 is valid, why
>>>> then use NOTOC?
>>> I wouldn't be surprised if that was a misinterpretation of the ABI on my part.
>>>
>>> Looking at table 2.20 "Protocols for Local Function Calls", I think this is a
>>> scenario that falls to the last row of this table, where we have:
>> OK, I should be looking at table 2.19 because this is not a call within the
>> same compilation unit.
> I'm not entirely sure about that.  I think “local” in this context means
> “the caller has complete information about the callee”, and this is true
> for most direct calls within libc.so.6.  It's also necessary to make
> LTO-based calling convention optimizations effective.


See the text preceding these tables.  "A local function call is one where the 
callee is known and visible within the unit of code being compiled or assembled."

Some optimizations may occur when program portions are statically linked, but
this is the rule the compiler and/or assembly writer should follow.

Bill

>
> Thanks,
> Florian
>

  parent reply	other threads:[~2021-11-16 22:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 11:33 Adhemerval Zanella
2021-11-08 22:48 ` Fangrui Song
2021-11-09 11:05   ` Alan Modra
2021-11-16 19:42     ` Tulio Magno Quites Machado Filho
2021-11-16 20:20       ` Tulio Magno Quites Machado Filho
2021-11-16 20:48         ` Florian Weimer
2021-11-16 22:12           ` Fāng-ruì Sòng
2021-11-16 22:46           ` Bill Schmidt [this message]
2021-11-17  2:16       ` Alan Modra
2021-11-17  2:30         ` Alan Modra
2021-11-09 13:03   ` Adhemerval Zanella
2021-11-09 17:44     ` Fangrui Song
2021-11-09 18:44       ` Adhemerval Zanella
2021-11-19 15:52 ` Tulio Magno Quites Machado Filho
2021-11-22 17:54   ` Adhemerval Zanella
2021-11-25 17:02     ` Tulio Magno Quites Machado Filho
2021-11-25 17:16       ` Adhemerval Zanella

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=28cb0f50-b742-939b-b35b-efdec78dcbf2@linux.ibm.com \
    --to=wschmidt@linux.ibm.com \
    --cc=amodra@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nemanjai@ca.ibm.com \
    --cc=tuliom@linux.ibm.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).