OSDN Git Service

* target.h (struct calls): Add function_value_regno_p field.
authoraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 2 May 2010 10:49:10 +0000 (10:49 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:37:40 +0000 (14:37 +0900)
* target-def.h (TARGET_FUNCTION_VALUE_REGNO_P): Define.
(TARGET_INITIALIZER): Use TARGET_FUNCTION_VALUE_REGNO_P.
* targhooks.c (default_function_value_regno_p): New function.
* targhooks.h (default_function_value_regno_p): Declare function.
* rtlanal.c (keep_with_call_p): Use function_value_regno_p hook.
* builtins.c. (apply_result_size): (Ditto.).
* combine.c. (likely_spilled_retval_p): (Ditto.).
* mode-switching.c. Include 'target.h'.
(create_pre_exit): Use function_value_regno_p hook.
* Makefile.in (mode-switching.o): Add dependency on TARGET_H.
* doc/tm.texi (FUNCTION_VALUE_REGNO_P,
TARGET_FUNCTION_VALUE_REGNO_P): Revise documentation.

* config/i386/i386.h (TARGET_FUNCTION_VALUE_REGNO_P): Remove macro.
* config/i386/i386.c (TARGET_FUNCTION_VALUE_REGNO_P): Define macro.
(ix86_function_value_regno_p): Declare as static, change argument
type to const unsigned int.
* config/i386/i386-protos.h (ix86_function_value_regno_p): Remove.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158970 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/Makefile.in
gcc/builtins.c
gcc/config/i386/i386.c

index 7f636b3..d012202 100644 (file)
@@ -1,3 +1,25 @@
+2010-05-01  Anatoly Sokolov  <aesok@post.ru>
+
+       * target.h (struct calls): Add function_value_regno_p field.
+       * target-def.h (TARGET_FUNCTION_VALUE_REGNO_P): Define.
+       (TARGET_INITIALIZER): Use TARGET_FUNCTION_VALUE_REGNO_P.
+       * targhooks.c (default_function_value_regno_p): New function.
+       * targhooks.h (default_function_value_regno_p): Declare function.
+       * rtlanal.c (keep_with_call_p): Use function_value_regno_p hook.
+       * builtins.c. (apply_result_size): (Ditto.).
+       * combine.c. (likely_spilled_retval_p): (Ditto.).
+       * mode-switching.c. Include 'target.h'.
+       (create_pre_exit): Use function_value_regno_p hook.
+       * Makefile.in (mode-switching.o): Add dependency on TARGET_H.
+       * doc/tm.texi (FUNCTION_VALUE_REGNO_P,
+       TARGET_FUNCTION_VALUE_REGNO_P): Revise documentation.
+
+       * config/i386/i386.h (TARGET_FUNCTION_VALUE_REGNO_P): Remove macro.
+       * config/i386/i386.c (TARGET_FUNCTION_VALUE_REGNO_P): Define macro.
+       (ix86_function_value_regno_p): Declare as static, change argument
+       type to const unsigned int.
+       * config/i386/i386-protos.h (ix86_function_value_regno_p): Remove.
+
 2010-05-01  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/43949
 2010-05-01  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/43949
index 48f2c61..95185da 100644 (file)
@@ -2991,7 +2991,7 @@ lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
 mode-switching.o : mode-switching.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
    $(INSN_ATTR_H) $(RECOG_H) $(BASIC_BLOCK_H) $(TM_P_H) $(FUNCTION_H) \
 mode-switching.o : mode-switching.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
    $(INSN_ATTR_H) $(RECOG_H) $(BASIC_BLOCK_H) $(TM_P_H) $(FUNCTION_H) \
-   output.h $(TREE_PASS_H) $(TIMEVAR_H) $(REAL_H) $(DF_H)
+   output.h $(TREE_PASS_H) $(TIMEVAR_H) $(REAL_H) $(DF_H) $(TARGET_H)
 tree-ssa-dce.o : tree-ssa-dce.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
     $(RTL_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \
     coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
 tree-ssa-dce.o : tree-ssa-dce.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
     $(RTL_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \
     coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
index b514ae0..5f4b717 100644 (file)
@@ -1322,7 +1322,7 @@ apply_result_size (void)
       size = 0;
 
       for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
       size = 0;
 
       for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
-       if (FUNCTION_VALUE_REGNO_P (regno))
+       if (targetm.calls.function_value_regno_p (regno))
          {
            mode = reg_raw_mode[regno];
 
          {
            mode = reg_raw_mode[regno];
 
index 63545c8..61a619b 100644 (file)
@@ -1880,6 +1880,7 @@ static bool ext_80387_constants_init = 0;
 \f
 static struct machine_function * ix86_init_machine_status (void);
 static rtx ix86_function_value (const_tree, const_tree, bool);
 \f
 static struct machine_function * ix86_init_machine_status (void);
 static rtx ix86_function_value (const_tree, const_tree, bool);
+static bool ix86_function_value_regno_p (const unsigned int);
 static rtx ix86_static_chain (const_tree, bool);
 static int ix86_function_regparm (const_tree, const_tree);
 static void ix86_compute_frame_layout (struct ix86_frame *);
 static rtx ix86_static_chain (const_tree, bool);
 static int ix86_function_regparm (const_tree, const_tree);
 static void ix86_compute_frame_layout (struct ix86_frame *);
@@ -6331,8 +6332,8 @@ ix86_function_arg_boundary (enum machine_mode mode, tree type)
 
 /* Return true if N is a possible register number of function value.  */
 
 
 /* Return true if N is a possible register number of function value.  */
 
-bool
-ix86_function_value_regno_p (int regno)
+static bool
+ix86_function_value_regno_p (const unsigned int regno)
 {
   switch (regno)
     {
 {
   switch (regno)
     {
@@ -30656,6 +30657,9 @@ ix86_enum_va_list (int idx, const char **pname, tree *ptree)
 #undef TARGET_FUNCTION_VALUE
 #define TARGET_FUNCTION_VALUE ix86_function_value
 
 #undef TARGET_FUNCTION_VALUE
 #define TARGET_FUNCTION_VALUE ix86_function_value
 
+#undef TARGET_FUNCTION_VALUE_REGNO_P
+#define TARGET_FUNCTION_VALUE_REGNO_P ix86_function_value_regno_p
+
 #undef TARGET_SECONDARY_RELOAD
 #define TARGET_SECONDARY_RELOAD ix86_secondary_reload
 
 #undef TARGET_SECONDARY_RELOAD
 #define TARGET_SECONDARY_RELOAD ix86_secondary_reload