#include "riscasm.h"
#include "symbol.h"
#include "token.h"
-
+#define DEF_REGRISC
+#include "riscregs.h"
// Function prototypes
void MakeSection(int, uint16_t);
// In this instruction the PC is located a DWORD away
if (dw & FU_PCRELX)
eval += 2;
+
+ if ((int64_t)eval > 0x7fff || (int64_t)eval < -32768)
+ error(range_error);
}
else
{
}
else if ((dw & FUMASKRISC) == FU_REGONE)
{
+ eval -= REGRISC_R0;
if (eval > 31)
{
error("register one value out of range");
}
else if ((dw & FUMASKRISC) == FU_REGTWO)
{
+ eval -= REGRISC_R0;
if (eval > 31)
{
error("register two value out of range");