Paul Koning wrote:
"Falk" == Falk Hueffner <[EMAIL PROTECTED]> writes:


 >> $ alpha-unknown-linux-gnu-gcc -fno-common -ffreestanding -O2 \
 >> -mno-fp-regs -ffixed-8 -msmall-data -mcpu=ev5 -Wa,-mev6 -c
 >> core_cia.i

 Falk> I don't see any fault on gcc's side here. You could argue that
 Falk> the command line option for as should override the ".arch", but
 Falk> I think it's been like this forever. So you should probably
 Falk> just add ".arch ev6" inside the asm (annoyingly, gas doesn't
 Falk> seem to have ".arch any" or similar).

More appropriate would be to make the command line consistent with the
code.  If there's inline assembly that requires ev6, then -mcpu=ev6 is
appropriate.  Conversely, if the code really is supposed to run on an
ev5, then -Wa,mev5 is the right fix and the inline assembly should
stick to instructions that exist on that machine.

The code is in linux-2.6.*/asm-alpha/compiler.h.
Inspection shows that the code really is supposed to run on an ev5;
it uses the LDBU in inline assembly and expects the
assembler to expand that to something that can run on ev4,
which should work according to
http://msdn.microsoft.com/library/en-us/aralpha98/html/load_byte_unsigned_ldbu.asp
The problem is then the -Wa,-mev6.  And voila, linux-2.6.*/arch/alpha/Makefile
seems to add that unconditionally:

# For TSUNAMI, we must have the assembler not emulate our instructions.
# The same is true for IRONGATE, POLARIS, PYXIS.
# BWX is most important, but we don't really want any emulation ever.
CFLAGS += $(cflags-y) -Wa,-mev6

I'll punt this to the alpha linux kernel folks.

Thanks for the help!
- Dan

--
Trying to get a job as a c++ developer?  See 
http://kegel.com/academy/getting-hired.html

Reply via email to