Add warning for using --model-flat24
[fw/sdcc] / src / mcs51 / main.c
index e480975e3c763058407a4f727e8c66470d6b2630..d9939d054d3b18892e53ae18dc088bd42d76c157 100644 (file)
@@ -82,6 +82,11 @@ static void _mcs51_finaliseOptions(void)
      */
     if (options.model == MODEL_FLAT24)
     {
+       
+       fprintf(stderr, "*** WARNING: you should use the '-mds390' option "
+                       "for DS80C390 support. This code generator is "
+                       "badly out of date and probably broken.\n");
+       
         port->s.fptr_size = 3;
         port->s.gptr_size = 4;
         port->stack.isr_overhead++;   /* Will save dpx on ISR entry. */
@@ -96,7 +101,7 @@ static void _mcs51_finaliseOptions(void)
         fReturnSize = 5;
     } 
 
-    if (options.model) {
+    if (options.model == MODEL_LARGE) {
        port->mem.default_local_map = xdata;
        port->mem.default_globl_map = xdata;
     } else {
@@ -197,14 +202,19 @@ PORT mcs51_port = {
     "MCU 8051",                        /* Target name */
     {
        TRUE,                   /* Emit glue around main */
+       MODEL_SMALL | MODEL_LARGE | MODEL_FLAT24,
+       MODEL_SMALL
     },
     {  
        _asmCmd,
        "-plosgffc",            /* Options with debug */
        "-plosgff",             /* Options without debug */
+       0
     },
     {
-       _linkCmd
+       _linkCmd,
+       NULL,
+       ".rel"
     },
     {
        _defaultRules
@@ -225,16 +235,17 @@ PORT mcs51_port = {
        "GSINIT  (CODE)",
        "OSEG    (OVR,DATA)",
        "GSFINAL (CODE)",
+       "HOME    (CODE)",
        NULL,
        NULL,
        1
     },
     { 
-       +1, 1, 4, 1, 1
+       +1, 1, 4, 1, 1, 0
     },
     /* mcs51 has an 8 bit mul */
     {
-       1
+       1, 0
     },
     "_",
     _mcs51_init,