From 3fcc2d265f1521c2dcae0734de355962cc6cd7a0 Mon Sep 17 00:00:00 2001 From: Xavier ASUS Date: Mon, 21 Oct 2019 00:22:00 +0200 Subject: More work on GNU as generation On _gas_mapping, label definitions do not allow "::". ":" must be used instead. gasOutput is now part of "options". Unneeded sections, such as HOME/GSINIT/etc., are no longer declared and/or defined. GNU as just does not need them. Startup function name must equal "_start" for GNU ld. The value of some macros, such as CODE_NAME or DATA_NAME, must change according to options.gasOutput, as "CODE" or "DATA" (among many others) are not understood by GNU as. STM8 port now selects GNU as format on --gas switch enabled. --- src/SDCCmem.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/SDCCmem.c') diff --git a/src/SDCCmem.c b/src/SDCCmem.c index 550ee38..c1d8721 100644 --- a/src/SDCCmem.c +++ b/src/SDCCmem.c @@ -145,7 +145,7 @@ initMem () DEBUG-NAME - 'C' POINTER-TYPE - CPOINTER */ - code = allocMap (0, 1, 0, 0, 0, 1, options.code_loc, CODE_NAME, 'C', CPOINTER); + code = allocMap (0, 1, 0, 0, 0, 1, options.code_loc, DATA_NAME, 'C', CPOINTER); /* home segment ; SFRSPACE - NO @@ -223,13 +223,13 @@ initMem () if (OVERLAY_NAME) overlay = allocMap (0, 0, 0, 1, 0, 0, options.data_loc, DATA_NAME, 'E', POINTER); - /* Xternal paged segment ; + /* Xternal paged segment ; SFRSPACE - NO FAR-SPACE - NO PAGED - YES DIRECT-ACCESS - NO BIT-ACCESS - NO - CODE-ACCESS - NO + CODE-ACCESS - NO DEBUG-NAME - 'P' POINTER-TYPE - PPOINTER */ @@ -664,7 +664,7 @@ allocParms (value *val, bool smallc) } else /* use internal stack */ { - + SPEC_OCLS (lval->etype) = SPEC_OCLS (lval->sym->etype) = istack; if ((port->stack.direction > 0) != smallc) { @@ -1048,7 +1048,7 @@ clearStackOffsets (void) sym = setNextItem (istack->syms)) { const int size = getSize (sym->type); - + /* nothing to do with parameters so continue */ if ((sym->_isparm && !IS_REGPARM (sym->etype))) continue; @@ -1093,7 +1093,7 @@ redoStackOffsets (void) /* Remove them all, and let btree_alloc() below put them back in more efficiently. */ currFunc->stack -= size; SPEC_STAK (currFunc->etype) -= size; - + if(IS_AGGREGATE (sym->type) || sym->allocreq) btree_add_symbol (sym); } -- cgit v1.2.3