X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fpic16%2Fralloc.h;h=653f973cc693f71ec8f0f1ed9a7728bd2fc56851;hb=d9a3555b8dd102f049b6a3ce6b06150d6e4a3f79;hp=e2ab7d375aa1ce35086575d3575580876c2d970b;hpb=f0914f906af64baca70034066af8fa475ef2c47f;p=fw%2Fsdcc diff --git a/src/pic16/ralloc.h b/src/pic16/ralloc.h index e2ab7d37..653f973c 100644 --- a/src/pic16/ralloc.h +++ b/src/pic16/ralloc.h @@ -32,6 +32,7 @@ #include "pcoderegs.h" extern unsigned int stackPos; +extern unsigned int stackLen; enum { @@ -107,44 +108,54 @@ extern set *pic16_rel_udata; extern set *pic16_fix_udata; extern set *pic16_equ_data; extern set *pic16_int_regs; +extern set *pic16_acs_udata; regs *pic16_regWithIdx (int); regs *pic16_typeRegWithIdx(int, int, int); regs *pic16_dirregWithName (char *name ); +regs *pic16_allocregWithName(char *name); +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 #define IDX_FSR0H 0xfea + +#define IDX_FSR1 0xfe1 #define IDX_FSR1L 0xfe1 #define IDX_FSR1H 0xfe2 + +#define IDX_FSR2 0xfd9 #define IDX_FSR2L 0xfd9 #define IDX_FSR2H 0xfda @@ -179,4 +190,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