gnupic: SuperOptimizer for PIC microcontrolers
Subject:
SuperOptimizer for PIC microcontrolers
From:
Daniel Serpell ####@####.####
Date:
17 May 2001 22:04:41 -0000
Message-Id: <3B045F9A.8EF2A3FB@mat.utfsm.cl>
Hi all!
I've written a superoptimizer program for PIC microcontrolers.
Take a look at http://www.atmlab.utfsm.cl/~daniel/superopt-e.html
You can use it to search short sequences of instructions, ie:
What is the shortest sequence to the function: W = SIGN( F1 )
( SIGN(x) = 1 if x>0, -1 if x<0, 0 if x==0 )
My program finds:
movf F1,W
btfss STATUS,Z
iorlw 0xFF
btfss F1,7
andlw 0x01
Please try it, send me comments, etc.
Daniel Serpell
daniel at mat.utfsm.cl