a) fixed some aliasing problems
[fw/sdcc] / src / mcs51 / main.c
index 0d34e392dcf2c23c0fc55f9721e8477919768f11..843bb0ff7998b2e666222eeeb60c3e2d04328270 100644 (file)
@@ -1,7 +1,41 @@
+/** @file main.c
+    mcs51 specific general functions.
+
+    Note that mlh prepended _mcs51_ on the static functions.  Makes
+    it easier to set a breakpoint using the debugger.
+*/
 #include "common.h"
 #include "main.h"
 #include "ralloc.h"
 
+/* list of key words used by msc51 */
+static char *_mcs51_keywords[] =     {
+    "at",
+    "bit",
+    "code",
+    "critical",
+    "data",
+    "far",
+    "idata",
+    "interrupt",
+    "near",
+    "pdata",
+    "reentrant",
+    "sfr",
+    "sbit",
+    "using",
+    "xdata",
+    "_data",
+    "_code",
+    "_generic",
+    "_near",
+    "_xdata",
+    "_pdata",
+    "_idata",
+    NULL
+};
+
+
 void mcs51_assignRegisters (eBBlock **ebbs, int count);
 
 static bool _mcs51_parseOptions(int *pargc, char **argv)
@@ -41,8 +75,20 @@ PORT mcs51_port = {
        /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
        1, 1, 2, 4, 1, 2, 3, 1, 4, 4
     },
+    {
+       "XSEG    (XDATA)",
+       "STACK   (DATA)",
+       "CSEG    (CODE)",
+       "DSEG    (DATA)",
+       "ISEG    (DATA)",
+       "XSEG    (XDATA)",
+       "BSEG    (BIT)",
+       "RSEG    (DATA)",
+       "GSINIT  (CODE)",
+       "OSEG    (OVR,DATA)"
+    },
     { 
-       +1, 1, 4, 0, 0
+       +1, 1, 4, 1, 1
     },
     /* mcs51 has an 8 bit mul */
     {
@@ -52,6 +98,7 @@ PORT mcs51_port = {
     _mcs51_finaliseOptions,
     _mcs51_setDefaultOptions,
     mcs51_assignRegisters,
-    _mcs51_getRegName
-};
+    _mcs51_getRegName ,
+    _mcs51_keywords
 
+};