Jump to content
Reynard

Common Fsr Optimization

Recommended Posts

This is small fry stuff for V7.0

 

For PIC12 and PIC16 devices that have a SFR common to all banks, such as INTCON. Could it not do a bank selection change, setting/resetting of RP bits, and squeeze out that redundant instruction.

 

	if (intcon.T0IF && intcon.T0IE)
002B  1283	  BCF STATUS, RP0	   *** Not required instruction.
002C  1D0B	  BTFSS gbl_intcon,2
002D  2830	  GOTO	label3
002E  1E8B	  BTFSS gbl_intcon,5
002F  2830	  GOTO	label3

 

Other compilers don't put it in.

 

Cheers

 

Reynard

 

Title should read SFR. Silly keyboard :)

Edited by Reynard

Share this post


Link to post
Share on other sites

Reynard,

This is small fry stuff for V7.0

...

Other compilers don't put it in.

Thanks for raising this. There is some room for improvement.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...