This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
define_cond_exec output hooks
- To: gcc-patches at gcc dot gnu dot org
- Subject: define_cond_exec output hooks
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 8 May 2000 23:12:32 -0700
As promised. D30V (and hopefully one day ARM) will shortly use this
to emit gunk into the middle of of the insn for the condition.
r~
* final.c (current_insn_predicate): New.
(final_scan_insn): Set it.
* output.h (current_insn_predicate): Declare.
Index: final.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/final.c,v
retrieving revision 1.124
diff -c -p -d -r1.124 final.c
*** final.c 2000/05/04 13:49:48 1.124
--- final.c 2000/05/09 05:53:45
*************** static int dialect_number;
*** 240,245 ****
--- 240,250 ----
static char *line_note_exists;
+ #ifdef HAVE_conditional_execution
+ /* Nonnull if the insn currently being emitted was a COND_EXEC pattern. */
+ rtx current_insn_predicate;
+ #endif
+
/* Linked list to hold line numbers for each basic block. */
struct bb_list {
*************** final_scan_insn (insn, file, optimize, p
*** 2875,2880 ****
--- 2880,2892 ----
#ifdef FINAL_PRESCAN_INSN
FINAL_PRESCAN_INSN (insn, recog_data.operand, recog_data.n_operands);
+ #endif
+
+ #ifdef HAVE_conditional_execution
+ if (GET_CODE (PATTERN (insn)) == COND_EXEC)
+ current_insn_predicate = COND_EXEC_TEST (PATTERN (insn));
+ else
+ current_insn_predicate = NULL_RTX;
#endif
#ifdef HAVE_cc0
Index: output.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/output.h,v
retrieving revision 1.47
diff -c -p -d -r1.47 output.h
*** output.h 2000/04/27 05:58:05 1.47
--- output.h 2000/05/09 05:53:45
*************** extern int current_function_uses_only_le
*** 433,438 ****
--- 433,442 ----
extern FILE *rtl_dump_file;
#endif
+ /* Nonnull if the insn currently being emitted was a COND_EXEC pattern. */
+
+ extern struct rtx_def *current_insn_predicate;
+
/* Decide whether DECL needs to be in a writable section. RELOC is the same
as for SELECT_SECTION. */