]> git.sur5r.net Git - cc65/commitdiff
Rearrange members to lower memory usage
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 1 Oct 2003 20:59:39 +0000 (20:59 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 1 Oct 2003 20:59:39 +0000 (20:59 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2466 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/codeent.c
src/cc65/codeent.h

index b74c1e8d37fd8ec9df4d1bf2d29aed367c9a4902..427a17ef1e74acd9b05429d98feec88f91142ebf 100644 (file)
@@ -244,10 +244,10 @@ CodeEntry* NewCodeEntry (opc_t OPC, am_t AM, const char* Arg,
     /* Initialize the fields */
     E->OPC    = D->OPC;
     E->AM     = AM;
-    E->Arg    = GetArgCopy (Arg);
+    E->Size   = GetInsnSize (E->OPC, E->AM);
     E->Flags  = NumArg (E->Arg, &E->Num)? CEF_NUMARG : 0;
+    E->Arg    = GetArgCopy (Arg);
     E->Info   = D->Info;
-    E->Size   = GetInsnSize (E->OPC, E->AM);
     E->JumpTo = JumpTo;
     E->LI     = UseLineInfo (LI);
     E->RI     = 0;
index 60fc28bf85d0b7e706cf70f3e88dd65480bf3f07..81660287a53945accd55a94f27b9e85b9f9abc7e 100644 (file)
 /* Code entry structure */
 typedef struct CodeEntry CodeEntry;
 struct CodeEntry {
-    opc_t              OPC;            /* Opcode */
-    am_t               AM;             /* Adressing mode */
+    unsigned char       OPC;           /* Opcode */
+    unsigned char       AM;            /* Adressing mode */
+    unsigned char      Size;           /* Estimated size */
+    unsigned char       Flags;         /* Flags */
     char*                      Arg;            /* Argument as string */
     unsigned long      Num;            /* Numeric argument */
-    unsigned short     Flags;          /* Flags */
     unsigned short      Info;          /* Additional code info */
     unsigned short      Use;           /* Registers used */
     unsigned short      Chg;           /* Registers changed/destroyed */
-    unsigned char      Size;           /* Estimated size */
     CodeLabel*         JumpTo;         /* Jump label */
     Collection         Labels;         /* Labels for this instruction */
     LineInfo*           LI;             /* Source line info for this insn */