Hi experts,

I am porting an application to Vxworks from Linux. There are several
inline assembly code in my application that cause this compiling error.
If I used switch "-mips4", then I was able to compile the code but I
couldn't run it under the existing vxworks because it doesn't support
that instruction set. Since it is not easy to change vxworks, Any other
suggestions to solve this problem?

1) The CPU is MIPS32 4KEc.

2) the code in myapp.cpp is

__asm__ __volatile__("pref 6, 0(%0)" : : "r" (pCurrentPixel));

3) It can be compiled by gcc under linux. version is gcc-3.3.1

4) It can't be compiled by ccmips for vxworks, the version is "gcc
version gcc-2.96 19990621 vxworks 5.4". I also tried "-mips2", same
error. The compiling log is

ccmips -G 0 -mno-branch-likely -mips32 -EL -fno-builtin -DMIPSEL
-DSOFT_FLOAT -msoft-float
-IC:\Tornado212\target\h\ -DCPU=MIPS32 -DTOOL_FAMILY=g
nu -DTOOL=sfgnule -O2 -Wno-parentheses -mno-abicalls -fno-pic
-fno-strict-aliasing -pipe -
Wno-strict-prototypes -fomit-frame-pointer -mlong-calls
-fno-strength-reduce -c myapp.cpp
{standard input}: Assembler messages:
{standard input}:11951: Error: opcode requires -mips4 or greater `pref'
make: *** [dintsera.o] Error 0x1

Best Regards,



Bernard