This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Failed cross: Alpha->ARM
- To: egcs at cygnus dot com
- Subject: Re: Failed cross: Alpha->ARM
- From: Stephen Williams <steve at icarus dot icarus dot com>
- Date: Mon, 15 Dec 1997 21:00:06 -0800
- Reply-To: egcs at cygnus dot com
Host: Alpha Linux RedHat 5.0
Target: ARM Linux
Problem: Constant greater than 2^32 generated in assembler file
Suspected cause: Converting a -1 to 2^32 and then propogating the value.
Try this patch. (In spite of the name, it does apply to the egcs-1.0
sources.) As I understand it, it does indeed mess up detecting if the
constant that is can load in a simple instruction or requires more
complex handling. Here is a ChangeLog and the patch itself.
Mon Oct 20 08:49:16 1997 Stephen Williams <steve@icarus.com>
* gcc/config/arm/arm.c: Fixed problem with 64bit hosts generating
bogus assembler for long long constants.
diff --exclude=*~ --exclude=*.orig --exclude=testsuite -Npcr
egcs-971023/gcc/config/arm/arm.c ../egcs-971023/gcc/config/arm/arm.c
*** egcs-971023/gcc/config/arm/arm.c Mon Aug 11 08:57:24 1997
--- ../egcs-971023/gcc/config/arm/arm.c Mon Oct 27 20:38:41 1997
*************** const_ok_for_arm (i)
*** 407,412 ****
--- 407,415 ----
{
unsigned HOST_WIDE_INT mask = ~0xFF;
+ if (i & ~(unsigned HOST_WIDE_INT) 0xffffffff)
+ return FALSE;
+
/* Fast return for 0 and powers of 2 */
if ((i & (i - 1)) == 0)
return TRUE;
--
Steve Williams
steve@icarus.com
steve@picturel.com
"The woods are lovely, dark and deep. But I have promises to keep,
And lines to code before I sleep, And lines to code before I sleep."