public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Ilya Leoshkevich <iii@linux.ibm.com>,
	Jakub Jelinek <jakub@redhat.com>,
	Jeff Law <jlaw@ventanamicro.com>,
	Richard Sandiford <richard.sandiford@arm.com>
Cc: Andreas Krebbel <krebbel@gcc.gnu.org>,
	gcc-patches@gcc.gnu.org,
	Segher Boessenkool <segher@kernel.crashing.org>,
	Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Subject: Re: [PATCH v2 2/2] asan: Align .LASANPC on function boundary
Date: Tue, 9 Jan 2024 11:55:05 -0700	[thread overview]
Message-ID: <31208620-16ed-4453-af96-cfdc463d0adc@gmail.com> (raw)
In-Reply-To: <20240102194511.3171559-3-iii@linux.ibm.com>



On 1/2/24 12:41, Ilya Leoshkevich wrote:
> GCC can emit code between the function label and the .LASANPC label,
> making the latter unaligned.  Some architectures cannot load unaligned
> labels directly and require literal pool entries, which is inefficient.
> 
> Move the invocation of asan_function_start to
> ASM_OUTPUT_FUNCTION_LABEL, which guarantees that no additional code is
> emitted.  This allows setting the .LASANPC label alignment to the
> respective function alignment.
> ---
>   gcc/asan.cc             |  6 ++----
>   gcc/config/i386/i386.cc |  2 +-
>   gcc/config/s390/s390.cc |  2 +-
>   gcc/defaults.h          |  2 +-
>   gcc/final.cc            |  3 ---
>   gcc/output.h            |  4 ++++
>   gcc/varasm.cc           | 14 ++++++++++++++
>   7 files changed, 23 insertions(+), 10 deletions(-)
So this needs a ChangeLog obviously.  I assume you've tested on s390[x]. 
  It should also be tested on x86 since it's the only other platform 
that redefined ASM_OUTPUT_FUNCTION_LABEL.

Assuming those tests pass without regression, then this is fine for the 
trunk.

Thanks,
Jeff

  reply	other threads:[~2024-01-09 18:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 19:41 [PATCH v2 0/2] " Ilya Leoshkevich
2024-01-02 19:41 ` [PATCH v2 1/2] Implement ASM_DECLARE_FUNCTION_NAME using ASM_OUTPUT_FUNCTION_LABEL Ilya Leoshkevich
2024-01-04 19:47   ` Jeff Law
2024-01-12 21:47   ` Jan-Benedict Glaw
2024-01-02 19:41 ` [PATCH v2 2/2] asan: Align .LASANPC on function boundary Ilya Leoshkevich
2024-01-09 18:55   ` Jeff Law [this message]
2024-01-09 19:44     ` Ilya Leoshkevich

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=31208620-16ed-4453-af96-cfdc463d0adc@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iii@linux.ibm.com \
    --cc=jakub@redhat.com \
    --cc=jlaw@ventanamicro.com \
    --cc=krebbel@gcc.gnu.org \
    --cc=richard.sandiford@arm.com \
    --cc=segher@kernel.crashing.org \
    --cc=stefansf@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).