hi, all I am porting android to loongson2f, I git code from developer.mips.com/ android, code branch is mips-froyo-r8, and by following the LoneStar's blog:http://blog.chinaunix.net/space.php?uid=13327410 After some preparing jobs, i typed make showcommands, at the beginning, every thing is fine, but when the compile system compile the EDL library, the system report errors like this: "/tmp/ccpURw1e.s: 1233: Error: opcode not supported on this processor: mips32r2 (mips32r2) `mult.g $0,$24,$15'" ,at which time, the frameworks/base/ opengl/libagl/light.cpp file was being compiled, and corresponding compile command is:
prebuilt/linux-x86/ccache/ccache prebuilt/linux-x86/toolchain/ mips-4.4.3/bin/mips-linux-gnu-gcc -I bionic/libc/private -I frameworks/base/opengl/libagl -I out/target/product/generic/obj/ SHARED_LIBRARIES/libGLES_android_intermediates -I dalvik/ libnativehelper/include/nativehelper -I system/core/include -I hardware/libhardware/include -I hardware/libhardware_legacy/ include -I hardware/ril/include -I dalvik/libnativehelper/ include -I frameworks/base/include -I frameworks/base/opengl/ include -I external/skia/include -I out/target/product/generic/obj/ include -I bionic/libc/arch-mips/include -I bionic/libc/include - I bionic/libstdc++/include -I bionic/libc/kernel/common -I bionic/ libc/kernel/arch-mips -I bionic/libm/include -I bionic/libm/ include/arch/mips -I bionic/libthread_db/include -c -fno- exceptions -Wno-multichar -Ulinux -U__unix -U__unix__ -fpic -ffunction- sections -funwind-tables -EL -march=loongson2f -mtune=loongson2f - mabi=32 -msoft-float -include system/core/include/arch/linux-mips/ AndroidConfig.h -I system/core/include/arch/linux-mips/ -DANDROID - fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith - Werror=return-type -Werror=non-virtual-dtor -Werror=address - Werror=sequence-point -DNDEBUG -g -Wstrict-aliasing=2 -finline- functions -fno-inline-functions-called-once -frerun-cse-after-loop - frename-registers -DNDEBUG -UDEBUG -fvisibility-inlines-hidden -fno- use-cxa-atexit -DANDROID -fmessage-length=0 -W -Wall -Wno-unused - Winit-self -Wpointer-arith -Wsign-promo -Werror=return-type - Werror=non-virtual-dtor -Werror=address -Werror=sequence-point - DNDEBUG -UDEBUG -O2 -g -fgcse-after-reload -fomit-frame-pointer -fno- strict-aliasing -funswitch-loops -finline-limit=300 -fno-rtti - DLOG_TAG=\"libagl\" -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES - fvisibility=hidden -fstrict-aliasing -mno-check-zero-division - DLIBAGL_USE_GRALLOC_COPYBITS -MD -o out/target/product/ general/...... frameworks/base/opengl/libagl/light.cpp by adding a -S option, I transfer the rameworks/base/opengl/libagl/ light.cpp into a assembler file light.s and found that "multu.g" instruct indeed there. So in order to test if the assembler can identify the "multu.g" instruction or not, I write a very simple file that contain "multu.g" and use the following command compile it: andy@ubuntu:~/work/mips_android_r8$ prebuilt/linux-x86/toolchain/ mips-4.4.3/bin/mips-linux-gnu-gcc test.s -c -march=loongson2f andy@ubuntu:~/work/mips_android_r8$ prebuilt/linux-x86/toolchain/ mips-4.4.3/bin/mips-linux-gnu-gcc test.s -c -march=mips32r2 test.s: Assembler messages: test.s:12: Error: opcode not supported on this processor: mips32r2 (mips32r2) `mult.g $0,$24,$15' test.s:13: Error: opcode not supported on this processor: mips32r2 (mips32r2) `multu.g $0,$24,$15' test.s:14: Error: opcode not supported on this processor: mips32r2 (mips32r2) `modu.g $0,$24,$15' as you can see from the above result that as can identify multu.g as a loongson2f instruction but not a mips32r2 instruction. at last, I compile the light.s which was transformed from the light.cpp, the compile command as follows: andy@ubuntu:~/work/mips_android_r8$ prebuilt/linux-x86/toolchain/ mips-4.4.3/bin/mips-linux-gnu-gcc light.s -c -v -march=loongson2f and the result is : Using built-in specs. Target: mips-linux-gnu Configured with: /home/fu/dev/gcc44/gcc/configure --target=mips-linux- gnu --prefix=/home/fu/dev/gcc44/build-linux/tools --with-sysroot=/home/ fu/dev/gcc44/build-linux/sysroot --enable-__cxa_atexit --disable- libssp --disable-libgomp --disable-libmudflap --enable-languages=c,c++ --with-mpfr=/home/fu/bin --with-gmp=/home/fu/bin --with-llsc --disable- decimal-float --disable-fixed-point --with-mips-plt --with- arch=mips32r2 Thread model: posix gcc version 4.4.3 20100121 (prerelease) [gcc-4_4-branch revision 156102] (GCC) COLLECT_GCC_OPTIONS='-c' '-v' '-march=loongson2f' '-mllsc' '-mplt' '- mno-shared' /home/andy/work/mips_android_r8/prebuilt/linux-x86/toolchain/ mips-4.4.3/bin/../lib/gcc/mips-linux-gnu/4.4.3/../../../../mips-linux- gnu/bin/as -EB -no-mdebug -mabi=32 -march=loongson2f -mno-shared -v - call_nonpic -o light.o light.s GNU assembler version 2.20.51 (mips-linux-gnu) using BFD version (GNU Binutils) 2.20.51.20100120 light.s: Assembler messages: light.s:2452: Error: opcode not supported on this processor: mips32r2 (mips32r2) `multu.g $2,$7,$2' light.s:2456: Error: opcode not supported on this processor: mips32r2 (mips32r2) `multu.g $9,$4,$3' light.s:2458: Error: opcode not supported on this processor: mips32r2 (mips32r2) `multu.g $24,$10,$6' light.s:2627: Error: opcode not supported on this processor: mips32r2 (mips32r2) `multu.g $24,$3,$3' light.s:2633: Error: opcode not supported on this processor: mips32r2 (mips32r2) `multu.g $31,$6,$6' light.s:2634: Error: opcode not supported on this processor: mips32r2 (mips32r2) `multu.g $15,$2,$2' light.s:3968: Error: opcode not supported on this processor: mips32r2 (mips32r2) `multu.g $9,$11,$10' light.s:5033: Error: opcode not supported on this processor: mips32r2 (mips32r2) `multu.g $3,$14,$7' light.s:5134: Error: opcode not supported on this processor: mips32r2 (mips32r2) `multu.g $13,$25,$24' light.s:5179: Error: opcode not supported on this processor: mips32r2 (mips32r2) `multu.g $12,$4,$5' light.s:5940: Error: opcode not supported on this processor: mips32r2 (mips32r2) `multu.g $8,$10,$9' the assembler just can not identify the multu.g instruction. why the same assembler with the same march option can identify the multu.g instruct in one file but can not in another file, did any one knows the reason, it's so strange! -- You received this message because you are subscribed to the Google Groups "loongson-dev" group. To post to this group, send email to loongson-dev@googlegroups.com. To unsubscribe from this group, send email to loongson-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/loongson-dev?hl=en.