Forum : ST7/STM8
Post Information | Post |
---|---|
July 6, 2011 - 3:48pm
|
I have a line in my program that look like this int a,b; ... c = (long)a*b; When compiled, the assembler code contain this line 0013 8D000000 F CALLF ?C?muls161632 When I debugged my application I noticed that efter the call to ?C?muls161632 the interrupt level bits in the CC register was suddenly 0. I started to debug the function ?C?muls161632 and found this code Here is the code for ?C?muls161632 copied from the debugger 0x8081 <?C?muls161632+1> 0x5D TNZW X TNZW X I found a disturbing "POP CC" call as you can see above. In this case, the value on the stack contain the word 0 which mean that the CC register gets the value 0. Can anyone explain this? Best Regards |
Wow, bird's eye!
Indeed we confirm this problem. It will be fixed in a future RKit-STM8 release. However, the next version (nearly out) will not integrate the fix, as it is already qualified.
As a temporary fix what you can do is change a or b to long type, which will call the unoptimized 32x32->32 multiplication.
If this is not satisfactory for you please contact and we can provide you with a patch.
Best Regards,