1 /*-------------------------------------------------------------------------
2 SDCCgen51.h - header file for code generation for 8051
4 Written By - Sandeep Dutta . sandeep.dutta@usa.net (1998)
6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 In other words, you are welcome to use, share and improve this program.
21 You are forbidden to forbid anyone else to use, share and improve
22 what you give them. Help stamp out software-hoarding!
23 -------------------------------------------------------------------------*/
33 /* Is in a register */
35 /* Is in direct space */
37 /* SFR space ($FF00 and above) */
41 /* Is an immediate value */
45 /* Is in the carry register */
47 /* Is pointed to by IY */
49 /* Is pointed to by HL */
57 /* Is in the extended stack pointer (IY on the Z80) */
59 /* Is referenced by a pointer in a register pair. */
64 /* type asmop : a homogenised type for
65 all the different spaces an operand can be
70 short coff; /* current offset */
71 short size; /* total size */
72 bool code; /* is in Code space */
73 bool paged; /* in paged memory */
74 bool freed; /* already freed */
77 value *aop_lit; /* if literal */
78 regs *aop_reg[4]; /* array of registers */
79 char *aop_dir; /* if direct */
80 char *aop_immd; /* if immediate others are implied */
81 int aop_stk; /* stack offset when AOP_STK */
82 const char *aop_str[4]; /* just a string array containing the location */
83 unsigned long aop_simplelit; /* Just the value. */
84 int aop_pairId; /* The pair ID */
90 void genZ80Code (iCode *);