diff options
Diffstat (limited to 'src/stm8/main.c')
-rw-r--r-- | src/stm8/main.c | 224 |
1 files changed, 112 insertions, 112 deletions
diff --git a/src/stm8/main.c b/src/stm8/main.c index b1bc1b0cf..9c2a204c1 100644 --- a/src/stm8/main.c +++ b/src/stm8/main.c @@ -293,125 +293,125 @@ static const char *const _libs_stm8[] = { "stm8", NULL, }; PORT stm8_port = { - TARGET_ID_STM8, - "stm8", - "STM8", /* Target name */ - NULL, /* Processor name */ - { - glue, - TRUE, /* We want stm8_genIVT to be triggered */ - NO_MODEL, - NO_MODEL, - NULL, /* model == target */ + .id = TARGET_ID_STM8, + .target = "stm8", + .target_name = "STM8", /* Target name */ + .processor = NULL, /* Processor name */ + .general = { + .do_glue = glue, + .glue_up_main = TRUE, /* We want stm8_genIVT to be triggered */ + .supported_models = NO_MODEL, + .default_model = NO_MODEL, + .get_model = NULL, /* model == target */ }, - { /* Assembler */ - stm8AsmCmd, - NULL, - "-plosgffwy", /* Options with debug */ - "-plosgffw", /* Options without debug */ - 0, - ".asm" + .assembler = { /* Assembler */ + .cmd = stm8AsmCmd, + .mcmd = NULL, + .debug_opts = "-plosgffwy", /* Options with debug */ + .plain_opts = "-plosgffw", /* Options without debug */ + .externGlobal = 0, + .file_ext = ".asm", }, - { /* Linker */ - _linkCmd, - NULL, //LINKCMD, - NULL, - ".rel", - 1, - NULL, /* crt */ - _libs_stm8, /* libs */ + .linker = { /* Linker */ + .cmd = _linkCmd, + .mcmd = NULL, //LINKCMD, + .do_link = NULL, + .rel_ext = ".rel", + .needLinkerScript = 1, + .crt = NULL, /* crt */ + .libs = _libs_stm8, /* libs */ }, - { /* Peephole optimizer */ - stm8_defaultRules, - stm8instructionSize, - NULL, - NULL, - NULL, - stm8notUsed, - stm8canAssign, - stm8notUsedFrom, - NULL, + .peep = { /* Peephole optimizer */ + .default_rules = stm8_defaultRules, + .getSize = stm8instructionSize, + .getRegsRead = NULL, + .getRegsWritten = NULL, + .deadMove = NULL, + .notUsed = stm8notUsed, + .canAssign = stm8canAssign, + .notUsedFrom = stm8notUsedFrom, + .symmParmStack = NULL, }, /* Sizes: char, short, int, long, long long, ptr, fptr, gptr, bit, float, max */ - { 1, 2, 2, 4, 8, 2, 2, 2, 1, 4, 4 }, + .s = { 1, 2, 2, 4, 8, 2, 2, 2, 1, 4, 4 }, /* tags for generic pointers */ - { 0x00, 0x40, 0x60, 0x80 }, /* far, near, xstack, code */ - { - "XSEG", - "STACK", - "CODE", - "DATA", - NULL, /* idata */ - NULL, /* pdata */ - NULL, /* xdata */ - NULL, /* bit */ - "RSEG (ABS)", - "GSINIT", /* static initialization */ - NULL, /* overlay */ - "GSFINAL", - "HOME", - NULL, /* xidata */ - NULL, /* xinit */ - NULL, /* const_name */ - "CABS (ABS)", /* cabs_name */ - "DABS (ABS)", /* xabs_name */ - NULL, /* iabs_name */ - "INITIALIZED", /* name of segment for initialized variables */ - "INITIALIZER", /* name of segment for copies of initialized variables in code space */ - NULL, - NULL, - 1 /* CODE is read-only */ + .gp_tags = { 0x00, 0x40, 0x60, 0x80 }, /* far, near, xstack, code */ + .mem = { + .xstack_name = "XSEG", + .istack_name = "STACK", + .code_name = "CODE", + .data_name = "DATA", + .idata_name = NULL, /* idata */ + .pdata_name = NULL, /* pdata */ + .xdata_name = NULL, /* xdata */ + .bit_name = NULL, /* bit */ + .reg_name = "RSEG (ABS)", + .static_name = "GSINIT", /* static initialization */ + .overlay_name = NULL, /* overlay */ + .post_static_name = "GSFINAL", + .home_name = "HOME", + .xidata_name = NULL, /* xidata */ + .xinit_name = NULL, /* xinit */ + .const_name = NULL, /* const_name */ + .cabs_name = "CABS (ABS)", /* cabs_name */ + .xabs_name = "DABS (ABS)", /* xabs_name */ + .iabs_name = NULL, /* iabs_name */ + .initialized_name = "INITIALIZED", /* name of segment for initialized variables */ + .initializer_name = "INITIALIZER", /* name of segment for copies of initialized variables in code space */ + .default_local_map = NULL, + .default_globl_map = NULL, + .code_ro = 1 /* CODE is read-only */ }, - { NULL, NULL }, - { -1, 0, 7, 2, 0, 2 }, /* stack information */ + .extraAreas = { NULL, NULL }, + .stack = { -1, 0, 7, 2, 0, 2 }, /* stack information */ /* Use more fine-grained control for multiplication / division. */ - { 0, -1 }, - { stm8_emitDebuggerSymbol }, - { - 32767, /* maxCount */ - 2, /* sizeofElement */ - {4, 5, 5}, /* sizeofMatchJump[] - assuming operand in reg, inverse can be optimized away - would be much higher otherwise */ - {4, 5, 5}, /* sizeofRangeCompare[] - same as above */ - 3, /* sizeofSubtract - assuming 2 byte index, would be 2 otherwise */ - 5, /* sizeofDispatch - 1 byte for sllw followed by 3 bytes for ldw x, (..., X) and 2 byte for jp (x) */ + .support = { 0, -1 }, + .debugger = { .emitDebuggerSymbol = stm8_emitDebuggerSymbol }, + .jumptableCost = { + .maxCount = 32767, /* maxCount */ + .sizeofElement = 2, /* sizeofElement */ + .sizeofMatchJump = {4, 5, 5}, /* sizeofMatchJump[] - assuming operand in reg, inverse can be optimized away - would be much higher otherwise */ + .sizeofRangeCompare = {4, 5, 5}, /* sizeofRangeCompare[] - same as above */ + .sizeofSubtract = 3, /* sizeofSubtract - assuming 2 byte index, would be 2 otherwise */ + .sizeofDispatch = 5, /* sizeofDispatch - 1 byte for sllw followed by 3 bytes for ldw x, (..., X) and 2 byte for jp (x) */ }, - "_", - stm8_init, - stm8_parseOptions, - stm8_options, - NULL, - stm8_finaliseOptions, - stm8_setDefaultOptions, - stm8_assignRegisters, - stm8_getRegName, - NULL, - stm8_keywords, - NULL, - NULL, /* no genAssemblerEnd */ - stm8_genIVT, - 0, /* no genXINIT code */ - stm8_genInitStartup, /* genInitStartup */ - stm8_reset_regparm, - stm8_reg_parm, - stm8_process_pragma, /* process_pragma */ - NULL, /* getMangledFunctionName */ - _hasNativeMulFor, /* hasNativeMulFor */ - hasExtBitOp, /* hasExtBitOp */ - NULL, /* oclsExpense */ - TRUE, - FALSE, /* little endian */ - 0, /* leave lt */ - 0, /* leave gt */ - 1, /* transform <= to ! > */ - 1, /* transform >= to ! < */ - 1, /* transform != to !(a == b) */ - 0, /* leave == */ - FALSE, /* Array initializer support. */ - 0, /* no CSE cost estimation yet */ - NULL, /* builtin functions */ - GPOINTER, /* treat unqualified pointers as "generic" pointers */ - 1, /* reset labelKey to 1 */ - 1, /* globals & local statics allowed */ - 5, /* Number of registers handled in the tree-decomposition-based register allocator in SDCCralloc.hpp */ - PORT_MAGIC + .fun_prefix = "_", + .init = stm8_init, + .parseOption = stm8_parseOptions, + .poptions = stm8_options, + .initPaths = NULL, + .finaliseOptions = stm8_finaliseOptions, + .setDefaultOptions = stm8_setDefaultOptions, + .assignRegisters = stm8_assignRegisters, + .getRegName = stm8_getRegName, + .rtrackUpdate = NULL, + .keywords = stm8_keywords, + .genAssemblerPreamble = NULL, + .genAssemblerEnd = NULL, /* no genAssemblerEnd */ + .genIVT = stm8_genIVT, + .genXINIT = NULL, /* no genXINIT code */ + .genInitStartup = stm8_genInitStartup, /* genInitStartup */ + .reset_regparms = stm8_reset_regparm, + .reg_parm = stm8_reg_parm, + .process_pragma = stm8_process_pragma, /* process_pragma */ + .getMangledFunctionName = NULL, /* getMangledFunctionName */ + .hasNativeMulFor = _hasNativeMulFor, /* hasNativeMulFor */ + .hasExtBitOp = hasExtBitOp, /* hasExtBitOp */ + .oclsExpense = NULL, /* oclsExpense */ + .use_dw_for_init = TRUE, + .little_endian = FALSE, /* little endian */ + .lt_nge = 0, /* leave lt */ + .gt_nle = 0, /* leave gt */ + .le_ngt = 1, /* transform <= to ! > */ + .ge_nlt = 1, /* transform >= to ! < */ + .ne_neq = 1, /* transform != to !(a == b) */ + .eq_nne = 0, /* leave == */ + .arrayInitializerSuppported = FALSE, /* Array initializer support. */ + .cseOk = 0, /* no CSE cost estimation yet */ + .builtintable = NULL, /* builtin functions */ + .unqualified_pointer = GPOINTER, /* treat unqualified pointers as "generic" pointers */ + .reset_labelKey = 1, /* reset labelKey to 1 */ + .globals_allowed = 1, /* globals & local statics allowed */ + .num_regs = 5, /* Number of registers handled in the tree-decomposition-based register allocator in SDCCralloc.hpp */ + .magic = PORT_MAGIC }; |