From: Shamus Hammons Date: Fri, 13 Oct 2017 23:00:10 +0000 (-0500) Subject: Small fix for spurious "out of range" errors (tied to 64-bit eval path). X-Git-Tag: v2.1.0~102 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=commitdiff_plain;h=689803cff9fd6a81a516486e6e1439ce717607b3;ds=inline Small fix for spurious "out of range" errors (tied to 64-bit eval path). --- diff --git a/mach.c b/mach.c index e8a719b..edb5dea 100644 --- a/mach.c +++ b/mach.c @@ -705,8 +705,6 @@ int m_bitop(WORD inst, WORD siz) int m_dbra(WORD inst, WORD siz) { - uint32_t v; - siz = siz; inst |= a0reg; D_word(inst); @@ -716,7 +714,7 @@ int m_dbra(WORD inst, WORD siz) if ((a1exattr & TDB) != cursect) return error(rel_error); - v = a1exval - sloc; + uint32_t v = a1exval - sloc; if (v + 0x8000 > 0x10000) return error(range_error); @@ -919,7 +917,7 @@ int m_moveq(WORD inst, WORD siz) AddFixup(FU_BYTE | FU_SEXT, sloc + 1, a0expr); a0exval = 0; } - else if (a0exval + 0x100 >= 0x200) + else if ((uint32_t)a0exval + 0x100 >= 0x200) return error(range_error); inst |= reg_9[a1reg] | (a0exval & 0xFF); @@ -971,8 +969,6 @@ int m_movep(WORD inst, WORD siz) // int m_br(WORD inst, WORD siz) { - uint32_t v; - if (a0exattr & DEFINED) { if ((a0exattr & TDB) != cursect) @@ -981,7 +977,7 @@ int m_br(WORD inst, WORD siz) return error(rel_error); //} - v = (uint32_t)a0exval - (sloc + 2); + uint32_t v = (uint32_t)a0exval - (sloc + 2); // Optimize branch instr. size if (siz == SIZN) diff --git a/version.h b/version.h index 225ad9f..9193d3d 100644 --- a/version.h +++ b/version.h @@ -15,7 +15,7 @@ #define MAJOR 1 // Major version number #define MINOR 9 // Minor version number -#define PATCH 0 // Patch release number +#define PATCH 1 // Patch release number #endif // __VERSION_H__