Added mappings for "a390" the TINI assembler
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 18 Dec 2001 04:23:16 +0000 (04:23 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 18 Dec 2001 04:23:16 +0000 (04:23 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1700 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/asm.c
src/asm.h

index cfee3348d8dc38e651343440526c2dca32053bbf..65abc159ca6ef41a87e4f2c3fc68a723d8406ea3 100644 (file)
--- a/src/asm.c
+++ b/src/asm.c
@@ -343,6 +343,7 @@ static const ASM_MAPPING _asxxxx_mapping[] =
   {"hil","(%05d$ >> 8)"},
   {"hihil","(%05d$ >> 16)"},
   {"hihihil","(%05d$ >> 24)"},
+  {"equ","="},
   {NULL, NULL}
 };
 
@@ -385,6 +386,58 @@ static const ASM_MAPPING _gas_mapping[] =
   {NULL, NULL}
 };
 
+static const ASM_MAPPING _a390_mapping[] =
+{
+  {"labeldef", "%s:"},
+  {"slabeldef", "%s:"},
+  {"tlabeldef", "L%05d:"},
+  {"tlabel", "L%05d"},
+  {"immed", "#"},
+  {"zero", "#0"},
+  {"one", "#1"},
+  {"area", "; SECTION NOT SUPPORTED"},
+  {"areacode", "; SECTION NOT SUPPORTED"},
+  {"areadata", "; SECTION NOT SUPPORTED"},
+  {"areahome", "; SECTION NOT SUPPORTED"},
+  {"ascii", "db \"%s\""},
+  {"ds", "; STORAGE NOT SUPPORTED"},
+  {"db", "db"},
+  {"dbs", "db \"%s\""},
+  {"dw", "dw"},
+  {"dws", "dw %s"},
+  {"constbyte", "0%02xh"},
+  {"constword", "0%04xh"},
+  {"immedword", "#0%04Xh"},
+  {"immedbyte", "#0%02Xh"},
+  {"hashedstr", "#%s"},
+  {"lsbimmeds", "#<%s"},
+  {"msbimmeds", "#>%s"},
+  {"module", "; .file \"%s.c\""},
+  {"global", "; .globl %s"},
+  {"fileprelude", ""},
+  {"functionheader",
+   "; ---------------------------------\n"
+   "; Function %s\n"
+   "; ---------------------------------"
+  },
+  {"functionlabeldef", "%s:"},
+  {"bankimmeds", "0    ; PENDING: bank support"},  
+  {"los","(%s & 0FFh)"},
+  {"his","((%s / 256) & 0FFh)"},
+  {"hihis","((%s / 65536) & 0FFh)"},
+  {"hihihis","((%s / 16777216) & 0FFh)"},
+  {"lod","(%d & 0FFh)"},
+  {"hid","((%d / 256) & 0FFh)"},
+  {"hihid","((%d / 65536) & 0FFh)"},
+  {"hihihid","((%d / 16777216) & 0FFh)"},
+  {"lol","(L%05d & 0FFh)"},
+  {"hil","((L%05d / 256) & 0FFh)"},
+  {"hihil","((L%05d / 65536) & 0FFh)"},
+  {"hihihil","((L%09d / 16777216) & 0FFh)"},
+  {"equ"," equ"},
+  {NULL, NULL}
+};
+
 const ASM_MAPPINGS asm_asxxxx_mapping =
 {
   NULL,
@@ -396,3 +449,9 @@ const ASM_MAPPINGS asm_gas_mapping =
   NULL,
   _gas_mapping
 };
+
+const ASM_MAPPINGS asm_a390_mapping =
+{
+  NULL,
+  _a390_mapping
+};
index 2ebefe13c2a5f5642c2401ddeae647cf1714f125..1e242fa2dcda99b403ffa7d2c8791a9a823f1d27 100644 (file)
--- a/src/asm.h
+++ b/src/asm.h
@@ -26,6 +26,7 @@ struct _ASM_MAPPINGS
  */
 extern const ASM_MAPPINGS asm_asxxxx_mapping;
 extern const ASM_MAPPINGS asm_gas_mapping;
+extern const ASM_MAPPINGS asm_a390_mapping;
 
 /** Last entry has szKey = NULL.
  */