This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Failed cross: Alpha->ARM
- To: egcs at cygnus dot com
- Subject: Failed cross: Alpha->ARM
- From: Dave Gilbert <gilbertd at treblig dot org>
- Date: Mon, 15 Dec 1997 21:38:19 +0000 (GMT)
- Reply-To: egcs at cygnus dot com
Hi,
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.
----------------------------------------------------
Example source file:
typedef struct {
int a[10];
} foo;
foo* x;
static foo y[128];
int a() {
do {
} while (x < y + 128-1);
};
---------------------------------------------------------------
Duff output:
rfp .req r9
sl .req r10
fp .req r11
ip .req r12
sp .req r13
lr .req r14
pc .req r15
@ GNU C version egcs-2.91.02 971206 (gcc-2.8.0) (arm-unknown-linuxaout) compiled by GNU C version 2.7.2.3.
@ options passed:
@ options enabled: -fpeephole -ffunction-cse -fkeep-static-consts
@ -freg-struct-return -fsjlj-exceptions -fcommon -fverbose-asm -fgnu-linker
@ -fargument-alias
gcc2_compiled.:
___gnu_compiled_c:
.text
.align 0
.global _a
_a:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, current_function_anonymous_args = 0
mov ip, sp
stmfd sp!, {fp, ip, lr, pc}
sub fp, ip, #4
mov r0, r0 @ nop
L2:
L4:
ldr r3, L6
ldr r2, [r3, #0]
ldr r3, L6+4
cmp r2, r3
bcc L5
b L3
L5:
b L4
L7:
.align 0
L6:
.word _x
.word _y+4294972376 < Bzzt!!!!!!!!!!
L3:
L1:
ldmea fp, {fp, sp, pc}^
.comm _x, 4 @ 4
.bss
.align 0
_y:
.space 5120
Dave
* NOTE: I have had mail problems over the last few days - things may *
* have bounced *
---------------------------------------------------- Man can not live -
David Alan Gilbert - gro.gilbert @ treblig.org ---- by bread alone. He
---------------------------------------------------- needs chocolate. -