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