This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

meet problem when building uCOSII with gcc-h8s ported version


hi, all

Recently i am doing some work for porting uCOSII to our hardware target platform, it is a MCU with Hitachi H8 series cpu, and the toolchain i used is gnuh8v0501-elf.
In the os_cpu.h file, there defines some macroes such as enable/disable interrupt, soft-interrupt, following some code script:


   #define  OS_ENTER_CRITICAL()  {asm("stc ccr,@-er7"); \
                                  asm("orc.b #0xC0,ccr");}
   #define  OS_EXIT_CRITICAL()    asm("ldc  @er7+,ccr");

#define OS_TASK_SW() asm("trapa #3")

while compiling this file, some warning and error jumped out:
/usr/share/gnuh8_v0501_elf-1/bin/h8300-elf-gcc -o os_core.o -c os_core.c
/tmp/cch4BBsa.s: Assembler messages:
/tmp/cch4BBsa.s:287: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:287: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:287: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:287: Error: invalid operands
/tmp/cch4BBsa.s:294: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:294: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:294: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:294: Error: invalid operands
/tmp/cch4BBsa.s:307: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:307: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:307: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:307: Error: invalid operands
/tmp/cch4BBsa.s:327: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:327: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:327: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:327: Error: invalid operands
/tmp/cch4BBsa.s:345: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:345: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:345: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:345: Error: invalid operands
/tmp/cch4BBsa.s:371: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:371: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:371: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:371: Error: invalid operands
/tmp/cch4BBsa.s:378: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:378: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:378: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:378: Error: invalid operands
/tmp/cch4BBsa.s:389: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:389: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:389: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:389: Error: invalid operands
/tmp/cch4BBsa.s:407: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:407: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:407: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:407: Error: invalid operands
/tmp/cch4BBsa.s:422: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:422: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:422: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:422: Error: invalid operands
/tmp/cch4BBsa.s:436: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:436: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:436: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:436: Error: invalid operands
/tmp/cch4BBsa.s:496: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:496: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:496: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:496: Error: invalid operands
/tmp/cch4BBsa.s:565: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:565: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:565: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:565: Error: invalid operands
/tmp/cch4BBsa.s:581: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:581: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:581: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:581: Error: invalid operands
/tmp/cch4BBsa.s:592: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:592: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:592: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:592: Error: invalid operands
/tmp/cch4BBsa.s:607: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:607: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:607: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:607: Error: invalid operands
/tmp/cch4BBsa.s:623: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:623: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:623: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:623: Error: invalid operands
/tmp/cch4BBsa.s:629: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:629: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:629: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:629: Error: invalid operands
/tmp/cch4BBsa.s:634: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:634: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:634: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:634: Error: invalid operands
/tmp/cch4BBsa.s:639: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:639: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:639: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:639: Error: invalid operands
/tmp/cch4BBsa.s:697: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:697: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:697: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:697: Error: invalid operands
/tmp/cch4BBsa.s:705: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:705: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:705: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:705: Error: invalid operands
/tmp/cch4BBsa.s:710: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:710: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:710: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:710: Error: invalid operands
/tmp/cch4BBsa.s:720: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:720: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:720: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:720: Error: invalid operands
/tmp/cch4BBsa.s:734: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:734: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:734: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:734: Error: invalid operands
/tmp/cch4BBsa.s:746: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:746: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:746: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:746: Error: invalid operands
/tmp/cch4BBsa.s:809: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:809: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:809: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:809: Error: invalid operands
/tmp/cch4BBsa.s:883: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:883: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:883: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:883: Error: invalid operands
/tmp/cch4BBsa.s:1611: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:1611: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:1611: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:1611: Error: invalid operands
/tmp/cch4BBsa.s:1671: Warning: Opcode `trapa' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:1671: Error: invalid operands
/tmp/cch4BBsa.s:1675: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:1675: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:1675: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:1675: Error: invalid operands
/tmp/cch4BBsa.s:1769: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:1769: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:1769: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:1769: Error: invalid operands
/tmp/cch4BBsa.s:1781: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:1781: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:1781: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:1781: Error: invalid operands
/tmp/cch4BBsa.s:1814: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:1814: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:1814: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:1814: Error: invalid operands
/tmp/cch4BBsa.s:1830: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:1830: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:1830: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:1830: Error: invalid operands
/tmp/cch4BBsa.s:1953: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:1953: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:1953: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:1953: Error: invalid operands
/tmp/cch4BBsa.s:1967: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:1967: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:1967: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:1967: Error: invalid operands
/tmp/cch4BBsa.s:2069: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:2069: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:2069: Warning: Opcode `stc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:2069: Error: invalid operands
/tmp/cch4BBsa.s:2114: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:2114: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:2114: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:2114: Error: invalid operands
/tmp/cch4BBsa.s:2121: Warning: Reg not valid for H8/300
/tmp/cch4BBsa.s:2121: Error: Wrong size pointer register for architecture.
/tmp/cch4BBsa.s:2121: Warning: Opcode `ldc' with these operand types not available in H8/300 mode
/tmp/cch4BBsa.s:2121: Error: invalid operands
make: *** [os_core.o] Error 1


noteworthily asm("orc.b #0xC0,ccr") has no problem when compile.
it seems that some embeded scripts can't be recognized by gcc....is it the gcc's problem? or the code is wrong? or other reason??


_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]