]> Shamusworld >> Repos - rmac/blobdiff - riscasm.c
Possible fix for bug #72 (no warning on unclosed .ifs).
[rmac] / riscasm.c
index 37e29224a99d78a172044102beb277e0eaf661f1..78bae9c290a3f506088050a3644de1546e4fe142 100644 (file)
--- a/riscasm.c
+++ b/riscasm.c
@@ -323,6 +323,15 @@ int GenerateRISCCode(int state)
                tok++;
                riscImmTokenSeen = 1;
 
+               // Check for equated register after # and return error if so
+               if (*tok == SYMBOL)
+               {
+                       sy = lookup(string[tok[1]], LABEL, 0);
+
+                       if (sy && (sy->sattre & EQUATEDREG))
+                               return error("equated register in 1st operand of MOVEI instruction");
+               }
+
                if (expr(r_expr, &eval, &eattr, &esym) != OK)
                        return MalformedOpcode(0x04);