#include "riscasm.h"
#include "symbol.h"
#include "token.h"
-
+#define DEF_KW
+#include "kwtab.h"
// Function prototypes
void MakeSection(int, uint16_t);
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;
}
}
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;
}
*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;
}
}
else if ((dw & FUMASKRISC) == FU_REGONE)
{
+ eval -= KW_R0;
if (eval > 31)
{
error("register one value out of range");
}
else if ((dw & FUMASKRISC) == FU_REGTWO)
{
+ eval -= KW_R0;
if (eval > 31)
{
error("register two value out of range");