Hi,
I was looking at the disassembly for some PIC14 code, and I assumed the SFRs 
would be naturally declared as volatile. This would mean code like
****
 (void) RCREG;
 (void) RCREG;
****
would read the RCREG register twice, discarding its value. But those get 
optimized away ! (tested with 2015-12-31 snapshot)

In the non-free "pic16f628a.h" header (probably others too ?), RCREG is defined 
as
****
extern __at(0x001A) __sfr RCREG;
****
but the __sfr keyword (applied to PIC*) is undocumented in the sdcc manual.

Is this a bug ? Is there a workaround ?

Thanks !

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to