[superh-gnu-discuss] Problem with SuperH inline assembly

N. Coesel nico at nctdev.nl
Thu May 28 17:23:07 UTC 2009


At 12:37 28-5-2009 +0900, Paul Mundt wrote:
>On Wed, May 27, 2009 at 10:04:16PM +0200, N. Coesel wrote:
>> I'm evaluating the SuperH package and I ran into a problem when using
>> inline assembly.
>> 
>> I'm trying to compile the attached test.c (a small dummy program to
>> reproduce the problem) but I get the an unknown opcode error on the inline
>> assembly. I tried changing the isa and architecture but this has no effect.
>> 
>> C:\software\H8 gcc>sh-linux-gnu-gcc -Wa,-ahld -m2 test.c >test.lst
>> C:\DOCUME~1\nctnico\LOCALS~1\Temp\ccohSo3P.s: Assembler messages:
>> C:\DOCUME~1\nctnico\LOCALS~1\Temp\ccohSo3P.s:14: Error: unknown opcode
>> C:\DOCUME~1\nctnico\LOCALS~1\Temp\ccohSo3P.s:17: Error: unknown opcode
>> 
>> I also attached the assembler listing. I also have some assembler files
>> which have been assembled using an older version of as. These won't
>> assemble either. The .h8300s directive as described in the manual is also
>> not recognized. I guess the assembler is not complete.
>> 
>You are attempting to use H8300 assembly on SuperH, of course this will
>not work, they are completely different architectures. Try your test case
>with an H8 toolchain.

Thanks for looking into it. The target I use has an H8S cpu. I realize now
that the 'S' doesn't stand for SuperH. Sorry for the confusion. It has been
several years since I have been using the Renesas chips.

Nico Coesel




More information about the superh-gnu-discuss mailing list