This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch ARM] Fix PR57340


Hi,

This fixes PR target/57340 a fallout from my PR target/19599 patch. Unfortunately this didn't show up in the testing I did and I'm sorry about the breakage.

The problem here is that we choose r3 as a padding register with indirect tailcalls that could use r3 for this purpose. Ofcourse this decision is made when the frame offsets is calculated and r3 isn't in the fusage of the function. The simplest way to fix this was to check if the tailcall in this case is also an indirect tailcall. If so, we don't allow the use of r3 as a padding register. Additionally, in the prologue code we choose an alternate callee save register that is free if r3 is not available so we are free to use this instead of another callee save register.

Tested by bootstrapping armv5te and observing it pass well into stage2. Tested by bootstrapping and reg testing Thumb2 configurations with A9 where this problem was also observed on a version prior to breakages from PR57351.

Applied.

regards
Ramana



2013-05-22  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/19599
	PR target/57340
	* config/arm/arm.c (any_sibcall_uses_r3): Rename to ..
	(any_sibcall_could_use_r3): this and handle indirect calls.
	(arm_get_frame_offsets): Rename use of any_sibcall_uses_r3.

Attachment: pr57340.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]