At 16:45 2003-1-31 +0200, you wrote:
Use a lower optimization level. There seems to be a strange bug in the V9 optimizer that causes some 16-bit multiplications to be promoted to 32-bit multiplications during optimization. We are trying to track this down, but in the meantime, going from optimization level 4 to opt level 2 should solve the problem, while not noticeably affecting code speed for the rest of your program.I have somewhere in the code the following line:int dist=sqrt(dx*dx+dy*dy); I also heard that it's not a good idea to do 32 bit multiplies , so I changed the types of dx and dy to short ... ( I use 4 bytes integers). When I disassemble the debug code, I see that "muls" instructions are generated (correct), but when I compile it into release and disassemble it again, the generated instructions are "jsr __lmul__", which eat many more cycles, as I understood. How can I correct this ?
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
