public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernd Schmidt <bernds@codesourcery.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Problem with ARM longcalls
Date: Thu, 14 Apr 2011 12:43:00 -0000	[thread overview]
Message-ID: <4DA6EB5A.8010606@codesourcery.com> (raw)
In-Reply-To: <4D8A15E2.5020005@codesourcery.com>

Ping.  Contains only changes outside config/arm.

http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01509.html


Bernd

On 03/23/2011 04:46 PM, Bernd Schmidt wrote:
> I've discovered a problem with -mlong-calls on ARM. The bug was first
> reported against a new target, but I'd copied the relevant code from the
> ARM backend.
> 
> We use current_function_section in arm_is_long_call_p to decide whether
> we're calling something that goes into the same section. The problem
> with this is that current_function_section can only be used during
> final, since it relies on the global variable in_cold_section_p which is
> set up only in assemble_start_function. On ARM, this problem manifests
> as short-calls when a long-call would be required; in the other port it
> was an "insn doesn't satisfy its constraints" error.
> 
> The following patch is against 4.5, since the problem appears hidden in
> mainline (the initialization of first_function_block_is_cold has
> changed). Ok for trunk and branches after arm-linux tests complete?

> 	* function.c (init_function_start): Call decide_function_section.
> 	* varasm.c (decide_function_section): New function.
> 	(assemble_start_function): When not using
> 	flag_reorder_blocks_and_partition, don't compute in_cold_section_p
> 	or first_function_block_is_cold.
> 	* rtl.h (decide_function_section): Declare.
> 
> 	* gcc.target/arm/cold-lc.c: New test.

  parent reply	other threads:[~2011-04-14 12:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23 15:47 Bernd Schmidt
2011-03-24 14:24 ` Richard Earnshaw
2011-03-24 14:28   ` Bernd Schmidt
2011-04-14 12:43 ` Bernd Schmidt [this message]
2011-04-14 13:00   ` Richard Guenther
2011-05-03 13:10     ` Bernd Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DA6EB5A.8010606@codesourcery.com \
    --to=bernds@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).