diff lwasm/instab.c @ 236:a58f49a77441

Added os9 target, pragma to control whether $ localizes a symbol, and fixed some condition nesting bugs
author lost
date Fri, 14 Aug 2009 03:22:26 +0000
parents 4e25aa2af73c
children f9f01a499525
line wrap: on
line diff
--- a/lwasm/instab.c	Fri Jun 12 05:25:41 2009 +0000
+++ b/lwasm/instab.c	Fri Aug 14 03:22:26 2009 +0000
@@ -66,6 +66,8 @@
 extern OPFUNC(pseudo_ifge);
 extern OPFUNC(pseudo_iflt);
 extern OPFUNC(pseudo_ifle);
+extern OPFUNC(pseudo_ifp1);
+extern OPFUNC(pseudo_ifp2);
 extern OPFUNC(pseudo_else);
 extern OPFUNC(pseudo_endc);
 extern OPFUNC(pseudo_macro);
@@ -83,6 +85,10 @@
 extern OPFUNC(pseudo_noop);
 extern OPFUNC(pseudo_includebin);
 
+extern OPFUNC(pseudo_os9);
+extern OPFUNC(pseudo_mod);
+extern OPFUNC(pseudo_emod);
+
 instab_t instab[] =
 {
 	{ "abx",	{	0x3a,	-0x1,	-0x1,	-0x1	},	insn_inh },
@@ -371,11 +377,16 @@
 
 	{ "includebin", { -1, -1, -1, -1}, pseudo_includebin },
 	{ "include", { -1, -1, -1, -1 }, pseudo_include },
+	{ "use",	{ -1, -1, -1, -1 },	pseudo_include },
 	
 	{ "align", { -1, -1, -1, -1 },	pseudo_align },
 
 	{ "error",	{ -1, -1, -1, -1},	pseudo_error },
 
+	// these are *dangerous*
+	{ "ifp1",	{ -1, -1, -1, -1},	pseudo_ifp1, 1 },
+	{ "ifp2",	{ -1, -1, -1, -1},	pseudo_ifp2, 1 },
+
 	{ "ifeq",	{ -1, -1, -1, -1}, 	pseudo_ifeq, 1 },
 	{ "ifne",	{ -1, -1, -1, -1}, 	pseudo_ifne, 1 },
 	{ "if",		{ -1, -1, -1, -1}, 	pseudo_ifne, 1 },
@@ -402,6 +413,11 @@
 	
 	{ "pragma",	{ -1, -1, -1, -1},	pseudo_pragma },
 	{ "*pragma",	{ -1, -1, -1, -1},	pseudo_starpragma },
+	
+	// for os9 target
+	{ "os9",	{ -1, -1, -1, -1 }, pseudo_os9 },
+	{ "mod",	{ -1, -1, -1, -1 },	pseudo_mod },
+	{ "emod",	{ -1, -1, -1, -1 },	pseudo_emod },
 
 	/* for compatibility with gcc6809 output... */
 	{ ".area",	{ -1, -1, -1, -1},	pseudo_section },
@@ -435,6 +451,12 @@
 
 	// for compatibility
 	{ ".end", 	{ -1, -1, -1, -1 }, pseudo_end },
+	
+	// extra ops that are ignored because they are generally only for
+	// pretty printing the listing
+	{ "nam",	{ -1, -1, -1, -1 }, pseudo_noop },
+	{ "pag",	{ -1, -1, -1, -1 }, pseudo_noop },
+	{ "ttl",	{ -1, -1, -1, -1 }, pseudo_noop },
 
 	/* flag end of table */	
 	{ NULL,		{ -0x1, -0x1, -0x1, -0x1 }, insn_inh }