]> Shamusworld >> Repos - rmac/blobdiff - sect.c
Added missing intern error text, version bump for last round of patches.
[rmac] / sect.c
diff --git a/sect.c b/sect.c
index a9239e6e638b1cb8c808d801432a7be9b91e93f7..3cedbb24221c2f7279b40612cce48faef1f9e3d4 100644 (file)
--- a/sect.c
+++ b/sect.c
@@ -18,7 +18,9 @@
 #include "riscasm.h"
 #include "symbol.h"
 #include "token.h"
-
+#define DEF_KW
+#include "kwtab.h"
+#undef DEF_KW
 
 // Function prototypes
 void MakeSection(int, uint16_t);
@@ -461,9 +463,9 @@ int ResolveFixups(int sno)
                        if (evexpr(fup->expr, &eval, &eattr, &esym) != OK)
                                continue;
 
-                       if ((CHECK_OPTS(OPT_PC_RELATIVE)) && (eattr & REFERENCED) && (eattr & DEFINED) && (!(eattr & EQUATED)))
+                       if ((CHECK_OPTS(OPT_PC_RELATIVE)) && (eattr & (DEFINED | REFERENCED | EQUATED)) == (DEFINED | REFERENCED))
                        {
-                               error("relocation not allowed");
+                               error("relocation not allowed when o30 is enabled");
                                continue;
                        }
                }
@@ -473,9 +475,9 @@ int ResolveFixups(int sno)
                        SYM * sy = fup->symbol;
                        eattr = sy->sattr;
 
-                       if ((CHECK_OPTS(OPT_PC_RELATIVE)) && (eattr & REFERENCED) && (eattr & DEFINED) && (!(eattr & EQUATED)))
+                       if ((CHECK_OPTS(OPT_PC_RELATIVE)) && (eattr & (DEFINED | REFERENCED | EQUATED)) == (DEFINED | REFERENCED))
                        {
-                               error("relocation not allowed");
+                               error("relocation not allowed when o30 is enabled");
                                continue;
                        }
 
@@ -589,7 +591,7 @@ int ResolveFixups(int sno)
                                        *locp = 0x71;
 
                                        if (optim_warn_flag)
-                                               warn("bra.s with zero offset converted to NOP");
+                                               warn("o6: bra.s with zero offset converted to NOP");
 
                                        continue;
                                }
@@ -720,6 +722,7 @@ int ResolveFixups(int sno)
                        }
                        else if ((dw & FUMASKRISC) == FU_REGONE)
                        {
+                               eval -= KW_R0;
                                if (eval > 31)
                                {
                                        error("register one value out of range");
@@ -733,6 +736,7 @@ int ResolveFixups(int sno)
                        }
                        else if ((dw & FUMASKRISC) == FU_REGTWO)
                        {
+                               eval -= KW_R0;
                                if (eval > 31)
                                {
                                        error("register two value out of range");