From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7972 invoked by alias); 7 Jun 2011 07:33:27 -0000 Received: (qmail 7962 invoked by uid 22791); 7 Jun 2011 07:33:26 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jun 2011 07:33:10 +0000 From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/49169] ARM: optimisations strip the Thumb/ARM mode bit off function pointers X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 07 Jun 2011 07:33:00 -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 X-SW-Source: 2011-06/txt/msg00503.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49169 rsandifo@gcc.gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rsandifo at gcc dot gnu.org --- Comment #4 from rsandifo at gcc dot gnu.org 2011-06-07 07:32:37 UTC --- (In reply to comment #3) > Btw, we finally should introduce a target hook for this I think. Thanks for the patch in comment #2. How strongly do you feel about the hook though? In PR35705, it sounded like a lot of targets actually need an opt-out for functions, either because of ISA encoding (ARM, MIPS, SH) or because of function descriptors (IA-64, PA, PPC). I notice that ARM and mcore also have optimisation-dependent FUNCTION_BOUNDARYs. Arguably (very arguably) that's a bug, and they should be using align_functions instead. But if we make a deliberate decision to honour DECL_ALIGN on functions, then FUNCTION_BOUNDARY really will be an ABI property. I'm just worried that the combination of that and the need to identify exactly which targets should define the hook might be more hassle than the optimisation is worth. You said in that bug that masking function addresses isn't likely to be a common operation, and TBH, I still agree. Richard