Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Joseph Francis
Fri, 08 Jan 1993 18:23
semiserious Bug in gcc-2.X for i860 target
Author: Joseph Francis
Date: Fri, 08 Jan 1993 18:23
Date: Fri, 08 Jan 1993 18:23
77 lines
1884 bytes
1884 bytes
The following code:
:::
#define MAXARG 15
void nullfn();
static char *a = "test";
static double b[MAXARG];
foo()
{
nullfn( b[0]);
}
:::
compiles to
:::
.file "m_mess.c"
gcc2_compiled.:
.text
.LC0:
.ascii "test\0"
.data
.align 4
_a:
.long .LC0
.text
.align 8
.align 4
.long .ep._foo-_foo+0xc8000000
.globl _foo
_foo:
addu -16,sp,sp
st.l fp,0(sp)
addu 0,sp,fp
st.l r15,8(fp)
st.l r1,4(fp)
.ep._foo:
shl r0,r28,r15
shl r0,sp,r30
orh ha%_b,r0,r31
fld.d l%_b(r31),f8
call _nullfn
nop
.L1:
ld.l 8(fp),r15
adds 16,fp,r31
ld.l 4(fp),r1
ld.l 0(fp),fp
bri r1
mov r31,sp
.data
.align 4
_b:
.set .,.+128
;;;
this will produce the following error by gas-1.38 when compiled:
test.c:unknown: 16-bit immediate 8-byte alignment error: 0x00000054
My configuration is:
host=m68k-next-bsd target=i860-unknown-sysv3 build=m68k-next-bsd
gcc-2.2.2, 2.3.1 (same problem, both systems, and probably for 2.3.3 also)
The problem is of course that the double needs to be 8-byte aligned,
and gcc isn't doing that. If anyone has seen this, can they notify
me of a fix before I delve into the compiler? It would be a great
help. Definitely a naughty bug, but can be gotten around.
--
| Le Jojo: Fresh 'n' Clean, speaking out to the way you want to live
| today; American - All American; doing, a bit so, and even more so.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads