From: kbongers Date: Thu, 30 Aug 2001 17:36:18 +0000 (+0000) Subject: Change IS_DS390 to .model=FLAT24 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=13f2f0bb5a09a9bb7611c2dc559653349c2bd986;p=fw%2Fsdcc Change IS_DS390 to .model=FLAT24 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1194 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCcse.c b/src/SDCCcse.c index 52bd5593..1420b8ff 100644 --- a/src/SDCCcse.c +++ b/src/SDCCcse.c @@ -1228,7 +1228,8 @@ fixUpTypes (iCode * ic) { sym_link *t1 = operandType (IC_LEFT (ic)), *t2; - if (TARGET_IS_DS390) + /* if (TARGET_IS_DS390) */ + if (options.model == MODEL_FLAT24) { /* hack-o-matic! */ return; diff --git a/src/SDCCglue.c b/src/SDCCglue.c index f378ab1a..523bbc30 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -459,7 +459,8 @@ pointerTypeToGPByte (const int p_type, const char *iname, const char *oname) void _printPointerType (FILE * oFile, const char *name) { - if (TARGET_IS_DS390) + /* if (TARGET_IS_DS390) */ + if (options.model == MODEL_FLAT24) { fprintf (oFile, "\t.byte %s,(%s >> 8),(%s >> 16)", name, name, name); } diff --git a/src/SDCCicode.c b/src/SDCCicode.c index b5885e01..93892f78 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -1185,7 +1185,9 @@ operandFromSymbol (symbol * sym) /* under the following conditions create a register equivalent for a local symbol */ if (sym->level && sym->etype && SPEC_OCLS (sym->etype) && - (IN_FARSPACE (SPEC_OCLS (sym->etype)) && (!TARGET_IS_DS390)) && + (IN_FARSPACE (SPEC_OCLS (sym->etype)) && + /* (!TARGET_IS_DS390)) && */ + (!(options.model == MODEL_FLAT24)) ) && options.stackAuto == 0) ok = 0; @@ -1470,7 +1472,9 @@ geniCodeRValue (operand * op, bool force) if (IS_SPEC (type) && IS_TRUE_SYMOP (op) && - (!IN_FARSPACE (SPEC_OCLS (etype)) || TARGET_IS_DS390)) + (!IN_FARSPACE (SPEC_OCLS (etype)) || + /* TARGET_IS_DS390)) */ + (options.model == MODEL_FLAT24) )) { op = operandFromOperand (op); op->isaddr = 0; @@ -2709,7 +2713,8 @@ geniCodeReceive (value * args) if (IN_FARSPACE (SPEC_OCLS (sym->etype)) && options.stackAuto == 0 && - !TARGET_IS_DS390) + /* !TARGET_IS_DS390) */ + (!(options.model == MODEL_FLAT24)) ) { } else diff --git a/src/SDCCmain.c b/src/SDCCmain.c index a0cf598a..6f7f2edc 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -1078,11 +1078,13 @@ linkEdit (char **envp) /* standard library path */ if (!options.nostdlib) { +/**** if (TARGET_IS_DS390) { c = "ds390"; } else +*****/ { switch (options.model) { @@ -1093,7 +1095,8 @@ linkEdit (char **envp) c = "large"; break; case MODEL_FLAT24: - c = "flat24"; + /* c = "flat24"; */ + c = "ds390"; break; default: werror (W_UNKNOWN_MODEL, __FILE__, __LINE__); @@ -1104,7 +1107,8 @@ linkEdit (char **envp) fprintf (lnkfile, "-k %s/%s\n", SDCC_LIB_DIR /*STD_LIB_PATH */ , c); /* standard library files */ - if (strcmp (port->target, "ds390") == 0) + /* if (strcmp (port->target, "ds390") == 0) */ + if (options.model == MODEL_FLAT24) { fprintf (lnkfile, "-l %s\n", STD_DS390_LIB); }