Subject: Re: egcs-1.1.1 complains about -mcpu=ev56
To: Bill Dorsey <dorsey@lila.com>
From: Andreas Johansson <ajo@wopr.campus.luth.se>
List: port-alpha
Date: 03/11/2000 11:37:12
On Sat, 11 Mar 2000, Bill Dorsey wrote:

> Apologies if this has already been reported, but...
> 
> I was experimenting with compiler optimizations on my Miata (21164A)
> and decided it would be worth turning on the byte-word extensions.
> According to the documentation, there is a -mcpu= flag that defaults
> to ev4, but can be set to ev5 (21164), ev56 (21164A), or ev6.  The
> only difference between ev5 and ev56 is with ev56 the byte-word
> extensions are used.
> 
> When I tell egcs to compile with -mcpu=ev56, the compiler succeessfully
> compiles the code but then the assembler chokes:
> 
> /tmp/cc6VQu7P.s: Assembler messages:
> /tmp/cc6VQu7P.s:148: Error: macro requires $at register while no at in
> effect
> ...

You must tell the assembler that it should produce code for your cpu as
well. I agree, the compiler should really do this automatically...

ajo@ymer ~/src/test >gcc -O2 -o bytecopy bytecopy.c 
ajo@ymer ~/src/test >time ./bytecopy 
2.022u 0.012s 0:02.16 93.9%     0+0k 0+0io 1pf+0w

ajo@ymer ~/src/test >gcc -mcpu=21164a -Wa,-m21164a -O2 -o bytecopy bytecopy.c
ajo@ymer ~/src/test >time ./bytecopy
0.998u 0.014s 0:01.07 93.4%     0+0k 0+0io 1pf+0w

> This is with egcs-1.1.1 release (egcs/gcc 2.91.60).  I can't compile a
> newer egcs from pkgsrc because it won't build on the Alpha.  I also
> tried getting gcc 2.95.2 (the latest snapshot) from Cygnus but although
> it seems to configure itself for netbsd-unknown-alpha OK, the compiler
> fails during the stage2 bootstrap process.
> 
> Anyone else run into this?

Yes :)

> - Bill Dorsey

/Andreas