]> git.sur5r.net Git - cc65/blobdiff - src/cc65/codeent.h
Added the lineinfo module. Changed the complete code generation to use the
[cc65] / src / cc65 / codeent.h
index 4c37eeb4fbe982ab32e4f0c96cfeb013956ccf5b..4de91b0d1b711973d2b61bf8c36db6ec1aeaa42f 100644 (file)
 
 /* cc65 */
 #include "codelab.h"
+#include "lineinfo.h"
 #include "opcodes.h"
 
 
 
 /*****************************************************************************/
-/*                                  Data                                    */
+/*                                  Data                                    */
 /*****************************************************************************/
 
 
 
 /* Flags used */
-#define CEF_USERMARK   0x0001U         /* Generic mark by user functions */
-#define CEF_NUMARG     0x0002U         /* Insn has numerical argument */
+#define CEF_USERMARK   0x0001U         /* Generic mark by user functions */
+#define CEF_NUMARG     0x0002U         /* Insn has numerical argument */
 
 /* Code entry structure */
 typedef struct CodeEntry CodeEntry;
 struct CodeEntry {
-    opc_t              OPC;            /* Opcode */
-    am_t               AM;             /* Adressing mode */
-    unsigned char      Size;           /* Estimated size */
-    unsigned char      Hints;          /* Hints for this entry */
+    opc_t              OPC;            /* Opcode */
+    am_t               AM;             /* Adressing mode */
     char*                      Arg;            /* Argument as string */
-    unsigned long      Num;            /* Numeric argument */
-    unsigned short     Flags;          /* Flags */
-    unsigned char      Info;           /* Additional code info */
-    unsigned char      Use;            /* Registers used */
-    unsigned char      Chg;            /* Registers changed/destroyed */
-    CodeLabel*         JumpTo;         /* Jump label */
-    Collection         Labels;         /* Labels for this instruction */
+    unsigned long      Num;            /* Numeric argument */
+    unsigned short     Flags;          /* Flags */
+    unsigned char      Size;           /* Estimated size */
+    unsigned char      Info;           /* Additional code info */
+    unsigned char      Use;            /* Registers used */
+    unsigned char      Chg;            /* Registers changed/destroyed */
+    CodeLabel*         JumpTo;         /* Jump label */
+    Collection         Labels;         /* Labels for this instruction */
+    LineInfo*           LI;             /* Source line info for this insn */
 };
 
 
@@ -85,7 +86,8 @@ struct CodeEntry {
 
 
 
-CodeEntry* NewCodeEntry (opc_t OPC, am_t AM, const char* Arg, CodeLabel* JumpTo);
+CodeEntry* NewCodeEntry (opc_t OPC, am_t AM, const char* Arg,
+                        CodeLabel* JumpTo, LineInfo* LI);
 /* Create a new code entry, initialize and return it */
 
 void FreeCodeEntry (CodeEntry* E);