aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStan Cox <coxs@gnu.org>1996-10-04 14:07:02 +0000
committerStan Cox <coxs@gnu.org>1996-10-04 14:07:02 +0000
commit1b90646a5b03ce4a7747ee3a37b20633a1ff9ae0 (patch)
treed2cc0daa977383c1a82d3ec6306f6f9a1ed8fabd /gcc
parent1fdae49c422b0984c28545888c1b69293fddef86 (diff)
downloadgcc-1b90646a5b03ce4a7747ee3a37b20633a1ff9ae0.zip
gcc-1b90646a5b03ce4a7747ee3a37b20633a1ff9ae0.tar.gz
gcc-1b90646a5b03ce4a7747ee3a37b20633a1ff9ae0.tar.bz2
(flag_omit_frame_pointer, outer_function_chain: declare.
From-SVN: r12897
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/i386.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index bb59019..f556745 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -2589,6 +2589,32 @@ do { \
} while (0)
+/* Helper macros to decide if the rtl of some instruction
+ will cause problems due to register shortage. */
+
+/* ??? flags.h is not self-contained */
+extern int flag_omit_frame_pointer;
+/* ??? neither is function.h */
+extern struct function *outer_function_chain;
+/* ??? neither is expr.h */
+extern int current_function_calls_alloca;
+/* ??? No header file for rtx_equal_function_value_matters */
+extern int rtx_equal_function_value_matters;
+
+#define N_REGS_USED(op) \
+ (GET_CODE (op) == MEM \
+ ? (GET_CODE (XEXP (op, 0)) == PLUS \
+ ? (rtx_varies_p (XEXP (XEXP (op, 0), 0)) \
+ + rtx_varies_p (XEXP (XEXP (op, 0), 1))) \
+ : rtx_varies_p (XEXP (op, 0))) \
+ : (GET_CODE (op) == REG ? HARD_REGNO_NREGS (REGNO (op), GET_MODE (op)) : 0))
+
+#define N_ALLOCATABLE_REGISTERS \
+ (6 - (flag_pic != 0) - (outer_function_chain != 0) \
+ + (flag_omit_frame_pointer && ! rtx_equal_function_value_matters \
+ && ! current_function_calls_alloca)) \
+
+
/* Functions in i386.c */
extern void override_options ();
extern void order_regs_for_local_alloc ();