OSDN Git Service

PR c/18946
[pf3gnuchains/gcc-fork.git] / gcc / recog.h
index 28db9aa..0c340cc 100644 (file)
@@ -1,5 +1,5 @@
 /* Declarations for interface to insn recognizer and insn-output.c.
-   Copyright (C) 1987, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
+   Copyright (C) 1987, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -21,8 +21,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 /* Random number that should be large enough for all purposes.  */
 #define MAX_RECOG_ALTERNATIVES 30
-#define recog_memoized(I) (INSN_CODE (I) >= 0 \
-                          ? INSN_CODE (I) : recog_memoized_1 (I))
 
 /* Types of operands.  */
 enum op_type {
@@ -73,7 +71,6 @@ struct operand_alternative
 
 extern void init_recog (void);
 extern void init_recog_no_volatile (void);
-extern int recog_memoized_1 (rtx);
 extern int check_asm_operands (rtx);
 extern int asm_operand_ok (rtx, const char *);
 extern int validate_change (rtx, rtx *, rtx, int);
@@ -96,28 +93,15 @@ extern int next_insn_tests_no_inequality (rtx);
 extern int reg_fits_class_p (rtx, enum reg_class, int, enum machine_mode);
 extern rtx *find_single_use (rtx, rtx, rtx *);
 
-extern int general_operand (rtx, enum machine_mode);
-extern int address_operand (rtx, enum machine_mode);
-extern int register_operand (rtx, enum machine_mode);
-extern int pmode_register_operand (rtx, enum machine_mode);
-extern int scratch_operand (rtx, enum machine_mode);
-extern int immediate_operand (rtx, enum machine_mode);
-extern int const_int_operand (rtx, enum machine_mode);
-extern int const_double_operand (rtx, enum machine_mode);
-extern int nonimmediate_operand (rtx, enum machine_mode);
-extern int nonmemory_operand (rtx, enum machine_mode);
-extern int push_operand (rtx, enum machine_mode);
-extern int pop_operand (rtx, enum machine_mode);
-extern int memory_operand (rtx, enum machine_mode);
-extern int indirect_operand (rtx, enum machine_mode);
-extern int comparison_operator (rtx, enum machine_mode);
-
 extern int offsettable_memref_p (rtx);
 extern int offsettable_nonstrict_memref_p (rtx);
 extern int offsettable_address_p (int, enum machine_mode, rtx);
 extern int mode_dependent_address_p (rtx);
 
 extern int recog (rtx, rtx, int *);
+#ifndef GENERATOR_FILE
+static inline int recog_memoized (rtx insn);
+#endif
 extern void add_clobbers (rtx, int);
 extern int added_clobbers_hard_reg_p (int);
 extern void insn_extract (rtx);
@@ -138,6 +122,25 @@ extern rtx peephole2_insns (rtx, rtx, int *);
 extern int store_data_bypass_p (rtx, rtx);
 extern int if_test_bypass_p (rtx, rtx);
 
+#ifndef GENERATOR_FILE
+/* Try recognizing the instruction INSN,
+   and return the code number that results.
+   Remember the code so that repeated calls do not
+   need to spend the time for actual rerecognition.
+
+   This function is the normal interface to instruction recognition.
+   The automatically-generated function `recog' is normally called
+   through this one.  (The only exception is in combine.c.)  */
+
+static inline int
+recog_memoized (rtx insn)
+{
+  if (INSN_CODE (insn) < 0)
+    INSN_CODE (insn) = recog (PATTERN (insn), insn, 0);
+  return INSN_CODE (insn);
+}
+#endif
+
 /* Nonzero means volatile operands are recognized.  */
 extern int volatile_ok;