egcs-971215/target=sh-xxx (was: build 971215 fails for sh-coff)

Ralf Corsepius corsepiu@faw.uni-ulm.de
Sat Dec 20 16:15:00 GMT 1997


I wrote:

> Building a cross compiler from egcs-971215 fails for --target=sh-coff
>
> Obviously some program generate incorrect asm-code:
>
> [..]
> /lfs/hermes/embedded/build/gcc/xgcc -B/lfs/hermes/embedded/build/gcc/
> -idirafter /lfs/hermes/embedded/build/sh-coff/newlib/targ-include
> -idirafter /lfs/hermes/embedded/src/newlib/libc/include -nostdinc -c -g
> -O2 -I. -I../../../src/libiberty/../include
> ../../../src/libiberty/cplus-dem.c
> /tmp/cca15666.s: Assembler messages:
> /tmp/cca15666.s:2890: Error: invalid operands for opcode
> /tmp/cca15666.s:3733: Error: invalid operands for opcode
> make[1]: *** [cplus-dem.o] Error 1
> make[1]: Leaving directory
> `/lfs/hermes/embedded/build/sh-coff/libiberty'
> make: *** [all-target-libiberty] Error 2
> [..]
>

This error also occurs for  sh-elf.

> Both asm-errors occur at lines containing the same asm code
> "       mov.b   @(3,r0),r3"

According to my Hitachi SH docs, this is an invalid asm-instruction.

Obviously, egcs' front-end for Hitachi'SH (AFAIK, gcc/config/sh/sh.c or
gcc/config/sh/sh.md) are buggy.

Ralf.






More information about the Gcc-bugs mailing list