home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.gcc.bug
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ircam.FR!Joseph.FRancis
- From: Joseph.FRancis@ircam.FR (Joseph Francis)
- Subject: semiserious Bug in gcc-2.X for i860 target
- Message-ID: <1993Jan8.182314.20787@ircam.fr>
- Sender: gnulists@ai.mit.edu
- Organization: IRCAM, Paris (France)
- Distribution: gnu
- Date: Fri, 8 Jan 1993 18:23:14 GMT
- Approved: bug-gcc@prep.ai.mit.edu
- Lines: 78
-
- 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.
-
-