randy@UOKMAX.ECN.UOKNOR.EDU (Longshot) (01/24/90)
We are suddenly having problems with gcc. It was generating code that died
horribly when passed to as. We are running an Encore Multimax, with BSD4.3.
I tried to put together gnu-as, but it died even harder. Has it been tested
on a Multimax? It could handle almost nothing the the files. The alignment
maximum was set to 15 in read.c, when Encore's cc habitually generates
".align 16". Plus, it died on lines of the form ".dss <arglist>". So, for
laughs, I tried gcc -c append.c (from the gas distribution):
(The manifest is, of course, before this.)
/* JF: This is silly. Why not stuff this in some other file? */
#ifdef USG
#define bcopy(from,to,n) memcpy(to,from,n)
#endif
void
append (charPP, fromP, length)
char **charPP;
char *fromP;
unsigned long length;
{
if (length) { /* Don't trust bcopy() of 0 chars. */
bcopy (fromP, * charPP,(int) length);
*charPP += length;
}
}
/* end: append.c */
{ uokmax:~ 1 } gcc -c append.c
Assembler: append.c
aline 7 : illegal displacement field
aline 20 : illegal displacement field
And the actual code, as generated by gcc -S append.c:
.file "append.c"
gcc_compiled.:
.text
.align 16
.globl _append
_append:
enter [],0 # line 7
cmpqd $0,16(fp)
beq .L2
movd 16(fp),tos
movd 0(8(fp)),tos
movd 12(fp),tos
bsr ?_bcopy
movd 8(fp),r0
addd 16(fp),0(r0)
adjspb $-12
.L2:
.L1:
exit []
ret 0 # line 20
Randy
--
Randy J. Ray University of Oklahoma, Norman Campus (405)/325-5370
!chinet!uokmax!randy randy@uokmax.uucp randy@uokmax.ecn.uoknor.edu
"...and he who made kittens put snakes in the grass..." -- Jethro Tull
-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*-=*