diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1992-04-28 20:33:51 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1992-04-28 20:33:51 +0000 |
commit | bbdb5552f3ff822bd573d7261a9a4c5ccead1ef3 (patch) | |
tree | 06e27f2870698742286f6780b632da3bcbffa735 /gcc | |
parent | 924706a09a3fc42b30f61f0c9189a89726bedd1a (diff) | |
download | gcc-bbdb5552f3ff822bd573d7261a9a4c5ccead1ef3.zip gcc-bbdb5552f3ff822bd573d7261a9a4c5ccead1ef3.tar.gz gcc-bbdb5552f3ff822bd573d7261a9a4c5ccead1ef3.tar.bz2 |
*** empty log message ***
From-SVN: r849
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/mips/mips.c | 16 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 2 | ||||
-rw-r--r-- | gcc/config/mips/mips.md | 85 | ||||
-rw-r--r-- | gcc/config/mips/osfrose.h | 21 | ||||
-rw-r--r-- | gcc/mips-tfile.c | 34 |
5 files changed, 111 insertions, 47 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index f47d88f..86f35e4 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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; diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 284219e..0e89ad6 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -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 */ diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index f4b7e05..dfa5141 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -103,7 +103,7 @@ (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))) diff --git a/gcc/config/mips/osfrose.h b/gcc/config/mips/osfrose.h index 19bd7aa..5dce4ac 100644 --- a/gcc/config/mips/osfrose.h +++ b/gcc/config/mips/osfrose.h @@ -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" diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c index 0502188..d8f9671 100644 --- a/gcc/mips-tfile.c +++ b/gcc/mips-tfile.c @@ -2736,12 +2736,16 @@ st_to_string(symbol_type) } -/* 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)) |