[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] gcc-4.2.2-mint-20080127



Alan Hourihane wrote:
> ../mintlib/linea.c: In function 'lineac':
> ../mintlib/linea.c:176: error: %a6 cannot be used in asm here
>
> This is because -fomit-frame-pointer is not being used, I guess before,
> it was implicit.

It is used explicitly in the MiNTLib Makefile.
I put a workaround in the build script.

Basically, it just removes -fomit-frame-pointer and a6 in the clobber list.

# Workaround for the bug on FPU register restore in GCC 4.2.2
sed -i "s:^CFLAGS=-O2 -fomit-frame-pointer$:CFLAGS=-O2:g" configvars
sed -i 's:"a2", "a6" /\* clobbered regs \*/:"a2" /\* clobbered regs \*/:g' mintlib/linea.c

I had a quick look in the Line A implementation in TOS 1.62.
a6 is not backuped at the beginning, unlike other registers.
But it seems to be backuped specifically afterwards when it is necessary.

Clearly, further investigation is necessary to determine what should really go into the clobber list.

--
Vincent Rivière