]> Shamusworld >> Repos - rmac/blobdiff - token.c
Removed some dead code, as well as all gpu/dsp regbank check code (not only it was...
[rmac] / token.c
diff --git a/token.c b/token.c
index a652f2f8328263c048677f84d7b8f4d81d44b4cb..10b28320b6cd772a2cefa6a4a223f2fd59969b94 100644 (file)
--- a/token.c
+++ b/token.c
@@ -1208,7 +1208,6 @@ DEBUG { printf("TokenizeLine: Calling fpop() from SRC_IFILE...\n"); }
                        {
                                equrundef = 1;
                                j = -1;
-                               //printf("line %d, equrundef found\n", curlineno);
                        }
 
                        // If not tokenized keyword OR token was not found
@@ -1218,7 +1217,8 @@ DEBUG { printf("TokenizeLine: Calling fpop() from SRC_IFILE...\n"); }
                                // because the directive handler (d_equrundef) will run outside this loop, further into procln.c
                                if (!equrundef)
                                {
-                                       // Last attempt: let's see if this is an equated register
+                                       // Last attempt: let's see if this is an equated register.
+                                       // If yes, then just store the register's keyword value instead of the symbol
                                        char temp = *ln;
                                        *ln = 0;
                                        sy = lookup(nullspot, LABEL, 0);
@@ -1227,23 +1227,7 @@ DEBUG { printf("TokenizeLine: Calling fpop() from SRC_IFILE...\n"); }
                                        {
                                                if (sy->sattre & EQUATEDREG)
                                                {
-                                                       uint32_t register_token = sy->svalue;
-                                                       if (rgpu || rdsp)
-                                                       {
-                                                               // If we are in GPU or DSP mode then mark the register bank.
-                                                               // We will use it during EvaluateRegisterFromTokenStream()
-                                                               // when we check if we can use the equated register with the currently
-                                                               // selected bank.
-                                                               // Note (ggn): I find all this superfluous. Do we really want to be so
-                                                               //             protective? Plus, the current implementation happily skips
-                                                               //                         these checks on .equr that are set during fixups - oops!
-                                                               register_token |= 0x80000000;           // Mark that this is an .equr
-                                                               if (sy->sattre & BANK_1)
-                                                               {
-                                                                       register_token |= 0x40000000;   // Mark bank 1
-                                                               }
-                                                       }
-                                                       *tk.u32++ = register_token;
+                                                       *tk.u32++ = sy->svalue;
                                                        stuffnull = 0;
                                                        continue;
                                                }