* src/pic/glue.c (emitInitVal): fixed #1659894 (SIGSEGV on arrays)
[fw/sdcc] / src / pic / pcodeflow.h
1 /*-------------------------------------------------------------------------
2
3    pcode.h - post code generation
4    Written By -  Scott Dattalo scott@dattalo.com
5
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
9    later version.
10    
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.
15    
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.
19    
20 -------------------------------------------------------------------------*/
21
22 #ifndef __PCODEFLOW_H__
23 #define __PCODEFLOW_H__
24
25 /*************************************************
26  * pCode conditions:
27  *
28  * The "conditions" are bit-mapped flags that describe
29  * input and/or output conditions that are affected by
30  * the instructions. For example:
31  *
32  *    MOVF   SOME_REG,W
33  *
34  * This instruction depends upon 'SOME_REG'. Consequently
35  * it has the input condition PCC_REGISTER set to true.
36  *
37  * In addition, this instruction affects the Z bit in the
38  * status register and affects W. Thus the output conditions
39  * are the logical or:
40  *  PCC_ZERO_BIT | PCC_W
41  *
42  * The conditions are intialized when the pCode for an
43  * instruction is created. They're subsequently used
44  * by the pCode optimizer determine state information
45  * in the program flow.
46  *************************************************/
47
48 #define  PCC_NONE          0
49 #define  PCC_REGISTER      (1<<0)
50 #define  PCC_C             (1<<1)
51 #define  PCC_Z             (1<<2)
52 #define  PCC_DC            (1<<3)
53 #define  PCC_W             (1<<4)
54 #define  PCC_EXAMINE_PCOP  (1<<5)
55 #define  PCC_REG_BANK0     (1<<6)
56 #define  PCC_REG_BANK1     (1<<7)
57 #define  PCC_REG_BANK2     (1<<8)
58 #define  PCC_REG_BANK3     (1<<9)
59 #define  PCC_LITERAL       (1<<10)
60
61 /*------------------------------------------------------------*/
62
63 void BuildFlowAncestry(pBlock *pb);
64
65 #endif // __PCODEFLOW_H__