[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem on porting existing c++ code to etrax



> From: "Wei, Shi Hai" <ShiHai.Wei@xxxxxxx.au>
> Date: Mon, 18 Feb 2002 15:58:44 +1100

> In file included from CopyOnWriteData.hxx:370,
>                  from Data.cpp:79:
> CopyOnWriteData.cxx: In method `int CopyOnWriteData::match (const char
> CopyOnWriteData.cxx: *, CopyOnWriteData *, bool, CopyOnWriteData)':
> CopyOnWriteData.cxx:687: warning: int format, long int arg (arg 2)
> CopyOnWriteData.cxx:687: warning: int format, long int arg (arg 4)
> /tmp/ccssjd6h.s: Assembler messages:
> /tmp/ccssjd6h.s:12678: Error: Unknown opcode: `lock'
> /tmp/ccssjd6h.s:12716: Error: Unknown opcode: `lock'
> /tmp/ccssjd6h.s:13181: Error: Unknown opcode: `lock'

It seems there's some i386 assembly code in that file: I
recognize "lock" as such.  There's no CRIS instruction by that
name.

> make: *** [Data.o] Error 1
> 
> When I use '-S' option to compile there isn't any problem, but I believe
> that is because default assembler 'as' is used, because 'nm-cris' doesn't
> recognise the result binary file format.

No, it's because -S means "compile to assembly code, but don't
assemble it".

> Anyone knows why this happened, and how to fix it?

Look into why i386 assembly code is used there.  I guess you'll
have to replace it with the corresponding CRIS code for a
claiming a mutex.

brgds, H-P