From: Stan Cox Date: Fri, 4 Oct 1996 14:07:02 +0000 (+0000) Subject: (flag_omit_frame_pointer, outer_function_chain: declare. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b90646a5b03ce4a7747ee3a37b20633a1ff9ae0;p=gcc.git (flag_omit_frame_pointer, outer_function_chain: declare. From-SVN: r12897 --- diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index bb5901977db..f556745fa4e 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 ();