1 /*-------------------------------------------------------------------------
3 SDCCralloc.h - header file register allocation
5 Written By - Sandeep Dutta . sandeep.dutta@usa.net (1998)
7 This program is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 2, or (at your option) any
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 In other words, you are welcome to use, share and improve this program.
22 You are forbidden to forbid anyone else to use, share and improve
23 what you give them. Help stamp out software-hoarding!
24 -------------------------------------------------------------------------*/
25 #include "SDCCicode.h"
26 #include "SDCCBBlock.h"
28 #define SDCCRALLOC_H 1
32 R0_IDX = 0, R1_IDX, R2_IDX, R3_IDX, R4_IDX,
33 R5_IDX, R6_IDX, R7_IDX, R8_IDX, R9_IDX,
34 R10_IDX, R11_IDX, R12_IDX, R13_IDX, R14_IDX,
35 R15_IDX, R16_IDX, R17_IDX, R18_IDX, R19_IDX,
36 R20_IDX, R21_IDX, R22_IDX, R23_IDX, R24_IDX,
37 R25_IDX, R26_IDX, R27_IDX, R28_IDX, R29_IDX,
38 R30_IDX, R31_IDX, X_IDX, Z_IDX, CND_IDX
49 /* definition for the registers */
52 short type; /* can have value
53 REG_GPR, REG_PTR or REG_CND */
54 short rIdx; /* index into register table */
56 char *name; /* name */
57 char *dname; /* name when direct access needed */
58 char *base; /* base address */
59 short offset; /* offset from the base */
60 unsigned isFree:1; /* is currently unassigned */
61 unsigned saveReq:1; /* save required @ function entry ? */
64 extern regs regsAVR[];
66 regs *avr_regWithIdx (int);