#113825 - kusma - Sun Dec 31, 2006 1:53 am
Hi there, I've been debugging this one issue almost all day long, and I'm finally getting somewhere. The problem I have is CpuFastSet not working properly (or rather not working at all) in some cases when inlined into a function. I've made a small test-application, and put it up here:
http://pimpmobile.kjip.no/temp/volatile_buffer.zip
This illustrates the problem. With a word count that is not a multiple of eight, everything seems to go fine, but as soon as I try to clear a multiple of eight words, everything goes poo.
Now, try playing around with the flags INLINE_FJALL, INLINE_CLEAR_BUFFER and VOLATILE_BUFFER and see what happens. The conclusions I managed to make was that with full inlining everything goes fine with or without volatile. With full inlining and no volatile, only one element gets corrupted when doing 16 words. With 15 all is fine. with volatile, everything is fine.
What amazes me, is the fact that volatile changes anything at all. This is global memory, no restricts or consts or anything to mess with guarantees. Any function should at any time be able to change that memory.
Does anybody have any ideas about this one?
http://pimpmobile.kjip.no/temp/volatile_buffer.zip
This illustrates the problem. With a word count that is not a multiple of eight, everything seems to go fine, but as soon as I try to clear a multiple of eight words, everything goes poo.
Now, try playing around with the flags INLINE_FJALL, INLINE_CLEAR_BUFFER and VOLATILE_BUFFER and see what happens. The conclusions I managed to make was that with full inlining everything goes fine with or without volatile. With full inlining and no volatile, only one element gets corrupted when doing 16 words. With 15 all is fine. with volatile, everything is fine.
What amazes me, is the fact that volatile changes anything at all. This is global memory, no restricts or consts or anything to mess with guarantees. Any function should at any time be able to change that memory.
Does anybody have any ideas about this one?