*** empty log message ***
authorRichard Stallman <rms@gnu.org>
Sat, 28 Mar 1992 06:19:35 +0000 (06:19 +0000)
committerRichard Stallman <rms@gnu.org>
Sat, 28 Mar 1992 06:19:35 +0000 (06:19 +0000)
From-SVN: r608

gcc/config/ns32k/ns32k.c
gcc/config/ns32k/ns32k.md
gcc/config/ns32k/sequent.h

index c04b8b86b21f0b0502b63b599f2caed0d34e2798..0cb876cfa309e8a04dea325342556071d47c0137 100644 (file)
@@ -382,12 +382,15 @@ print_operand (file, x, code)
   else if (GET_CODE (x) == MEM)
     {
       rtx tmp = XEXP (x, 0);
-#ifndef PC_RELATIVE
-      if (GET_CODE (tmp) == SYMBOL_REF || GET_CODE (tmp) == LABEL_REF)
+#if ! (defined (PC_RELATIVE) || defined (NO_ABSOLUTE_PREFIX_IF_SYMBOLIC))
+      if (GET_CODE (tmp) != CONST_INT)
        {
          char *out = XSTR (tmp, 0);
          if (out[0] == '*')
-           fprintf (file, "@%s", &out[1]);
+           {
+             PUT_ABSOLUTE_PREFIX (file);
+             fprintf (file, "%s", &out[1]);
+           }
          else
            ASM_OUTPUT_LABELREF (file, out);
        }
@@ -404,7 +407,7 @@ print_operand (file, x, code)
          PUT_IMMEDIATE_PREFIX(file);
 #ifdef SEQUENT_ASM
          /* Sequent likes it's floating point constants as integers */
-         fprintf (file, "0Dx%08x%08x", u.i[1], u.i[0])l
+         fprintf (file, "0Dx%08x%08x", u.i[1], u.i[0]);
 #else
 #ifdef ENCORE_ASM
          fprintf (file, "0f%.20e", u.d); 
@@ -417,7 +420,7 @@ print_operand (file, x, code)
        { 
          union { double d; int i[2]; } u;
          u.i[0] = CONST_DOUBLE_LOW (x); u.i[1] = CONST_DOUBLE_HIGH (x);
-         PUT_IMMEDIATE_PREFIX(file);
+         PUT_IMMEDIATE_PREFIX (file);
 #ifdef SEQUENT_ASM
          {
            union { float f; long l; } uu;
@@ -530,12 +533,24 @@ print_operand_address (file, addr)
     }
   if (! offset)
     offset = const0_rtx;
+
+#ifdef INDEX_RATHER_THAN_BASE
+  /* This is a re-implementation of the SEQUENT_ADDRESS_BUG fix.  */
+  if (base && !indexexp && GET_CODE (base) == REG
+      && REG_OK_FOR_INDEX_P (REGNO (base))
+    {
+      indexexp = base;
+      base = 0;
+    }
+#endif
+
   /* now, offset, base and indexexp are set */
   if (! base)
     {
 #if defined (PC_RELATIVE) || defined (NO_ABSOLUTE_PREFIX_IF_SYMBOLIC)
-      if (! (GET_CODE (offset) == LABEL_REF
-            || GET_CODE (offset) == SYMBOL_REF))
+      if (GET_CODE (offset) == CONST_INT)
+/*      if (! (GET_CODE (offset) == LABEL_REF
+            || GET_CODE (offset) == SYMBOL_REF)) */
 #endif
        PUT_ABSOLUTE_PREFIX (file);
     }
@@ -546,7 +561,7 @@ print_operand_address (file, addr)
       {
        /* now we must output base.  Possible alternatives are:
           (rN)       (REG ...)
-          (sp) (REG ...)
+          (sp)       (REG ...)
           (fp)       (REG ...)
           (pc)       (REG ...)  used for SYMBOL_REF and LABEL_REF, output
           (disp(fp)) (MEM ...)       just before possible [rX:y]
index b0efe4fe5ebd0445dc3bfdd6355c50f6c1f373e5..faeade9fb986148e1d9d26f4f0d360d2f2f638e6 100644 (file)
     return \"movf %1,%0\";
 #endif
 /* There was a #if 0 around this, but that was erroneous
-   for anything bug GAS syntax -- rms.  */
-#ifndef GAS_SYNTAX
+   for many machines -- rms.  */
+#ifndef MOVD_FLOAT_OK
   /* GAS understands floating constants in ordinary movd instructions
      but other assemblers might object.  */
   else if (GET_CODE (operands[1]) == CONST_DOUBLE)
       rtx temp = XEXP (operands[0], 0);
       if (CONSTANT_ADDRESS_P (temp))
        {
-#ifdef GAS_SYNTAX
+#ifdef CALL_MEMREF_IMPLICIT
          operands[0] = temp;
          return \"bsr %0\";
 #else
 #endif
        }
       if (GET_CODE (XEXP (operands[0], 0)) == REG)
-#if defined (GNX_V3) || defined (GAS_SYNTAX)
+#if defined (GNX_V3) || defined (CALL_MEMREF_IMPLICIT)
        return \"jsr %0\";
 #else
         return \"jsr %a0\";
       rtx temp = XEXP (operands[1], 0);
       if (CONSTANT_ADDRESS_P (temp))
        {
-#ifdef GAS_SYNTAX
+#ifdef CALL_MEMREF_IMPLICIT
          operands[1] = temp;
          return \"bsr %1\";
 #else
 #endif
        }
       if (GET_CODE (XEXP (operands[1], 0)) == REG)
-#if defined (GNX_V3) || defined (GAS_SYNTAX)
+#if defined (GNX_V3) || defined (CALL_MEMREF_IMPLICIT)
        return \"jsr %1\";
 #else
         return \"jsr %a1\";
index f03a0f6a8d6490431685f7010c6e71c4a63f5ea1..af6e891ae843120a858ea32cdfcd93f51e00828a 100644 (file)
@@ -58,3 +58,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define IMMEDIATE_PREFIX 0
 
 #define SEQUENT_ASM
+
+/* Operand of bsr or jsr should be just the address.  */
+
+#define CALL_MEMREF_IMPLICIT
+
+/* Output a reg as an index rather than a base if we have the choice.  */
+
+#define INDEX_RATHER_THAN_BASE