aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@gcc.gnu.org>2000-05-08 23:10:36 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-05-08 23:10:36 -0700
commitafe48e06879c76f8511209b46946210562cd6bd4 (patch)
tree1d15287ab59ac37d33a4e7e71c8d75bac8bc6df3
parent5079804811d25450d7af691975b73ab1ec81e042 (diff)
downloadgcc-afe48e06879c76f8511209b46946210562cd6bd4.zip
gcc-afe48e06879c76f8511209b46946210562cd6bd4.tar.gz
gcc-afe48e06879c76f8511209b46946210562cd6bd4.tar.bz2
final.c (current_insn_predicate): New.
* final.c (current_insn_predicate): New. (final_scan_insn): Set it. * output.h (current_insn_predicate): Declare. From-SVN: r33790
-rw-r--r--gcc/final.c12
-rw-r--r--gcc/output.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/final.c b/gcc/final.c
index dc9334f..c207cfb 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -240,6 +240,11 @@ static int dialect_number;
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 {
@@ -2877,6 +2882,13 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
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
cc_prev_status = cc_status;
diff --git a/gcc/output.h b/gcc/output.h
index 6af8de6..48d5a73 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -433,6 +433,10 @@ extern int current_function_uses_only_leaf_regs;
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. */