target/2396

Ted Merrill ted@arraycomm.com
Tue Mar 27 14:06:00 GMT 2001


The following reply was made to PR target/2396; it has been noted by GNATS.

From: Ted Merrill <ted@arraycomm.com>
To: rearnsha@gcc.gnu.org
Cc: gcc-gnats@gcc.gnu.org, Ted Merrill <ted@arraycomm.com>
Subject: Re: target/2396
Date: Tue, 27 Mar 2001 13:54:43 -0800 (PST)

 Preliminary indication is that the patch has fixed the problem, although
 in a non-optimal way. More testing might reveal other problems(?).
 Essentially it has added an (unnecessary) push {lr} at the beginning and 
 replaced the bx{lr} with a pop {pc} at the end, so now the access to [sp,#4]
 is correct.
 The simple case:
     int foo(int a0,int a1,int a2, int a3, int a4) { return a4; }
 is unchanged: it still compiles correctly and optimally as:
     ldr r0,[sp]
     bx lr
 Unfortunately, most of our small leaf subroutines involve at least one
 conditional, which generates pretty non-optimal code (but at least
 it is correct now, with the patch, and is more optimal than
 using -fno-omit-frame-pointer).
 
 Thanks 
 Ted Merrill
 
 
 On 27 Mar 2001 rearnsha@gcc.gnu.org wrote:
 
 > Synopsis: ARM/thumb 5th function argument access problem
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: rearnsha
 > State-Changed-When: Tue Mar 27 04:19:28 2001
 > State-Changed-Why:
 >     I don't currently have a build of that target, but looking
 >     at the source and comparing it with the latest version (which
 >     is correct, but so different that it is difficult to back-port th
 >     change) it is fairly clear what the problem is.
 >     
 >     Can you please try the attached patch.  Sorry, since I don't
 >     have a build for that target, I can't test it myself at this time.
 > 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2396&database=gcc
 > 
 



More information about the Gcc-prs mailing list