]> git.sur5r.net Git - cc65/blob - src/cc65/codeinfo.h
Working on the new backend
[cc65] / src / cc65 / codeinfo.h
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                codeinfo.h                                 */
4 /*                                                                           */
5 /*              Additional information about code instructions               */
6 /*                                                                           */
7 /*                                                                           */
8 /*                                                                           */
9 /* (C) 2001      Ullrich von Bassewitz                                       */
10 /*               Wacholderweg 14                                             */
11 /*               D-70597 Stuttgart                                           */
12 /* EMail:        uz@cc65.org                                                 */
13 /*                                                                           */
14 /*                                                                           */
15 /* This software is provided 'as-is', without any expressed or implied       */
16 /* warranty.  In no event will the authors be held liable for any damages    */
17 /* arising from the use of this software.                                    */
18 /*                                                                           */
19 /* Permission is granted to anyone to use this software for any purpose,     */
20 /* including commercial applications, and to alter it and redistribute it    */
21 /* freely, subject to the following restrictions:                            */
22 /*                                                                           */
23 /* 1. The origin of this software must not be misrepresented; you must not   */
24 /*    claim that you wrote the original software. If you use this software   */
25 /*    in a product, an acknowledgment in the product documentation would be  */
26 /*    appreciated but is not required.                                       */
27 /* 2. Altered source versions must be plainly marked as such, and must not   */
28 /*    be misrepresented as being the original software.                      */
29 /* 3. This notice may not be removed or altered from any source              */
30 /*    distribution.                                                          */
31 /*                                                                           */
32 /*****************************************************************************/
33
34
35
36 #ifndef CODEINFO_H
37 #define CODEINFO_H
38
39
40
41 /*****************************************************************************/
42 /*                                   Data                                    */
43 /*****************************************************************************/
44
45
46
47 /* Flags that tell what a specific instruction does with a register.
48  * Please note that *changing* a register must not necessarily mean that the
49  * value currently in the register is used. A prominent example is a load
50  * instruction: It changes the register contents and does not use the old
51  * value. On the flip side, a shift or something similar would use the
52  * current value and change it.
53  */
54 #define CI_USE_NONE     0x0000U         /* Use nothing */
55 #define CI_USE_A        0x0001U         /* Use the A register */
56 #define CI_USE_X        0x0002U         /* Use the X register */
57 #define CI_USE_Y        0x0004U         /* Use the Y register */
58 #define CI_USE_ALL      0x0007U         /* Use all registers */
59 #define CI_MASK_USE     0x000FU         /* Extract usage info */
60
61 #define CI_CHG_NONE     0x0000U         /* Change nothing */
62 #define CI_CHG_A        0x0010U         /* Change the A register */
63 #define CI_CHG_X        0x0020U         /* Change the X register */
64 #define CI_CHG_Y        0x0040U         /* Change the Y register */
65 #define CI_CHG_ALL      0x0070U         /* Change all registers */
66 #define CI_MASK_CHG     0x00F0U         /* Extract change info */
67
68 #define CI_BRA          0x0100U         /* Instruction is a branch */
69 #define CI_MASK_BRA     0x0100U         /* Extract branch info */
70
71 #define CI_NONE         0x0000U         /* Nothing used/changed */
72
73
74
75 /*****************************************************************************/
76 /*                                   Code                                    */
77 /*****************************************************************************/
78
79
80
81 /* End of codeinfo.h */
82 #endif
83
84
85