From 0e2c5f0a03900e42d76f8ef4c4f560e8a7ebca8b Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Wed, 7 Oct 2015 10:21:55 -0500 Subject: [PATCH] Fix for bug #33. Thanks to Linkovitch for reporting! --- direct.c | 10 +++++++++- procln.c | 8 ++++---- version.h | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/direct.c b/direct.c index a2eef88..04b576c 100644 --- a/direct.c +++ b/direct.c @@ -292,6 +292,7 @@ int d_equrundef(void) // int d_noclear(void) { + warn("CLR.L opcode ignored..."); return 0; } @@ -803,9 +804,17 @@ int d_dc(WORD siz) if ((scattr & SBSS) != 0) return error("illegal initialization of section"); + // Do an auto_even if it's not BYTE sized (hmm, should we be doing this???) if ((siz != SIZB) && (sloc & 1)) auto_even(); + // Check to see if we're trying to set LONGS on a non 32-bit aligned + // address in a GPU or DSP section, in their local RAM + if ((siz == SIZL) && (orgaddr & 0x03) + && ((rgpu && (orgaddr >= 0xF03000) && (orgaddr <= 0xF03FFFF)) + || (rdsp && (orgaddr >= 0xF1B000) && (orgaddr <= 0xF1CFFFF)))) + warn("depositing LONGs on a non-long address in local RAM"); + for(;; ++tok) { // dc.b 'string' [,] ... @@ -856,7 +865,6 @@ int d_dc(WORD siz) if (eval + 0x100 >= 0x200) { sprintf(buffer, "%s (value = $%X)", range_error, eval); -// return error(range_error); return error(buffer); } diff --git a/procln.c b/procln.c index 8739ce6..5860734 100644 --- a/procln.c +++ b/procln.c @@ -395,13 +395,13 @@ normal: // o everything else if (equtyp == EQUREG) { -//Linko's request to issue a warning on labels that equated to the same register -//would go here. Not sure how to implement it though. :-/ +//Linko's request to issue a warning on labels that equated to the same +//register would go here. Not sure how to implement it though. :-/ /* Maybe like this way: have an array of bools with 64 entries. Whenever a register is equated, set the -corresponding register bool to true. Whenever it's undef'ed, set it to false. When -checking to see if it's already been equated, issue a warning. +corresponding register bool to true. Whenever it's undef'ed, set it to false. +When checking to see if it's already been equated, issue a warning. */ // Check that we are in a RISC section if (!rgpu && !rdsp) diff --git a/version.h b/version.h index 64a0c5e..a46c7b1 100644 --- a/version.h +++ b/version.h @@ -13,6 +13,6 @@ #define MAJOR 1 // Major version number #define MINOR 3 // Minor version number -#define PATCH 8 // Patch release number +#define PATCH 9 // Patch release number #endif // __VERSION_H__ -- 2.37.2