Stop compiler to use CPU general purpose registers (RX memo)

General discussion on mikroBasic PRO for PIC32.
Post Reply
Author
Message
giovaniluigi
Posts: 92
Joined: 01 Oct 2007 03:57
Location: Canada/Brazil

Stop compiler to use CPU general purpose registers (RX memo)

#1 Post by giovaniluigi » 10 May 2015 23:41

I have noted that compiler gives priority to assign parameters of procedures and functions to the PIC RX memory.
I can use the explicit specifier 'data' or 'rx' to force the variable to be stored in the available registers.

However I can't use the specifiers in the function parameters, thus if the compiler takes all RX registers to the functions I'm not left with any available. In my code for example, I have functions that are called only once, when the CPU starts, and the compiler is assigning most RX for these functions... Can I avoid the compiler to assign the RX's automatically? Can I avoid RX usage in function parameters?

Thanks.
giovaniluigi.com

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: Stop compiler to use CPU general purpose registers (RX m

#2 Post by marina.petrovic » 11 May 2015 11:21

Hi,

Please, take a look at compiler Help -> mikroBasic PRO for PIC32 Specifics -> Single Static Assignment Optimization,
maybe there you can find some useful information.

Best regards,
Marina

Post Reply

Return to “mikroBasic PRO for PIC32 General”