jangpetter / vfpmathlibrary

Automatically exported from code.google.com/p/vfpmathlibrary
0 stars 0 forks source link

iPhone Release run Problem #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. iPhone OS 3.0 Release App . Application run error.
2. I found R0 register may be overwrite.
I read // NOTE: Lots of VFP macros overwrite register r0, therefore you have 
to make sure 
//       to include "r0" in the list of registers used, as in above example.

how can i avoid this problem?

Original issue reported on code.google.com by zhangka...@gmail.com on 10 Nov 2009 at 10:00

GoogleCodeExporter commented 9 years ago
I add volatile on variable , this problem is not appear.

Original comment by zhangka...@gmail.com on 10 Nov 2009 at 10:04

GoogleCodeExporter commented 9 years ago
oh.i solved the problem. xcode compiler for thumb off, that is ok.

Original comment by zhangka...@gmail.com on 15 Nov 2009 at 1:51

GoogleCodeExporter commented 9 years ago
I'm seeing this as well. 

In Debug builds everything works fine, but on Release builds my game has some 
odd behavior. In my case I call all my game objects update function with a 
delta 
parameter (a float indicating the time since the last call) and after call to 
one of 
the functions in the VFP library the value has changed. 

My guess is that in Release builds the compiler keeps this delta in a register 
that 
is being overwritten by the VFP lib (although I can't find a spot, then again, 
I'm 
not that familiar with ARM assembly) or is getting thrashed when switching from 
thumb 
to arm or vica versa. My bet is on the latter as compiling in ARM only mode 
(and 
defining NO_THUMB) resolves it.

Original comment by msibra...@gmail.com on 1 Apr 2010 at 3:40