??? 09/14/11 17:38 Read: times |
#183759 - re: incorrect warning Responding to: ???'s previous message |
Maarten Brock said:
It seems SDCC generates an incorrect warning. It can detect the __using(1) during code generation as can be seen in the generated .asm file. If you leave out the __using it will switch to bank 0 before making the call. If you make the function pointer typedef __using(2) it will switch to bank 2. It is the isr function entry that issues the warning and does NOT save the selected register bank. If you do a direct call to a function __using(2) it will save bank 2 and issue no warning.
Fortunately when both the isr and the function pointer use the same bank it doesn't need to save the bank. So in your case it is safe to ignore the warning. Feel free to post this as a bug in the tracker system. https://sourcefor...unc=browse Hi, Maarten, Thanks for looking at this. Apparently, the Actel SoftConsole uses an ancient version of sdcc -- 2.6.3 -- so I wonder if this issue has been addressed in a later version of the compiler? I'll open up a bug in the system regardless; it can always be marked as already solved. Now to ask Actel why they use an ancient version of sdcc, and whether I can blithely install a newer one over their installation without the whole thing going to hell. -a |
Topic | Author | Date |
SDCC: function pointers in an ISR | 01/01/70 00:00 | |
Alternative | 01/01/70 00:00 | |
re: Alternative | 01/01/70 00:00 | |
Register bank 1 | 01/01/70 00:00 | |
re: register bank 1 | 01/01/70 00:00 | |
Using... | 01/01/70 00:00 | |
Lack of orthogonality | 01/01/70 00:00 | |
incorrect warning | 01/01/70 00:00 | |
re: incorrect warning | 01/01/70 00:00 | |
not fixed yet | 01/01/70 00:00 | |
re: not fixed yet | 01/01/70 00:00 | |
Actel's answer. | 01/01/70 00:00 | |
warning | 01/01/70 00:00 | |
function pointers in SDCC | 01/01/70 00:00 | |
bug fixed! | 01/01/70 00:00 | |
Actel support | 01/01/70 00:00 | |
Still on the payroll | 01/01/70 00:00 |