]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
*** empty log message ***
authorMichael Meissner <meissner@gcc.gnu.org>
Tue, 28 Apr 1992 20:33:51 +0000 (20:33 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Tue, 28 Apr 1992 20:33:51 +0000 (20:33 +0000)
From-SVN: r849

gcc/config/mips/mips.c
gcc/config/mips/mips.h
gcc/config/mips/mips.md
gcc/config/mips/osfrose.h
gcc/mips-tfile.c

index f47d88f35edb0d36d270a2ecc860ba807c004b77..86f35e4195a84201f2c8b66715a4bb4070820798 100644 (file)
@@ -1662,16 +1662,21 @@ gen_int_relational (test_code, result, cmp0, cmp1, p_invert)
       cmp1 = temp;
     }
 
-  reg = (invert || eqne_p) ? gen_reg_rtx (SImode) : result;
-  emit_move_insn (reg, gen_rtx (p_info->test_code, SImode, cmp0, cmp1));
-
   if (test == ITEST_NE && GET_CODE (cmp1) == CONST_INT && INTVAL (cmp1) == 0)
+    reg = cmp0;
+  else
+    {
+      reg = (invert || eqne_p) ? gen_reg_rtx (SImode) : result;
+      emit_move_insn (reg, gen_rtx (p_info->test_code, SImode, cmp0, cmp1));
+    }
+
+  if (test == ITEST_NE)
     {
       emit_move_insn (result, gen_rtx (GTU, SImode, reg, const0_rtx));
       invert = FALSE;
     }
 
-  else if (eqne_p)
+  else if (test == ITEST_EQ)
     {
       reg2 = (invert) ? gen_reg_rtx (SImode) : result;
       emit_move_insn (reg2, gen_rtx (LTU, SImode, reg, const1_rtx));
@@ -3568,9 +3573,6 @@ mips_asm_file_start (stream)
   if (TARGET_ABICALLS)
     fprintf (stream, "\t.abicalls\n");
 
-  /* put gcc_compiled. in data, not text */
-  data_section ();
-
   if (TARGET_GP_OPT)
     {
       asm_out_data_file = stream;
index 284219ee500377c0cb7901a4fee76d4052f92d3c..0e89ad630948ed95e2059aaed2261a6f0fe308f8 100644 (file)
@@ -650,7 +650,7 @@ do {                                                        \
 #define MASK_DEBUG     0x40000000      /* Eliminate version # in .s file */
 #define MASK_DEBUG_A   0x20000000      /* don't allow <label>($reg) addrs */
 #define MASK_DEBUG_B   0x10000000      /* GO_IF_LEGITIMATE_ADDRESS debug */
-#define MASK_DEBUG_C   0x08000000      /* allow new seq, sne, etc. patterns */
+#define MASK_DEBUG_C   0x08000000      /* don't expand seq, etc. */
 #define MASK_DEBUG_D   0x04000000      /* don't do define_split's */
 #define MASK_DEBUG_E   0x02000000      /* function_arg debug */
 #define MASK_DEBUG_F   0x01000000      /* don't try to suppress load nop's */
index f4b7e05beb5f00079863119fe4f63c36adacdcb9..dfa514138c30cbd44866ab4a796067524c772636 100644 (file)
 (define_delay (eq_attr "type" "branch")
   [(and (eq_attr "dslot" "no") (eq_attr "length" "1"))
    (nil)
-   (eq_attr "branch_likely" "yes")])
+   (and (eq_attr "branch_likely" "yes") (and (eq_attr "dslot" "no") (eq_attr "length" "1")))])
 
 (define_delay (eq_attr "type" "call,jump")
   [(and (eq_attr "dslot" "no") (eq_attr "length" "1"))
@@ -1507,22 +1507,37 @@ move\\t%0,%z4\\n\\
 
 
 (define_insn "floatsidf2"
-  [(set (match_operand:DF 0 "register_operand" "=f")
-       (float:DF (match_operand:SI 1 "register_operand" "d")))]
+  [(set (match_operand:DF 0 "register_operand" "=f,f,f")
+       (float:DF (match_operand:SI 1 "nonimmediate_operand" "d,R,m")))]
   "TARGET_HARD_FLOAT"
-  "mtc1\\t%1,%0\;cvt.d.w\\t%0,%0"
-  [(set_attr "type"    "fcvt")
-   (set_attr "mode"    "DF")
-   (set_attr "length"  "13")])
+  "*
+{
+  dslots_load_total++;
+  if (GET_CODE (operands[1]) == MEM)
+    return \"ld.s\\t%0,%1%#\;cvt.d.w\\t%0,%0\";
+
+  return \"mtc1\\t%1,%0%#\;cvt.d.w\\t%0,%0\";
+}"
+  [(set_attr "type"    "fcvt,fcvt,fcvt")
+   (set_attr "mode"    "DF,DF,DF")
+   (set_attr "length"  "3,4,3")])
 
 (define_insn "floatsisf2"
-  [(set (match_operand:SF 0 "register_operand" "=f")
-       (float:SF (match_operand:SI 1 "register_operand" "d")))]
+  [(set (match_operand:SF 0 "register_operand" "=f,f,f")
+       (float:SF (match_operand:SI 1 "nonimmediate_operand" "d,R,m")))]
   "TARGET_HARD_FLOAT"
-  "mtc1\\t%1,%0\;cvt.s.w\\t%0,%0"
-  [(set_attr "type"    "fcvt")
-   (set_attr "mode"    "SF")
-   (set_attr "length"  "13")])
+  "*
+{
+  dslots_load_total++;
+  if (GET_CODE (operands[1]) == MEM)
+    return \"ld.s\\t%0,%1%#\;cvt.s.w\\t%0,%0\";
+
+  return \"mtc1\\t%1,%0%#\;cvt.s.w\\t%0,%0\";
+}"
+  [(set_attr "type"    "fcvt,fcvt,fcvt")
+   (set_attr "mode"    "SF,SF,SF")
+   (set_attr "length"  "3,4,3")])
+
 
 (define_expand "fixuns_truncdfsi2"
   [(set (match_operand:SI 0 "register_operand" "")
@@ -3049,7 +3064,7 @@ move\\t%0,%z4\\n\\
   operands[1] = branch_cmp[0];
   operands[2] = branch_cmp[1];
 
-  if (TARGET_DEBUG_C_MODE)
+  if (!TARGET_DEBUG_C_MODE)
     {
       gen_int_relational (EQ, operands[0], operands[1], operands[2], (int *)0);
       DONE;
@@ -3076,7 +3091,7 @@ move\\t%0,%z4\\n\\
   [(set (match_operand:SI 0 "register_operand" "=d,d")
        (eq:SI (match_operand:SI 1 "register_operand" "%d,d")
               (match_operand:SI 2 "uns_arith_operand" "d,K")))]
-  "!TARGET_DEBUG_C_MODE"
+  "TARGET_DEBUG_C_MODE"
   "@
    xor\\t%0,%1,%2\;sltu\\t%0,%0,1
    xori\\t%0,%1,%2\;sltu\\t%0,%0,1"
@@ -3088,7 +3103,7 @@ move\\t%0,%z4\\n\\
   [(set (match_operand:SI 0 "register_operand" "")
        (eq:SI (match_operand:SI 1 "register_operand" "")
               (match_operand:SI 2 "uns_arith_operand" "")))]
-  "!TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
+  "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
     && (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 0)"
   [(set (match_dup 0)
        (xor:SI (match_dup 1)
@@ -3114,7 +3129,7 @@ move\\t%0,%z4\\n\\
   operands[1] = branch_cmp[0];
   operands[2] = branch_cmp[1];
 
-  if (TARGET_DEBUG_C_MODE)
+  if (!TARGET_DEBUG_C_MODE)
     {
       gen_int_relational (NE, operands[0], operands[1], operands[2], (int *)0);
       DONE;
@@ -3140,7 +3155,7 @@ move\\t%0,%z4\\n\\
   [(set (match_operand:SI 0 "register_operand" "=d,d")
        (ne:SI (match_operand:SI 1 "register_operand" "%d,d")
               (match_operand:SI 2 "uns_arith_operand" "d,K")))]
-  "!TARGET_DEBUG_C_MODE"
+  "TARGET_DEBUG_C_MODE"
   "@
     xor\\t%0,%1,%2\;sltu\\t%0,%.,%0
     xori\\t%0,%1,%x2\;sltu\\t%0,%.,%0"
@@ -3152,7 +3167,7 @@ move\\t%0,%z4\\n\\
   [(set (match_operand:SI 0 "register_operand" "")
        (ne:SI (match_operand:SI 1 "register_operand" "")
               (match_operand:SI 2 "uns_arith_operand" "")))]
-  "!TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
+  "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
     && (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 0)"
   [(set (match_dup 0)
        (xor:SI (match_dup 1)
@@ -3178,7 +3193,7 @@ move\\t%0,%z4\\n\\
   operands[1] = branch_cmp[0];
   operands[2] = branch_cmp[1];
 
-  if (TARGET_DEBUG_C_MODE)
+  if (!TARGET_DEBUG_C_MODE)
     {
       gen_int_relational (GT, operands[0], operands[1], operands[2], (int *)0);
       DONE;
@@ -3214,7 +3229,7 @@ move\\t%0,%z4\\n\\
   operands[1] = branch_cmp[0];
   operands[2] = branch_cmp[1];
 
-  if (TARGET_DEBUG_C_MODE)
+  if (!TARGET_DEBUG_C_MODE)
     {
       gen_int_relational (GE, operands[0], operands[1], operands[2], (int *)0);
       DONE;
@@ -3227,7 +3242,7 @@ move\\t%0,%z4\\n\\
   [(set (match_operand:SI 0 "register_operand" "=d")
        (ge:SI (match_operand:SI 1 "register_operand" "d")
               (match_operand:SI 2 "arith_operand" "dI")))]
-  "!TARGET_DEBUG_C_MODE"
+  "TARGET_DEBUG_C_MODE"
   "slt\\t%0,%1,%2\;xori\\t%0,%0,0x0001"
  [(set_attr "type"     "arith")
    (set_attr "mode"    "SI")
@@ -3237,7 +3252,7 @@ move\\t%0,%z4\\n\\
   [(set (match_operand:SI 0 "register_operand" "")
        (ge:SI (match_operand:SI 1 "register_operand" "")
               (match_operand:SI 2 "arith_operand" "")))]
-  "!TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
+  "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
   [(set (match_dup 0)
        (lt:SI (match_dup 1)
               (match_dup 2)))
@@ -3260,7 +3275,7 @@ move\\t%0,%z4\\n\\
   operands[1] = branch_cmp[0];
   operands[2] = branch_cmp[1];
 
-  if (TARGET_DEBUG_C_MODE)
+  if (!TARGET_DEBUG_C_MODE)
     {
       gen_int_relational (LT, operands[0], operands[1], operands[2], (int *)0);
       DONE;
@@ -3295,7 +3310,7 @@ move\\t%0,%z4\\n\\
   operands[1] = branch_cmp[0];
   operands[2] = branch_cmp[1];
 
-  if (TARGET_DEBUG_C_MODE)
+  if (!TARGET_DEBUG_C_MODE)
     {
       gen_int_relational (LE, operands[0], operands[1], operands[2], (int *)0);
       DONE;
@@ -3325,7 +3340,7 @@ move\\t%0,%z4\\n\\
   [(set (match_operand:SI 0 "register_operand" "=d")
        (le:SI (match_operand:SI 1 "register_operand" "d")
               (match_operand:SI 2 "register_operand" "d")))]
-  "!TARGET_DEBUG_C_MODE"
+  "TARGET_DEBUG_C_MODE"
   "slt\\t%0,%z2,%1\;xori\\t%0,%0,0x0001"
  [(set_attr "type"     "arith")
    (set_attr "mode"    "SI")
@@ -3335,7 +3350,7 @@ move\\t%0,%z4\\n\\
   [(set (match_operand:SI 0 "register_operand" "")
        (le:SI (match_operand:SI 1 "register_operand" "")
               (match_operand:SI 2 "register_operand" "")))]
-  "!TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
+  "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
   [(set (match_dup 0)
        (lt:SI (match_dup 2)
               (match_dup 1)))
@@ -3360,7 +3375,7 @@ move\\t%0,%z4\\n\\
   operands[1] = branch_cmp[0];
   operands[2] = branch_cmp[1];
 
-  if (TARGET_DEBUG_C_MODE)
+  if (!TARGET_DEBUG_C_MODE)
     {
       gen_int_relational (GTU, operands[0], operands[1], operands[2], (int *)0);
       DONE;
@@ -3396,7 +3411,7 @@ move\\t%0,%z4\\n\\
   operands[1] = branch_cmp[0];
   operands[2] = branch_cmp[1];
 
-  if (TARGET_DEBUG_C_MODE)
+  if (!TARGET_DEBUG_C_MODE)
     {
       gen_int_relational (GEU, operands[0], operands[1], operands[2], (int *)0);
       DONE;
@@ -3409,7 +3424,7 @@ move\\t%0,%z4\\n\\
   [(set (match_operand:SI 0 "register_operand" "=d")
        (geu:SI (match_operand:SI 1 "register_operand" "d")
                (match_operand:SI 2 "arith_operand" "dI")))]
-  "!TARGET_DEBUG_C_MODE"
+  "TARGET_DEBUG_C_MODE"
   "sltu\\t%0,%1,%2\;xori\\t%0,%0,0x0001"
  [(set_attr "type"     "arith")
    (set_attr "mode"    "SI")
@@ -3419,7 +3434,7 @@ move\\t%0,%z4\\n\\
   [(set (match_operand:SI 0 "register_operand" "")
        (geu:SI (match_operand:SI 1 "register_operand" "")
                (match_operand:SI 2 "arith_operand" "")))]
-  "!TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
+  "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
   [(set (match_dup 0)
        (ltu:SI (match_dup 1)
                (match_dup 2)))
@@ -3442,7 +3457,7 @@ move\\t%0,%z4\\n\\
   operands[1] = branch_cmp[0];
   operands[2] = branch_cmp[1];
 
-  if (TARGET_DEBUG_C_MODE)
+  if (!TARGET_DEBUG_C_MODE)
     {
       gen_int_relational (LTU, operands[0], operands[1], operands[2], (int *)0);
       DONE;
@@ -3477,7 +3492,7 @@ move\\t%0,%z4\\n\\
   operands[1] = branch_cmp[0];
   operands[2] = branch_cmp[1];
 
-  if (TARGET_DEBUG_C_MODE)
+  if (!TARGET_DEBUG_C_MODE)
     {
       gen_int_relational (LEU, operands[0], operands[1], operands[2], (int *)0);
       DONE;
@@ -3507,7 +3522,7 @@ move\\t%0,%z4\\n\\
   [(set (match_operand:SI 0 "register_operand" "=d")
        (leu:SI (match_operand:SI 1 "register_operand" "d")
                (match_operand:SI 2 "register_operand" "d")))]
-  "!TARGET_DEBUG_C_MODE"
+  "TARGET_DEBUG_C_MODE"
   "sltu\\t%0,%z2,%1\;xori\\t%0,%0,0x0001"
  [(set_attr "type"     "arith")
    (set_attr "mode"    "SI")
@@ -3517,7 +3532,7 @@ move\\t%0,%z4\\n\\
   [(set (match_operand:SI 0 "register_operand" "")
        (leu:SI (match_operand:SI 1 "register_operand" "")
                (match_operand:SI 2 "register_operand" "")))]
-  "!TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
+  "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
   [(set (match_dup 0)
        (ltu:SI (match_dup 2)
                (match_dup 1)))
index 19bd7aa09a95b2ec2952eeb3769d7787ed5658e9..5dce4ac4fb2a957beb27e2017b6e9c7cc5afc80d 100644 (file)
@@ -48,7 +48,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
                        %{.s:%i} %{!.s:%g.s}}}"
 
 #define CPP_SPEC "\
-%{.S:  -D__LANGUAGE_ASSEMBLY__ %{!ansi:-DLANGUAGE_ASSEMBLY}} \
+%{.S:  -D__LANGUAGE_ASSEMBLY__ %{!ansi:-DLANGUAGE_ASSEMBLY} -DLANGUAGE_C -D__LANGUAGE_C__} \
 %{.cc: -D__LANGUAGE_C_PLUS_PLUS__} \
 %{.cxx:        -D__LANGUAGE_C_PLUS_PLUS__} \
 %{.C:  -D__LANGUAGE_C_PLUS_PLUS__} \
@@ -110,4 +110,23 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* Generate calls to memcpy, etc., not bcopy, etc.  */
 #define TARGET_MEM_FUNCTIONS
 
+/* A C statement to output assembler commands which will identify
+   the object file as having been compiled with GNU CC (or another
+   GNU compiler).
+
+   If you don't define this macro, the string `gcc2_compiled.:' is
+   output.  This string is calculated to define a symbol which, on
+   BSD systems, will never be defined for any other reason.  GDB
+   checks for the presence of this symbol when reading the symbol
+   table of an executable.
+
+   On non-BSD systems, you must arrange communication with GDB in
+   some other fashion.  If GDB is not used on your system, you can
+   define this macro with an empty body.
+
+   On OSF/1, gcc2_compiled. confuses the kernel debugger, so don't
+   put it out.  */
+
+#define ASM_IDENTIFY_GCC(STREAM)
+
 #include "mips.h"
index 05021882f7912e7fc6e063c0e0137f6b22d38a2f..d8f96712b5ce959eafdde7cafed7db97f67c3c95 100644 (file)
@@ -2736,12 +2736,16 @@ st_to_string(symbol_type)
 }
 
 \f
-/* Read a line from standard input, and return the start of the
-   buffer (which is grows if the line is too big).  */
+/* Read a line from standard input, and return the start of the buffer
+   (which is grows if the line is too big).  We split lines at the
+   semi-colon, and return each logical line indpendently.  */
 
 STATIC char *
 read_line __proto((void))
 {
+  static   int line_split_p    = 0;
+  register int string_p                = 0;
+  register int comment_p       = 0;
   register int ch;
   register char *ptr;
 
@@ -2751,8 +2755,11 @@ read_line __proto((void))
       cur_line_alloc = PAGE_SIZE;
     }
 
+  if (!line_split_p)
+    line_number++;
+
+  line_split_p = 0;
   cur_line_nbytes = 0;
-  line_number++;
 
   for (ptr = cur_line_start; (ch = getchar ()) != EOF; *ptr++ = ch)
     {
@@ -2775,6 +2782,27 @@ read_line __proto((void))
          cur_line_ptr = cur_line_start;
          return cur_line_ptr;
        }
+
+      else if (ch == '\0')
+       error ("Null character found in input");
+
+      else if (!comment_p)
+       {
+         if (ch == '"')
+           string_p = !string_p;
+
+         else if (ch == '#')
+           comment_p++;
+
+         else if (ch == ';')
+           {
+             line_split_p = 1;
+             *ptr++ = '\n';
+             *ptr = '\0';
+             cur_line_ptr = cur_line_start;
+             return cur_line_ptr;
+           }
+       }
     }
 
   if (ferror (stdin))