1 /*-------------------------------------------------------------------------
3 SDCCralloc.h - header file register allocation
5 Written By - Sandeep Dutta . sandeep.dutta@usa.net (1998)
6 PIC port - T. Scott Dattalo scott@dattalo.com (2000)
8 This program is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the
10 Free Software Foundation; either version 2, or (at your option) any
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 In other words, you are welcome to use, share and improve this program.
23 You are forbidden to forbid anyone else to use, share and improve
24 what you give them. Help stamp out software-hoarding!
25 -------------------------------------------------------------------------*/
26 #include "SDCCicode.h"
27 #include "SDCCBBlock.h"
29 #define SDCCRALLOC_H 1
33 R2_IDX = 0, R3_IDX, R4_IDX,
34 R5_IDX, R6_IDX, R7_IDX,
35 R0_IDX, R1_IDX, X8_IDX,
36 X9_IDX, X10_IDX, X11_IDX,
44 /* definition for the registers */
47 short type; /* can have value
48 REG_GPR, REG_PTR or REG_CND */
49 short rIdx; /* index into register table */
51 char *name; /* name */
52 char *dname; /* name when direct access needed */
53 // char *base ; /* base address */
54 short offset; /* offset from the base */
55 unsigned isFree:1; /* is currently unassigned */
56 unsigned wasUsed:1; /* becomes true if register has been used */
59 extern regs regspic14[];
60 extern int pic14_nRegs;
62 regs *pic14_regWithIdx (int);
65 enum PIC_register_types
73 PIC_GPR, /* A general purpose file register */
74 PIC_SFR /* A special function register */