From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7096C3858C2D; Thu, 2 Nov 2023 08:43:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7096C3858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698914619; bh=+RcqoEhYHN1V6q4W6AsvVRW59ImBMB4+wIjSr/cFdnY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qTfXsN7E728sgozkScolBGidtsBYiy/lGCKjA/m4uSri5Uh0MvVomlNxYnlbXUb+d idUeTeUxPYQIU15p5J/m92PLbtPuhQq96QRjTEsjsgbn3vFREd6NByUlmJIvssucv6 tlbsdtDArvCg6I2dFqMqi68gaurLGBbTl/PLp8IE= From: "chenglulu at loongson dot cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112330] [14 Regression] LoongArch: Bootstrap failure with GAS 2.41 Date: Thu, 02 Nov 2023 08:43:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: assemble-failure, build X-Bugzilla-Severity: normal X-Bugzilla-Who: chenglulu at loongson dot cn X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112330 --- Comment #14 from chenglulu --- (In reply to Xi Ruoyao from comment #13) > (In reply to chenglulu from comment #12) > > (In reply to Xi Ruoyao from comment #11) > > > I cherry-picked f87cf663af71e5d78c8d647fa48562102f3b0615 for Binutils= 2.41 > > > and get some better error message: > > >=20 > > > t.s:98064: Error: Reloc overflow > > > t.s:101127: Error: Reloc overflow > > > t.s:101453: Error: Reloc overflow > > > t.s:101555: Error: Reloc overflow > > >=20 > > > t.s is the assembly file in attachments. > >=20 > > 1fb3cdd87ec61715a5684925fb6d6a6cf53bb97c is also required=EF=BC=8E >=20 > I know, I'm just trying to understand the issue better. >=20 > I don't really understand why this was not a problem before r14-4674. And > this issue also did not show up immediately after r14-4674 (it even did n= ot > show up when I was developing r14-4851). We can clearly delete the macro ASM_OUTPUT_ALIGN_WITH_NOP in r14-4674, and before deleting this macro, the generated assembly file looks like this: ... .align 16,54525952,4 .L1: ... blt $r12,$r13,.L=EF=BC=91 ... after: .align 16 .L1: ... blt $r12,$r13,.L1 ... First of all, if you add -mrelax during the assembly process,".align 16,54525952,4" will be based on the situation at the time of assembly, and = the choice is to insert a nop function without insertion.But this ".align 16" w= ill insert 3 nops unconditionally. When calculating the jump range of the conditional branch, gcc calculates the space required for .align according = to the actual alignment. So after r14-4674 there will be an error=EF=BC=8E=