From patchwork Wed Feb 21 03:08:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lulu Cheng X-Patchwork-Id: 1901807 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tfh8C0Rhxz23d4 for ; Wed, 21 Feb 2024 14:09:30 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DC5FD3858C5F for ; Wed, 21 Feb 2024 03:09:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 659743858D35 for ; Wed, 21 Feb 2024 03:08:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 659743858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 659743858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708484941; cv=none; b=VbLdkqTIBllv7tRqM3f++uxw2OOg6GtThMrRYEy5ejPX+mbrpmIdr56cQBuAMHnlDO7MHrVTTh6P492U7P+7/ITIY4owKQJt47R+419Y2C1A4msJ+YXV6rRzqUI5Z+YNRZng/oXdEooboKEe7ZOsDCH2gDh0s97b0Wmb4brWAuE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708484941; c=relaxed/simple; bh=ULHhaJIZuC3v2o+Iu9I7rqU3lW2Csj3OJOjCqFiFwcA=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=q/PPicZl28LV0LwamKdewntImV3Qx5EifuCWt10BD/RjOShgsbn/JjrJNJQOtkaRngmN8qwVFe72iAs6k0Usva6lyi/9CxGSrwT9CY5IPpwwCuaXN+M6E2cg7D8ouURYUy+wSWelHDU9/NTEBEqjBTyqMasqbBol0gqEFWqvkLw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail.loongson.cn ([114.242.206.163]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rccye-0000KH-AS for gcc-patches@gcc.gnu.org; Tue, 20 Feb 2024 22:08:58 -0500 Received: from loongson.cn (unknown [10.20.4.107]) by gateway (Coremail) with SMTP id _____8CxrutEadVlzacPAA--.40542S3; Wed, 21 Feb 2024 11:08:52 +0800 (CST) Received: from loongson-pc.loongson.cn (unknown [10.20.4.107]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxLs88adVlyGw9AA--.26359S3; Wed, 21 Feb 2024 11:08:52 +0800 (CST) From: Lulu Cheng To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn, chenglulu@loongson.cn Subject: [PATCH v1 1/4] LoongArch: Delete macro definition ASM_OUTPUT_ALIGN_WITH_NOP. Date: Wed, 21 Feb 2024 11:08:38 +0800 Message-Id: <20240221030841.23454-2-chenglulu@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240221030841.23454-1-chenglulu@loongson.cn> References: <20240221030841.23454-1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F0xvE2Ix0 cI8IcVAFwI0_Gr0_Xr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8V AvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E 14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU4Xo7DUUUU Received-SPF: pass client-ip=114.242.206.163; envelope-from=chenglulu@loongson.cn; helo=mail.loongson.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_FAIL, SPF_HELO_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org 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 (cherry picked from commit b20c7ee066cb7d952fa193972e8bc6362c6e4063) --- 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 f34a7a604cc..8d08b84c8eb 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. */