]> Shamusworld >> Repos - rmac/blobdiff - parmode.h
Fix a small buglet in the last patch. :-)
[rmac] / parmode.h
index ca313efb1bd8dbcff02169303831d0c8bc4f6bc8..955fade88621de27095dad9fba6f613c8498f76f 100644 (file)
--- a/parmode.h
+++ b/parmode.h
@@ -81,7 +81,7 @@
                }
                else if ((*tok >= KW_D0) && (*tok <= KW_D7))
                {
-                       //Since index register isn't used here, store register number in this field
+                       // Since index register isn't used here, store register number in this field
                        AnIXREG = *tok++ & 7;                                // (Dn)
 
                        if (*tok == ')')
@@ -1169,6 +1169,14 @@ CHK_FOR_DISPn:
                        // expr[.L]
                        AMn = ABSL;
 
+                       // When PC relative is enforced, check for any symbols that aren't 
+                       // EQU'd, in this case it's an illegal mode
+                       if (optim_pc)
+                               if (AnEXATTR & REFERENCED)
+                                       if (AnEXATTR & DEFINED)
+                                               if (!(AnEXATTR & EQUATED))
+                                                       return error("relocation not allowed");
+
                        // .L is forced here
                        if (*tok == DOTL)
                        {