* src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through...
[fw/sdcc] / src / mcs51 / main.c
index 2e85421e4d71e1c6a64c46fab69bcadc8cef2925..8731cfb791a312f57f9deedf8660dcd3e2c69d2f 100644 (file)
@@ -39,6 +39,7 @@ static char *_mcs51_keywords[] =
   "_xdata",
   "_pdata",
   "_idata",
+  "_naked",
   NULL
 };
 
@@ -83,8 +84,7 @@ _mcs51_parseOptions (int *pargc, char **argv, int *i)
 static void
 _mcs51_finaliseOptions (void)
 {
-  if (options.model == MODEL_LARGE)
-    {
+  if (options.model == MODEL_LARGE) {
       port->mem.default_local_map = xdata;
       port->mem.default_globl_map = xdata;
     }
@@ -128,12 +128,13 @@ _mcs51_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts)
 */
 static const char *_linkCmd[] =
 {
-  "aslink", "-nf", "$1", NULL
+  "{bindir}{sep}aslink", "-nf", "$1", NULL
 };
 
+/* $3 is replaced by assembler.debug_opts resp. port->assembler.plain_opts */
 static const char *_asmCmd[] =
 {
-  "asx8051", "-plosgffc", "$1.asm", NULL
+  "asx8051", "$l", "$3", "$1.asm", NULL
 };
 
 /* Globals */
@@ -149,13 +150,16 @@ PORT mcs51_port =
   },
   {
     _asmCmd,
+    NULL,
     "-plosgffc",               /* Options with debug */
     "-plosgff",                        /* Options without debug */
-    0
+    0,
+    ".asm"
   },
   {
     _linkCmd,
     NULL,
+    NULL,
     ".rel"
   },
   {
@@ -163,7 +167,7 @@ PORT mcs51_port =
   },
   {
        /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
-    1, 1, 2, 4, 1, 2, 3, 1, 4, 4
+    1, 2, 2, 4, 1, 2, 3, 1, 4, 4
   },
   {
     "XSEG    (XDATA)",
@@ -187,7 +191,7 @@ PORT mcs51_port =
   },
     /* mcs51 has an 8 bit mul */
   {
-    1, 0
+    1, -1
   },
   "_",
   _mcs51_init,
@@ -202,6 +206,7 @@ PORT mcs51_port =
   _mcs51_reset_regparm,
   _mcs51_regparm,
   NULL,
+  NULL,
   FALSE,
   0,                           /* leave lt */
   0,                           /* leave gt */
@@ -209,5 +214,6 @@ PORT mcs51_port =
   1,                           /* transform >= to ! < */
   1,                           /* transform != to !(a == b) */
   0,                           /* leave == */
+  FALSE,                        /* No array initializer support. */
   PORT_MAGIC
 };