On Wed, 23 Feb 2000, Martin Cracauer wrote:
> cc -fpic -DPIC -O -pipe -DLIBC_RCS -DSYSLIBC_RCS -I/usr/src/lib/libc/include
>-D__DBINTERFACE_PRIVATE -DINET6 -DPOSIX_MISTAKE -I/usr/src/lib/libc/../libc/locale
>-DBROKEN_DES -DYP -I/usr/obj/usr/src/i386/usr/include -c
>/usr/src/lib/libc/../libc/stdtime/localtime.c -o localtime.So
> {standard input}: Assembler messages:
> {standard input}:87: Warning: warning: unrecognized characters
> `@GOTOFF' in expression
> {standard input}:114: Warning: warning: unrecognized characters
> `@GOTOFF' in expression
> I'm not that familar with gas syntax, but it seems to be that this is
> a syntax error generated by the new gcc, that @GOTOFF must be passed
> one argument.
The syntax seems reasonable, but our version of gas doesn't support it,
and it is the result of a pessimisation. I tweaked the source code to
avoid the bad code:
diff -c2 localtime.c~ localtime.c
*** localtime.c~ Fri Jan 28 17:29:18 2000
--- localtime.c Wed Feb 23 22:51:34 2000
***************
*** 220,224 ****
settzname P((void))
{
! register struct state * const sp = lclptr;
register int i;
--- 220,224 ----
settzname P((void))
{
! register struct state * sp = lclptr;
register int i;
This seems to fix some of your prooblems.
It works as follows: when sp is declared as const, gcc decides not to
keep in a register in the default !ALL_STATE case (lclptr is &lclmem in
this case), since it can "easily" be recovered by computing the address
constant &lclmem. However, computing the constant turns out to be not
so easy in the -fpic case -- it takes an extra 8 instructions, including
a pessimization which gives the bug. (The natural and efficient way
to reload lclptr (plus an offset) is:
leal offset+lclmem@GOTOFF(%ebx),%reg
but for some reason this sometimes gets pessimized to essentially:
movl %ebx,%reg
addl offset+lclmem@GOTOFF,%reg
The last instruction is a syntax error with the current gas.)
Bruce
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message