* .version: changed to version 2.5.3
[fw/sdcc] / src / pic / main.c
index 2d5fedb5ab9b5836cda4ac5c7fe38be3c4be0b95..7ff316565e1eebe43d8effb9f3952269c232ebda 100644 (file)
@@ -23,33 +23,33 @@ static char _defaultRules[] =
 static char *_pic14_keywords[] =
 {
        "at",
-               "bit",
-               "code",
-               "critical",
-               "data",
-               "far",
-               "idata",
-               "interrupt",
-               "near",
-               "pdata",
-               "reentrant",
-               "sfr",
-               "sbit",
-               "using",
-               "xdata",
-               "_data",
-               "_code",
-               "_generic",
-               "_near",
-               "_xdata",
-               "_pdata",
-               "_idata",
-               NULL
+       "bit",
+       "code",
+       "critical",
+       "data",
+       "far",
+       "idata",
+       "interrupt",
+       "near",
+       "pdata",
+       "reentrant",
+       "sfr",
+       "sbit",
+       "using",
+       "xdata",
+       "_data",
+       "_code",
+       "_generic",
+       "_near",
+       "_xdata",
+       "_pdata",
+       "_idata",
+       NULL
 };
 
 void  pCodeInitRegisters(void);
 
-void pic14_assignRegisters (eBBlock ** ebbs, int count);
+void pic14_assignRegisters (ebbIndex *);
 
 /* Also defined in gen.h, but the #include is commented out */
 /* for an unknowned reason. - EEP */
@@ -65,13 +65,13 @@ _pic14_init (void)
 }
 
 static void
-_pic14_reset_regparm ()
+_pic14_reset_regparm (void)
 {
        regParmFlg = 0;
 }
 
 static int
-_pic14_regparm (sym_link * l)
+_pic14_regparm (sym_link * l, bool reentrant)
 {
 /* for this processor it is simple
        can pass only the first parameter in a register */
@@ -379,7 +379,7 @@ MUST be terminated with a NULL.
 */
 static const char *_linkCmd[] =
 {
-       "gplink", "-o $2", "\"$1.o\"", "$l", NULL
+       "gplink", "$l", "-o \"$2\"", "\"$1\"", "$3", NULL
 };
 
 static const char *_asmCmd[] =
@@ -436,6 +436,7 @@ PORT pic_port =
                "code",
                "DSEG    (DATA)",
                "ISEG    (DATA)",
+               NULL, /* pdata */
                "XSEG    (XDATA)",
                "BSEG    (BIT)",
                "RSEG    (DATA)",
@@ -445,6 +446,7 @@ PORT pic_port =
                "HOME    (CODE)",
                NULL, // xidata
                NULL, // xinit
+               "CONST   (CODE)",               // const_name - const data (code or not)
                NULL,
                NULL,
                1        // code is read only
@@ -460,10 +462,21 @@ PORT pic_port =
        {
                pic14_emitDebuggerSymbol
        },
+       {
+               255/3,      /* maxCount */
+               3,          /* sizeofElement */
+               /* The rest of these costs are bogus. They approximate */
+               /* the behavior of src/SDCCicode.c 1.207 and earlier.  */
+               {4,4,4},    /* sizeofMatchJump[] */
+               {0,0,0},    /* sizeofRangeCompare[] */
+               0,          /* sizeofSubtract */
+               3,          /* sizeofDispatch */
+       },
        "_",
        _pic14_init,
        _pic14_parseOptions,
        NULL,
+       NULL,
        _pic14_finaliseOptions,
        _pic14_setDefaultOptions,
        pic14_assignRegisters,