From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79387 invoked by alias); 20 Jul 2015 12:58:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 79327 invoked by uid 48); 20 Jul 2015 12:58:42 -0000 From: "wdijkstr at arm dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/63304] Aarch64 pc-relative load offset out of range Date: Mon, 20 Jul 2015 12:58:00 -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: 5.0 X-Bugzilla-Keywords: assemble-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: wdijkstr at arm dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P5 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg01719.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63304 Wilco changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wdijkstr at arm dot com --- Comment #17 from Wilco --- Well there seem to be 2 ways to address this: * If a function is huge, emit literals as const data. This enables the use of anchors and sharing of literals across all functions in a compilation unit. * Reserve a register in the adr/ldr literal patterns and add a 2-instruction sequence using adrp when out of range. Ideally the register should only be reserved if a function is huge.