Well, moving that global array into a resource (which I then copy into a malloc()ed block of memory during initialisation) seems to have solved the problem. ARMlet's working very nicely -- the worst-case situation which used to take ~20 seconds to calculate under emulation on my T3 is now calculating in under 2 seconds. With some basic optimisation so that the data's stored on correct boundaries and in the correct endianness so that I'm not constantly converting it, I suspect I could improve that even further.. but honestly, 2 seconds is far better than I was even hoping for.
So there you have it. Can't access 68K global data from an ARMlet, even if you pass in a pointer to that global data. Should have guessed, I suppose! :) Trevor Powell > I've been writing an ARMlet to take care of a maths-intensive portion of a > program I've been working on -- on ARM processors, it is run instead of > the native 68k version. > > I have the whole thing working correctly, except for one little piece. > > The original code takes the result of its fairly sizable calculation, and > then uses that value as a lookup into a very large table which is compiled > into the 68k-side of the program as a global array. A pointer to that > array is included as part of the structure passed to my ARMlet. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
