Commit 5fcd86dd by Michael Meissner

Fix rename registers problem; Rewrite 64-bit conditionals in terms of COND_EXEC…

Fix rename registers problem; Rewrite 64-bit conditionals in terms of COND_EXEC instead of IF_THEN_ELSE

From-SVN: r37781
parent c383aafd
2000-11-27 Michael Meissner <meissner@redhat.com>
* d30v-protos.h (srelational_si_operator): Correctly spell
function.
(urelational_si_operator): Ditto.
(relational_si_operator): Ditto.
(d30v_expand_prologue): Add prototype.
(d30v_expand_epilogue): Ditto.
* d30v.h (OPTIMIZATION_OPTIONS): Undo November 22nd change.
* d30v.md (movcccc_*): Delete now unused patterns.
(64 bit comparison splitters): Rewrite to use COND_EXEC instead of
IF_THEN_ELSE.
(define_cond_exec): Use 'b' to select branch flags.
2000-11-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2000-11-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* builtins.c (expand_builtin_strncmp, expand_builtin_strncpy): New * builtins.c (expand_builtin_strncmp, expand_builtin_strncpy): New
...@@ -20,8 +36,8 @@ ...@@ -20,8 +36,8 @@
2000-11-26 Neil Booth <neilb@earthling.net> 2000-11-26 Neil Booth <neilb@earthling.net>
* cppmacro.c (cpp_scan_buffer_nooutput): Only scan the * cppmacro.c (cpp_scan_buffer_nooutput): Only scan the
current buffer. current buffer.
2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk> 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
...@@ -35,41 +51,41 @@ ...@@ -35,41 +51,41 @@
table and call output_file_names instead. table and call output_file_names instead.
(file_info_cmp): Helper function to sort directory names. (file_info_cmp): Helper function to sort directory names.
2000-11-26 Neil Booth <neilb@earthling.net> 2000-11-26 Neil Booth <neilb@earthling.net>
* cpplib.h (struct cpp_reader): Remove lang_asm. * cpplib.h (struct cpp_reader): Remove lang_asm.
(struct cpp_options): Remove c89. New members lang, (struct cpp_options): Remove c89. New members lang,
extended_numbers. extended_numbers.
* cppexp.c (parse_number): Use them. * cppexp.c (parse_number): Use them.
* cpphash.h (VALID_SIGN): Use them. * cpphash.h (VALID_SIGN): Use them.
* cppinit.c (set_lang, cpp_start_read): Update. * cppinit.c (set_lang, cpp_start_read): Update.
* cpplex.c (parse_string, _cpp_lex_token): Update. * cpplex.c (parse_string, _cpp_lex_token): Update.
* cpplib.c (_cpp_handle_directive): Update. * cpplib.c (_cpp_handle_directive): Update.
* cppmacro.c (parse_args): Update. * cppmacro.c (parse_args): Update.
* cppmain.c (scan_buffer): Update. * cppmain.c (scan_buffer): Update.
Sun Nov 26 10:02:37 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Sun Nov 26 10:02:37 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* fold-const.c (fold, case CONVERT_EXPR): Always return tree of * fold-const.c (fold, case CONVERT_EXPR): Always return tree of
proper type. proper type.
2000-11-26 Neil Booth <neilb@earthling.net> 2000-11-26 Neil Booth <neilb@earthling.net>
* Makefile.in: Remove MAYBE_CPPLIB and maybe_cpplib. * Makefile.in: Remove MAYBE_CPPLIB and maybe_cpplib.
* c-decl.c: Remove parse_in declaration. * c-decl.c: Remove parse_in declaration.
* c-lang.c: Similarly. * c-lang.c: Similarly.
* c-lex.c: Similarly. * c-lex.c: Similarly.
* c-parse.in: Similarly. * c-parse.in: Similarly.
* c-pragma.c: Similarly. * c-pragma.c: Similarly.
* configure.in: Similarly. * configure.in: Similarly.
* cp/Make-lang.in: Similarly. * cp/Make-lang.in: Similarly.
* cp/spew.c: Similarly. * cp/spew.c: Similarly.
* cp/decl2.c: Remove check for lang-c++ option. * cp/decl2.c: Remove check for lang-c++ option.
* cp/lang-specs.h: Remove -lang-c++ from cc1plus command line. * cp/lang-specs.h: Remove -lang-c++ from cc1plus command line.
* cp/lex.c (lang_init_options): With cpp_reader_init, default to C++. * cp/lex.c (lang_init_options): With cpp_reader_init, default to C++.
* c-lex.h: Add declaration of parse_in. * c-lex.h: Add declaration of parse_in.
* cppinit.c: Call set_lang after allocating pfile->pending. * cppinit.c: Call set_lang after allocating pfile->pending.
* configure: Regenerate. * configure: Regenerate.
2000-11-25 Zack Weinberg <zack@wolery.stanford.edu> 2000-11-25 Zack Weinberg <zack@wolery.stanford.edu>
......
...@@ -65,9 +65,9 @@ extern int branch_zero_operator PARAMS ((rtx, enum machine_mode)); ...@@ -65,9 +65,9 @@ extern int branch_zero_operator PARAMS ((rtx, enum machine_mode));
extern int cond_move_dest_operand PARAMS ((rtx, enum machine_mode)); extern int cond_move_dest_operand PARAMS ((rtx, enum machine_mode));
extern int cond_move_operand PARAMS ((rtx, enum machine_mode)); extern int cond_move_operand PARAMS ((rtx, enum machine_mode));
extern int cond_exec_operand PARAMS ((rtx, enum machine_mode)); extern int cond_exec_operand PARAMS ((rtx, enum machine_mode));
extern int srelational_si_operand PARAMS ((rtx, enum machine_mode)); extern int srelational_si_operator PARAMS ((rtx, enum machine_mode));
extern int urelational_si_operand PARAMS ((rtx, enum machine_mode)); extern int urelational_si_operator PARAMS ((rtx, enum machine_mode));
extern int relational_di_operand PARAMS ((rtx, enum machine_mode)); extern int relational_di_operator PARAMS ((rtx, enum machine_mode));
#endif #endif
extern d30v_stack_t *d30v_stack_info PARAMS ((void)); extern d30v_stack_t *d30v_stack_info PARAMS ((void));
extern int direct_return PARAMS ((void)); extern int direct_return PARAMS ((void));
...@@ -111,7 +111,9 @@ extern rtx d30v_expand_builtin_va_arg PARAMS ((tree, tree)); ...@@ -111,7 +111,9 @@ extern rtx d30v_expand_builtin_va_arg PARAMS ((tree, tree));
#endif /* TREE_CODE */ #endif /* TREE_CODE */
extern void d30v_function_prologue PARAMS ((FILE *, int)); extern void d30v_function_prologue PARAMS ((FILE *, int));
extern void d30v_expand_prologue PARAMS ((void));
extern void d30v_function_epilogue PARAMS ((FILE *, int)); extern void d30v_function_epilogue PARAMS ((FILE *, int));
extern void d30v_expand_epilogue PARAMS ((void));
extern void d30v_function_profiler PARAMS ((FILE *, int)); extern void d30v_function_profiler PARAMS ((FILE *, int));
#ifdef RTX_CODE #ifdef RTX_CODE
extern void d30v_split_double PARAMS ((rtx, rtx *, rtx *)); extern void d30v_split_double PARAMS ((rtx, rtx *, rtx *));
......
...@@ -545,12 +545,7 @@ extern int target_flags; ...@@ -545,12 +545,7 @@ extern int target_flags;
*Do not examine `write_symbols' in this macro!* The debugging options are *Do not examine `write_symbols' in this macro!* The debugging options are
*not supposed to alter the generated code. */ *not supposed to alter the generated code. */
/* -frename-registers seems to abort on d30v, turn off until fixed. */ /* #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) */
#define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \
do { \
if (LEVEL >= 3) \
flag_rename_registers = 0; \
} while (0)
/* Define this macro if debugging can be performed even without a frame /* Define this macro if debugging can be performed even without a frame
pointer. If this macro is defined, GNU CC will turn on the pointer. If this macro is defined, GNU CC will turn on the
......
...@@ -2037,60 +2037,6 @@ ...@@ -2037,60 +2037,6 @@
[(set_attr "length" "4,8") [(set_attr "length" "4,8")
(set_attr "type" "scmp,lcmp")]) (set_attr "type" "scmp,lcmp")])
;; Code used after splitting DI compares
(define_insn "*movcccc_signed_true"
[(set (match_operand:CC 0 "flag_operand" "=f,f")
(if_then_else:CC (match_operand:CC 1 "br_flag_operand" "f,f")
(match_operator:CC 3 "srelational_si_operator"
[(match_operand:SI 4 "gpr_operand" "d,d")
(match_operand:SI 5 "gpr_or_constant_operand" "dI,i")])
(match_dup 0)))]
""
"%R3%T1 %0,%4,%5"
[(set_attr "length" "4,8")
(set_attr "type" "scmp,lcmp")
(set_attr "predicable" "no")])
(define_insn "*movcccc_signed_false"
[(set (match_operand:CC 0 "flag_operand" "=f,f")
(if_then_else:CC (match_operand:CC 1 "br_flag_operand" "f,f")
(match_dup 0)
(match_operator:CC 3 "srelational_si_operator"
[(match_operand:SI 4 "gpr_operand" "d,d")
(match_operand:SI 5 "gpr_or_constant_operand" "dI,i")])))]
""
"%R3%F1 %0,%4,%5"
[(set_attr "length" "4,8")
(set_attr "type" "scmp,lcmp")
(set_attr "predicable" "no")])
(define_insn "*movcccc_unsigned_true"
[(set (match_operand:CC 0 "flag_operand" "=f,f")
(if_then_else:CC (match_operand:CC 1 "br_flag_operand" "f,f")
(match_operator:CC 3 "urelational_si_operator"
[(match_operand:SI 4 "gpr_operand" "d,d")
(match_operand:SI 5 "gpr_or_constant_operand" "dJP,i")])
(match_dup 0)))]
""
"%R3%T1 %0,%4,%5"
[(set_attr "length" "4,8")
(set_attr "type" "scmp,lcmp")
(set_attr "predicable" "no")])
(define_insn "*movcccc_unsigned_false"
[(set (match_operand:CC 0 "flag_operand" "=f,f")
(if_then_else:CC (match_operand:CC 1 "br_flag_operand" "f,f")
(match_dup 0)
(match_operator:CC 3 "urelational_si_operator"
[(match_operand:SI 4 "gpr_operand" "d,d")
(match_operand:SI 5 "gpr_or_constant_operand" "dJP,i")])))]
""
"%R3%F1 %0,%4,%5"
[(set_attr "length" "4,8")
(set_attr "type" "scmp,lcmp")
(set_attr "predicable" "no")])
;; 64 bit integer tests ;; 64 bit integer tests
(define_insn "*eqdi_internal" (define_insn "*eqdi_internal"
[(set (match_operand:CC 0 "br_flag_operand" "=b,b,b") [(set (match_operand:CC 0 "br_flag_operand" "=b,b,b")
...@@ -2109,11 +2055,12 @@ ...@@ -2109,11 +2055,12 @@
[(set (match_dup 0) [(set (match_dup 0)
(eq:CC (match_dup 3) (eq:CC (match_dup 3)
(match_dup 4))) (match_dup 4)))
(set (match_dup 0) (cond_exec
(if_then_else:CC (match_dup 0) (eq:CC (match_dup 0)
(eq:CC (match_dup 5) (const_int 0))
(match_dup 6)) (set (match_dup 0)
(match_dup 0)))] (eq:CC (match_dup 5)
(match_dup 6))))]
" "
{ {
d30v_split_double (operands[1], &operands[3], &operands[5]); d30v_split_double (operands[1], &operands[3], &operands[5]);
...@@ -2137,11 +2084,12 @@ ...@@ -2137,11 +2084,12 @@
[(set (match_dup 0) [(set (match_dup 0)
(ne:CC (match_dup 3) (ne:CC (match_dup 3)
(match_dup 4))) (match_dup 4)))
(set (match_dup 0) (cond_exec
(if_then_else:CC (match_dup 0) (ne:CC (match_dup 0)
(match_dup 0) (const_int 0))
(ne:CC (match_dup 5) (set (match_dup 0)
(match_dup 6))))] (ne:CC (match_dup 5)
(match_dup 6))))]
" "
{ {
d30v_split_double (operands[1], &operands[3], &operands[5]); d30v_split_double (operands[1], &operands[3], &operands[5]);
...@@ -2268,23 +2216,23 @@ ...@@ -2268,23 +2216,23 @@
d30v_split_double (operands[2], &high[0], &low[0]); d30v_split_double (operands[2], &high[0], &low[0]);
d30v_split_double (operands[3], &high[1], &low[1]); d30v_split_double (operands[3], &high[1], &low[1]);
operands[5] = gen_rtx (SET, VOIDmode, operands[5] = gen_rtx_SET (VOIDmode,
tmpflag, tmpflag,
gen_rtx (EQ, CCmode, high[0], high[1])); gen_rtx_EQ (CCmode, high[0], high[1]));
operands[6] = gen_rtx (SET, VOIDmode, operands[6] = gen_rtx_COND_EXEC (VOIDmode,
outflag, gen_rtx_NE (CCmode, tmpflag, const0_rtx),
gen_rtx (IF_THEN_ELSE, CCmode, gen_rtx_SET (VOIDmode, outflag,
tmpflag, gen_rtx_fmt_ee (cond, CCmode,
outflag, high[0],
gen_rtx (cond, CCmode, high[0], high[1]))); high[1])));
operands[7] = gen_rtx (SET, VOIDmode, operands[7] = gen_rtx_COND_EXEC (VOIDmode,
outflag, gen_rtx_EQ (CCmode, tmpflag, const0_rtx),
gen_rtx (IF_THEN_ELSE, CCmode, gen_rtx_SET (VOIDmode, outflag,
tmpflag, gen_rtx_fmt_ee (ucond, CCmode,
gen_rtx (ucond, CCmode, low[0], low[1]), low[0],
outflag)); low[1])));
}") }")
...@@ -3407,7 +3355,7 @@ ...@@ -3407,7 +3355,7 @@
(define_cond_exec (define_cond_exec
[(match_operator:CC 0 "condexec_test_operator" [(match_operator:CC 0 "condexec_test_operator"
[(match_operand:CC 1 "br_flag_operand" "f") [(match_operand:CC 1 "br_flag_operand" "b")
(const_int 0)])] (const_int 0)])]
"" ""
"") "")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment