mips-gcc 4.8.1 fails with Chipmunk 7.0. Works Ok with 6.2.2

Discuss new features and future development.

mips-gcc 4.8.1 fails with Chipmunk 7.0. Works Ok with 6.2.2

Postby riq » Wed Feb 04, 2015 12:33 am

This seems to be a bug in mips-linux-gnu-gcc 4.8.1 and not a bug in Chipmunk 7.0... but since I cannot upgrade the toolchain, I would like to work-around it.

Some context:

* I'm cross-compiling Chipmunk to CI20, a Linux Mips machine (http://www.elinux.org/MIPS_Creator_CI20)
* I'm using gcc-mips v4.8.1 as the cross-compiler, and I cannot upgrade it (https://sourcery.mentor.com/GNUToolchai ... cmpid=7108)
* Chipmunk v6.2.2 cross-compiles Ok
* Chipmunk v7.0.0 (github master branch from today) fails with the following error:

Code: Select all
cd /home/riq/src/Chipmunk2D/mips/src && /home/riq/MentorGraphics/Sourcery_CodeBench_Lite_for_MIPS_GNU_Linux/bin/mips-linux-gnu-gcc  -Dchipmunk_EXPORTS -std=gnu99 -O3 -DNDEBUG -ffast-math -fPIC -I/home/riq/src/Chipmunk2D/include    -o CMakeFiles/chipmunk.dir/cpPolyShape.c.o   -c /home/riq/src/Chipmunk2D/src/cpPolyShape.c
/tmp/cc3TBu8t.s: Assembler messages:
/tmp/cc3TBu8t.s:306: Error: invalid operands `movz $24,$25,$fcc0'
src/CMakeFiles/chipmunk.dir/build.make:721: recipe for target 'src/CMakeFiles/chipmunk.dir/cpPolyShape.c.o' failed


For some reason, mips-gcc doesn't like "movz...", but apparently it is a valid opcode.

The opcode seems to be in the cpPolyShapeQuery function. I posted the disassembly here:
https://gist.github.com/ricardoquesada/ ... -error-L92

any idea how to work-around it?
Thanks!
User avatar
riq
 
Posts: 37
Joined: Mon Jun 23, 2008 1:16 pm
Location: California, USA

Re: mips-gcc 4.8.1 fails with Chipmunk 7.0. Works Ok with 6.

Postby riq » Wed Feb 04, 2015 12:50 am

Ok, apparently this tiny change makes it compile:
https://github.com/slembcke/Chipmunk2D/pull/95

the "movz..." opcode is not generated and mips-gcc 4.8.1 is happy with it.
User avatar
riq
 
Posts: 37
Joined: Mon Jun 23, 2008 1:16 pm
Location: California, USA


Return to Features/Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron