From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 87A7A385781A; Mon, 2 Nov 2020 07:39:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87A7A385781A From: "clyon at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96767] -mpure-code produces indirect loads for thumb-1 Date: Mon, 02 Nov 2020 07:39:29 +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: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: clyon at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: clyon at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 07:39:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96767 Christophe Lyon changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #2 from Christophe Lyon --- The master branch has been updated by Christophe Lyon : https://gcc.gnu.org/g:4d9af90d6a216822fe117337fb9836ba656dc3af commit r11-4598-g4d9af90d6a216822fe117337fb9836ba656dc3af Author: Christophe Lyon Date: Mon Nov 2 07:31:22 2020 +0000 arm: Avoid indirection with -mpure-code on v6m (PR96967) With -mpure-code on v6m (thumb-1), to avoid a useless indirection when building the address of a symbol, we want to consider SYMBOL_REF as a legitimate constant. This way, we build the address using a series of upper/lower relocations instead of loading the address from memory. This patch also fixes a missing "clob" conds attribute for thumb1_movsi_insn, needed because that alternative clobbers the flags. 2020-11-02 Christophe Lyon gcc/ PR target/96967 * config/arm/arm.c (thumb_legitimate_constant_p): Add support f= or disabled literal pool in thumb-1. * config/arm/thumb1.md (thumb1_movsi_symbol_ref): Remove. (*thumb1_movsi_insn): Add support for SYMBOL_REF with -mpure-co= de. gcc/testsuite PR target/96967 * gcc.target/arm/pure-code/pr96767.c: New test.=