errors for enhanced series

Beta Testing discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

errors for enhanced series

#1 Post by janni » 05 Feb 2018 16:16

I've just learned that an upgrade is coming in few days, so it's a bit late, but some of the errors I found lately should be easy to fix.

- signed 8-bit multiplication routine (Mul_8x8_S) produces errors that are, in addition, dependent on order of operands:
-128*-1=-128, -1*-128=0
1*-128=0, while -128*1=-128
(same for PIC16 processors),

- copy procedure, __CA2A from System lib, is called instead of __CA2AW though registers are prepared for the latter - it will lead to memory overwrite when blocks of data bigger than 255 bytes are handled,

- compiler assumes that all routines in Math and MathDouble libs end with Bank0 (apparently a quick & dirty solution was applied to free R14 register - it was replaced by variable tempb in Div_32x32_U and Div_32x32_S and by tempbD in MathDouble libs). In conjunction with another quick fix (to division by zero error) some math routines (Div_8x8_U, Div_16x16_S and Div_32x32_S) may end up with banks above 0, though, if divisor is zero and dividend is in higher bank. This, obviously, may lead to uncontrolled user program behaviour.

There are other errors in math libraries for all PIC processors, but those are known for years so I won't list them here.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: errors for enhanced series

#2 Post by filip » 07 Feb 2018 11:54

Hi,

Thanks for the report.

We are now on a tight schedule with PIC compiler release, but I'm sure this will be seriously taken into account with the next one.

Regards,
Filip.

Post Reply

Return to “mikroPascal PRO for PIC Beta Testing”