mikroC PRO for PIC Beta 7.3.0. - Beta Reporting

Beta Testing discussion on mikroC PRO for PIC.
Post Reply
Author
Message
User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

mikroC PRO for PIC Beta 7.3.0. - Beta Reporting

#1 Post by filip » 18 Feb 2019 10:29

Hello,

We appreciate your effort in reporting the Beta compiler issues and suggestions, we will start working on them soon.

If you have anything more to add, please post it here.

Regards,
Filip.

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: mikroC PRO for PIC Beta 7.3.0. - Beta Reporting

#2 Post by janni » 19 Feb 2019 00:30

There's something that could be improved (as always :wink: ).
Unfortunate architecture of these new processors makes it impossible to use MOVFF instruction when moving values from GPRs to SFRs and back, and long-range MOVFFL instruction takes three words (and three instruction cycles to execute). Well, sometimes a MOVFFL instruction could be replaced with two single-word instructions thus saving code memory and speeding execution. For example, statement

Code: Select all

FSR0PTR=ptr;
coded now as

Code: Select all

MOVFFL       _ptr, FSR0PTR    
MOVFFL       _ptr+1, FSR0PTR+1
(which takes 6 words) could instead use 4 words and cut 1/3 of execution time

Code: Select all

MOVF        _ptr,W
MOVWF       FSR0 
MOVF        _ptr+1,W 
MOVWF       FSR0H
Optimal case is when both the GPR and the SFR is in access bank, but even when only the source or the destination is placed in access bank, a group of move instructions converted this way could lead to savings.
If nothing else, such replacement could be done as some optimization step.

Post Reply

Return to “mikroC PRO for PIC Beta Testing”