-PORT mcs51_port = {
- "mcs51",
- "MCU 8051", /* Target name */
- {
- TRUE, /* Emit glue around main */
- },
- {
- _asmCmd,
- "-plosgffc", /* Options with debug */
- "-plosgff", /* Options without debug */
- },
- {
- _linkCmd
- },
- {
- _defaultRules
- },
- {
- /* 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)",
- "GSFINAL (CODE)"
- },
- {
- +1, 1, 4, 1, 1
- },
- /* mcs51 has an 8 bit mul */
- {
- 1
- },
- NULL,
- _mcs51_parseOptions,
- _mcs51_finaliseOptions,
- _mcs51_setDefaultOptions,
- mcs51_assignRegisters,
- _mcs51_getRegName ,
- _mcs51_keywords,
- _mcs51_genAssemblerPreamble,
- _mcs51_genIVT
+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,
+ NULL,
+ "-plosgff", /* Options with debug */
+ "-plosgff", /* Options without debug */
+ 0,
+ ".s",
+ NULL, /* no do_assemble */
+ },
+ {
+ _linkCmd,
+ NULL,
+ NULL,
+ ".rel",
+ 1},
+ {
+ _defaultRules},
+ {
+ /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
+ 1, 2, 2, 4, 2, 2, 3, 1, 4, 4},
+
+ /* tags for generic pointers */
+ { 0x00, 0x40, 0x60, 0x80 }, /* far, near, xstack, code */
+
+ {
+ "XSEG",
+ "STACK",
+ "CSEG",
+ "DSEG",
+ "ISEG",
+ NULL, //PSEG
+ "XSEG",
+ "BSEG",
+ "RSEG",
+ "GSINIT",
+ "OSEG",
+ "GSFINAL",
+ "HOME",
+ NULL, // initialized xdata
+ NULL, // a code copy of xiseg
+ "CONST (CODE)", // const_name - const data (code or not)
+ "CABS (ABS,CODE)", // cabs_name - const absolute data (code or not)
+ "XABS (ABS,XDATA)", // xabs_name - absolute xdata/pdata
+ "IABS (ABS,DATA)", // iabs_name - absolute idata/data
+ NULL,
+ NULL,
+ 0,
+ },
+ { NULL, NULL },
+ {
+ -1, 1, 4, 1, 1, 0},
+ /* avr has an 8 bit mul */
+ {
+ 1, -1
+ },
+ {
+ avr_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 */
+ },
+ "_",
+ _avr_init,
+ _avr_parseOptions,
+ NULL,
+ NULL,
+ _avr_finaliseOptions,
+ _avr_setDefaultOptions,
+ avr_assignRegisters,
+ _avr_getRegName,
+ _avr_keywords,
+ _avr_genAssemblerPreamble,
+ NULL, /* no genAssemblerEnd */
+ _avr_genIVT,
+ NULL, // _avr_genXINIT
+ NULL, /* genInitStartup */
+ _avr_reset_regparm,
+ _avr_regparm,
+ NULL,
+ NULL,
+ NULL,
+ hasExtBitOp, /* hasExtBitOp */
+ oclsExpense, /* oclsExpense */
+ FALSE,
+ TRUE, /* little endian */
+ 0, /* leave lt */
+ 1, /* transform gt ==> not le */
+ 0, /* leave le */
+ 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