changeset 250:0986834ec7d3 2.x

Added no-op .bank pseudo-op to support compiling gcc6809
author lost
date Thu, 26 Nov 2009 21:12:45 +0000
parents b34071013404
children f6af5791472c
files ChangeLog lwasm/instab.c lwasm/parse.c
diffstat 3 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Nov 26 21:12:28 2009 +0000
+++ b/ChangeLog	Thu Nov 26 21:12:45 2009 +0000
@@ -24,6 +24,10 @@
     to improve compatibility with gcc6809 output [LWASM]
 [b] Treat incomplete reference flags as specified in docs [LWLINK]
 [ ] Changed default LWEX stack size to 1K [LWLINK]
+[+] Accept ".bank" pseudo op and ignore it; bank support may be provided
+    in the future if a reasonable model for such is determined; currently
+    this is just provided for compatibility with the gcc6809 build process
+    [LWASM]
 
 Version 2.5
 
--- a/lwasm/instab.c	Thu Nov 26 21:12:28 2009 +0000
+++ b/lwasm/instab.c	Thu Nov 26 21:12:45 2009 +0000
@@ -460,6 +460,9 @@
 	{ "pag",	{ -1, -1, -1, -1 }, pseudo_noop },
 	{ "ttl",	{ -1, -1, -1, -1 }, pseudo_noop },
 
+	// placeholder since lwasm doesn't support banks (yet)
+	{ ".bank",	{ -1, -1, -1, -1 }, pseudo_noop},
+
 	/* flag end of table */	
 	{ NULL,		{ -0x1, -0x1, -0x1, -0x1 }, insn_inh }
 };
--- a/lwasm/parse.c	Thu Nov 26 21:12:28 2009 +0000
+++ b/lwasm/parse.c	Thu Nov 26 21:12:45 2009 +0000
@@ -194,7 +194,7 @@
 			(instab[opnum].fn)(as, l, &p2, opnum);
 			
 			// if we didn't end on a "space" character or EOL, throw error
-			if (*p2 && !isspace(*p2) && !(l -> err) && as -> passnum == 1)
+			if (p2 && *p2 && !isspace(*p2) && !(l -> err) && as -> passnum == 1)
 				register_error(as, l, 1, "Bad operand: %s (%d)", p2, as -> passnum);
 		}
 		else