bad instruction: swp r1, r3, [r2]
I encountered this error while porting our engine over to boost 1.36 and luabind 0.7.1 rc1. Compiling for the iphone brought this up on all of the boost cpp files and all of our lua wrapper implementations. The reason? ARM cpus understand regular 32bit code and a 16bit “thumb” variant. iPhone SDK projects default to thumb code generation. Do a “Get Info” on your device target, look at the “Build” tab and search for thumb theres your switch! Now, thumb code seems to omit a few instructions, swp being one of them. Turning thumb code generation off for all involved projects seemed to cure this just fine.
See also this thread on boost-dev and this entry at iCocoa.
I’m probably missing some additional details, but it seems to work for now.
1 comment
Jump to comment form | comments rss [?] | trackback uri [?]