public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: LuluCheng <chenglulu@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-10169] LoongArch: Delete macro definition ASM_OUTPUT_ALIGN_WITH_NOP.
Date: Thu, 22 Feb 2024 03:16:51 +0000 (GMT)	[thread overview]
Message-ID: <20240222031651.C517F3858D1E@sourceware.org> (raw)

https://gcc.gnu.org/g:0181e86ac14387cfb84ff8583c1313a71b4d3661

commit r12-10169-g0181e86ac14387cfb84ff8583c1313a71b4d3661
Author: Lulu Cheng <chenglulu@loongson.cn>
Date:   Fri Sep 15 11:56:01 2023 +0800

    LoongArch: Delete macro definition ASM_OUTPUT_ALIGN_WITH_NOP.
    
    There are two reasons for removing this macro definition:
    1. The default in the assembler is to use the nop instruction for filling.
    2. For assembly directives: .align [abs-expr[, abs-expr[, abs-expr]]]
       The third expression it is the maximum number of bytes that should be
       skipped by this alignment directive.
       Therefore, it will affect the display of the specified alignment rules
       and affect the operating efficiency.
    
    This modification relies on binutils commit 1fb3cdd87ec61715a5684925fb6d6a6cf53bb97c.
    (Since the assembler will add nop based on the .align information when doing relax,
    it will cause the conditional branch to go out of bounds during the assembly process.
    This submission of binutils solves this problem.)
    
    gcc/ChangeLog:
    
            * config/loongarch/loongarch.h (ASM_OUTPUT_ALIGN_WITH_NOP):
            Delete.
    
    Co-authored-by: Chenghua Xu <xuchenghua@loongson.cn>
    
    (cherry picked from commit b20c7ee066cb7d952fa193972e8bc6362c6e4063)

Diff:
---
 gcc/config/loongarch/loongarch.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loongarch.h
index f34a7a604ccd..8d08b84c8eb2 100644
--- a/gcc/config/loongarch/loongarch.h
+++ b/gcc/config/loongarch/loongarch.h
@@ -978,11 +978,6 @@ typedef struct {
 
 #define ASM_OUTPUT_ALIGN(STREAM, LOG) fprintf (STREAM, "\t.align\t%d\n", (LOG))
 
-/* "nop" instruction 54525952 (andi $r0,$r0,0) is
-   used for padding.  */
-#define ASM_OUTPUT_ALIGN_WITH_NOP(STREAM, LOG) \
-  fprintf (STREAM, "\t.align\t%d,54525952,4\n", (LOG))
-
 /* This is how to output an assembler line to advance the location
    counter by SIZE bytes.  */

                 reply	other threads:[~2024-02-22  3:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20240222031651.C517F3858D1E@sourceware.org \
    --to=chenglulu@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /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).