Oops
[fw/sdcc] / src / avr / main.c
index c38e00a94ae3531bf7c5ae4491e5b095aa7e65d3..5d5a323716eadfc806049c7a1cfb554e0dcfbc6b 100644 (file)
@@ -38,7 +38,7 @@ static int regParmFlg = 0;    /* determine if we can register a parameter */
 static void
 _avr_init (void)
 {
-       asm_addTree (&asm_gas_mapping);
+       asm_addTree (&asm_asxxxx_mapping);
 }
 
 static void
@@ -138,35 +138,44 @@ _avr_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts)
     MUST be terminated with a NULL.
 */
 static const char *_linkCmd[] = {
-       "avr-ld", "", "$1", NULL
+       "linkavr", "", "\"$1\"", NULL
 };
 
+/* $3 is replaced by assembler.debug_opts resp. port->assembler.plain_opts */
 static const char *_asmCmd[] = {
-       "avr-as", "", "$1.asm", NULL
+       "asavr", "$l" , "$3", "\"$1.s\"", NULL
 };
 
 /* Globals */
 PORT avr_port = {
+        TARGET_ID_AVR,
        "avr",
        "ATMEL AVR",            /* Target name */
+       NULL,                   /* processor */
        {
+         glue,
         TRUE,                  /* Emit glue around main */
         MODEL_LARGE | MODEL_SMALL,
         MODEL_SMALL},
        {
         _asmCmd,
-        "-plosgffc",           /* Options with debug */
+         NULL,
+        "-plosgff",            /* Options with debug */
         "-plosgff",            /* Options without debug */
-        0},
+        0,
+       ".s",
+        NULL,                  /* no do_assemble */
+       },
        {
         _linkCmd,
+         NULL,
         NULL,
         ".rel"},
        {
         _defaultRules},
        {
         /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
-        1, 1, 2, 4, 2, 2, 3, 1, 4, 4},
+        1, 2, 2, 4, 2, 2, 3, 1, 4, 4},
        {
         "XSEG",
         "STACK",
@@ -180,28 +189,37 @@ PORT avr_port = {
         "OSEG",
         "GSFINAL",
         "HOME",
+        NULL, // initialized xdata
+        NULL, // a code copy of xiseg
         NULL,
         NULL,
         0,
         },
+        { NULL, NULL },
        {
         -1, 1, 4, 1, 1, 0},
        /* avr has an 8 bit mul */
        {
-        1, 0},
+          1, -1
+        },
        "_",
        _avr_init,
        _avr_parseOptions,
+       NULL,
        _avr_finaliseOptions,
        _avr_setDefaultOptions,
        avr_assignRegisters,
        _avr_getRegName,
        _avr_keywords,
        _avr_genAssemblerPreamble,
+       NULL,                           /* no genAssemblerEnd */
        _avr_genIVT,
+       NULL, // _avr_genXINIT
        _avr_reset_regparm,
        _avr_regparm,
+        NULL,
        NULL,
+        NULL,
        FALSE,
        0,                      /* leave lt */
        1,                      /* transform gt ==> not le */
@@ -209,5 +227,11 @@ PORT avr_port = {
        0,                      /* leave ge */
        0,                      /* leave !=  */
        0,                      /* leave == */
+       FALSE,                  /* No array initializer support. */
+       0,                      /* no CSE cost estimation yet */
+       NULL,                   /* no builtin functions */
+       GPOINTER,               /* treat unqualified pointers as "generic" pointers */
+       1,                      /* reset labelKey to 1 */
+       1,                      /* globals & local static allowed */
        PORT_MAGIC
 };