]> git.sur5r.net Git - cc65/blobdiff - src/cc65/codeent.h
Working on the backend
[cc65] / src / cc65 / codeent.h
index 785ed974e797433a48e5178a1ecd29a94b6f075c..ba704eb2836ffb08f9f47b37485a29a3934e2151 100644 (file)
@@ -69,7 +69,9 @@ struct CodeEntry {
     char*                      Arg;            /* Argument as string */
     unsigned           Num;            /* Numeric argument */
     unsigned short     Flags;          /* Flags */
-    unsigned short     Info;           /* Register usage info for this entry */
+    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 */
 };
@@ -88,9 +90,36 @@ CodeEntry* NewCodeEntry (const OPCDesc* D, am_t AM, const char* Arg, CodeLabel*
 void FreeCodeEntry (CodeEntry* E);
 /* Free the given code entry */
 
+int CodeEntriesAreEqual (const CodeEntry* E1, const CodeEntry* E2);
+/* Check if both code entries are equal */
+
+void AttachCodeLabel (CodeEntry* E, CodeLabel* L);
+/* Attach the label to the entry */
+
 int CodeEntryHasLabel (const CodeEntry* E);
 /* Check if the given code entry has labels attached */
 
+unsigned GetCodeLabelCount (const CodeEntry* E);
+/* Get the number of labels attached to this entry */
+
+CodeLabel* GetCodeLabel (CodeEntry* E, unsigned Index);
+/* Get a label from this code entry */
+
+void MoveCodeLabel (CodeLabel* L, CodeEntry* E);
+/* Move the code label L from it's former owner to the code entry E. */
+
+int CodeEntryHasMark (const CodeEntry* E);
+/* Return true if the given code entry has the CEF_USERMARK flag set */
+
+void CodeEntrySetMark (CodeEntry* E);
+/* Set the CEF_USERMARK flag for the given entry */
+
+void CodeEntryResetMark (CodeEntry* E);
+/* Reset the CEF_USERMARK flag for the given entry */
+
+void CodeEntrySetArg (CodeEntry* E, const char* Arg);
+/* Set a new argument for the given code entry. An old string is deleted. */
+
 void OutputCodeEntry (const CodeEntry* E, FILE* F);
 /* Output the code entry to a file */