Applied patch #2762516
[fw/sdcc] / src / pic16 / ralloc.h
index f41ebc244b16d753a0ae7d0c0ae5c7d51d20e08d..41e2269e72d2b47830d3ab7d0077c598f2aad248 100644 (file)
@@ -31,9 +31,6 @@
 
 #include "pcoderegs.h"
 
-extern unsigned int stackPos;
-extern unsigned int stackLen;
-
 enum
   {
     R2_IDX = 0, R3_IDX, R4_IDX,
@@ -118,31 +115,34 @@ regs *pic16_regWithName(char *name);
 void  pic16_freeAllRegs ();
 void  pic16_deallocateAllRegs ();
 regs *pic16_findFreeReg(short type);
+regs *pic16_findFreeRegNext(short type, regs *creg);
 regs *pic16_allocWithIdx (int idx);
 
 regs *pic16_allocDirReg (operand *op );
 regs *pic16_allocRegByName (char *name, int size, operand *op);
+extern char *pic16_decodeOp(unsigned int op);
 
-regs* newReg(short type, short pc_type, int rIdx, char *name, int size, int alias, operand *refop);
+regs* newReg(int type, short pc_type, int rIdx, char *name, unsigned size, int alias, operand *refop);
 
 /* Define register address that are constant across PIC16 family */
 #define IDX_TMR0    0xfd6
-#define IDX_PCL     0xff9
 #define IDX_STATUS  0xfd8
-#define IDX_PCLATH  0xffa
-#define IDX_PCLATU  0xffb /* patch 14 */
 #define IDX_INTCON  0xff2
 #define IDX_WREG    0xfe8
 #define IDX_BSR     0xfe0
 
-#define IDX_TOSL    0xffd /* patch 14 */
-#define IDX_TOSH    0xffe /* patch 14 */
-#define IDX_TOSU    0xfff /* patch 14 */
+#define IDX_PCL     0xff9
+#define IDX_PCLATH  0xffa
+#define IDX_PCLATU  0xffb 
+
+#define IDX_TOSL    0xffd
+#define IDX_TOSH    0xffe
+#define IDX_TOSU    0xfff
 
-#define IDX_TBLPTRL 0xff6 /* patch 15 */
-#define IDX_TBLPTRH 0xff7 /* patch 15 */
-#define IDX_TBLPTRU 0xff8 /* patch 15 */
-#define IDX_TABLAT  0xff5 /* patch 15 */
+#define IDX_TBLPTRL 0xff6
+#define IDX_TBLPTRH 0xff7
+#define IDX_TBLPTRU 0xff8
+#define IDX_TABLAT  0xff5
 
 #define IDX_FSR0    0xfe9
 #define IDX_FSR0L   0xfe9
@@ -187,4 +187,7 @@ regs* newReg(short type, short pc_type, int rIdx, char *name, int size, int alia
 #define IDX_WSAVE   0x7ffe
 #define IDX_SSAVE   0x7ffd
 
+#define IDX_GPSIMIO    0xf7f
+#define IDX_GPSIMIO2   0xf7e
+
 #endif