Change IS_DS390 to .model=FLAT24
authorkbongers <kbongers@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 30 Aug 2001 17:36:18 +0000 (17:36 +0000)
committerkbongers <kbongers@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 30 Aug 2001 17:36:18 +0000 (17:36 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1194 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCcse.c
src/SDCCglue.c
src/SDCCicode.c
src/SDCCmain.c

index 52bd5593cbdb9884cfb5fb9e609076a164132afb..1420b8ffbfef486131d24a6b859c6446847d11d6 100644 (file)
@@ -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;
index f378ab1af21b51a0091d0704ed3e2228fe7fc3fa..523bbc300a2715e794d2e7be229a325ae4be35e8 100644 (file)
@@ -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);
     }
index b5885e01aff796a178133418581f622b462179e2..93892f78bb13b75c1058bb56bc2320c7fdf291d3 100644 (file)
@@ -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
index a0cf598a73f70970bcfd332fbbaccab0053505c7..6f7f2edc6797fb33f5eb1565865f70d241332e15 100644 (file)
@@ -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);
        }