Commit a3424f5c by Richard Henderson Committed by Richard Henderson

hooks.c (hook_int_void_no_regs): Rename from hook_reg_class_void_no_regs; change return type.

        * hooks.c (hook_int_void_no_regs): Rename from
        hook_reg_class_void_no_regs; change return type.
        * hooks.h: Update.
        * target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Update.
        * target.h (branch_target_register_class): Change return type to int.
        Add documentation.
        * config/sh/sh.c (sh_target_reg_class): Change return type.
        * doc/tm.texi (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise.

From-SVN: r68275
parent 3a947669
2003-06-20 Richard Henderson <rth@redhat.com>
* hooks.c (hook_int_void_no_regs): Rename from
hook_reg_class_void_no_regs; change return type.
* hooks.h: Update.
* target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Update.
* target.h (branch_target_register_class): Change return type to int.
Add documentation.
* config/sh/sh.c (sh_target_reg_class): Change return type.
* doc/tm.texi (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise.
2003-06-20 Andreas Tobler <toa@pop.agri.ch> 2003-06-20 Andreas Tobler <toa@pop.agri.ch>
* c-format.c: Change _Bool to bool reverting part of the last * c-format.c: Change _Bool to bool reverting part of the last
......
...@@ -211,7 +211,7 @@ static int sh_issue_rate PARAMS ((void)); ...@@ -211,7 +211,7 @@ static int sh_issue_rate PARAMS ((void));
static bool sh_function_ok_for_sibcall PARAMS ((tree, tree)); static bool sh_function_ok_for_sibcall PARAMS ((tree, tree));
static bool sh_cannot_modify_jumps_p PARAMS ((void)); static bool sh_cannot_modify_jumps_p PARAMS ((void));
static enum reg_class sh_target_reg_class (void); static int sh_target_reg_class (void);
static bool sh_optimize_target_register_callee_saved (bool); static bool sh_optimize_target_register_callee_saved (bool);
static bool sh_ms_bitfield_layout_p PARAMS ((tree)); static bool sh_ms_bitfield_layout_p PARAMS ((tree));
...@@ -7804,7 +7804,7 @@ sh_cannot_modify_jumps_p () ...@@ -7804,7 +7804,7 @@ sh_cannot_modify_jumps_p ()
return (TARGET_SHMEDIA && (reload_in_progress || reload_completed)); return (TARGET_SHMEDIA && (reload_in_progress || reload_completed));
} }
static enum reg_class static int
sh_target_reg_class (void) sh_target_reg_class (void)
{ {
return TARGET_SHMEDIA ? TARGET_REGS : NO_REGS; return TARGET_SHMEDIA ? TARGET_REGS : NO_REGS;
......
...@@ -9134,7 +9134,7 @@ cannot_modify_jumps_past_reload_p () ...@@ -9134,7 +9134,7 @@ cannot_modify_jumps_past_reload_p ()
@end smallexample @end smallexample
@end deftypefn @end deftypefn
@deftypefn {Target Hook} enum reg_class TARGET_BRANCH_TARGET_REGISTER_CLASS (void) @deftypefn {Target Hook} int TARGET_BRANCH_TARGET_REGISTER_CLASS (void)
This target hook returns a register class for which branch target register This target hook returns a register class for which branch target register
optimizations should be applied. All registers in this class should be optimizations should be applied. All registers in this class should be
usable interchangably. After reload, registers in this class will be usable interchangably. After reload, registers in this class will be
......
...@@ -41,9 +41,9 @@ hook_bool_void_false () ...@@ -41,9 +41,9 @@ hook_bool_void_false ()
return false; return false;
} }
/* The same, but formally returning an enum reg_class. */ /* The same, but formally returning NO_REGS. */
enum reg_class int
hook_reg_class_void_no_regs (void) hook_int_void_no_regs (void)
{ {
return NO_REGS; return NO_REGS;
} }
......
...@@ -23,15 +23,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -23,15 +23,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define GCC_HOOKS_H #define GCC_HOOKS_H
bool hook_bool_void_false PARAMS ((void)); bool hook_bool_void_false PARAMS ((void));
/* Check if tm.h has been included, since ISO C does not allow forward
definitions for enums, and making hooks.h dependent on tm.h would create
unnecessary dependencies where no hook declaration involving
enum_reg_class is needed. */
#ifdef REG_CLASS_CONTENTS
enum reg_class hook_reg_class_void_no_regs (void);
#endif
bool hook_bool_bool_false (bool); bool hook_bool_bool_false (bool);
bool hook_bool_tree_false PARAMS ((tree)); bool hook_bool_tree_false PARAMS ((tree));
bool hook_bool_tree_hwi_hwi_tree_false bool hook_bool_tree_hwi_hwi_tree_false
...@@ -51,6 +42,7 @@ int hook_int_tree_tree_1 PARAMS ((tree, tree)); ...@@ -51,6 +42,7 @@ int hook_int_tree_tree_1 PARAMS ((tree, tree));
int hook_int_rtx_0 PARAMS ((rtx)); int hook_int_rtx_0 PARAMS ((rtx));
int hook_int_void_0 (void); int hook_int_void_0 (void);
int hook_int_size_t_constcharptr_int_0 (size_t, const char *, int); int hook_int_size_t_constcharptr_int_0 (size_t, const char *, int);
int hook_int_void_no_regs (void);
bool default_can_output_mi_thunk_no_vcall bool default_can_output_mi_thunk_no_vcall
PARAMS ((tree, HOST_WIDE_INT, HOST_WIDE_INT, tree)); PARAMS ((tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
......
...@@ -282,7 +282,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -282,7 +282,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* In hook.c. */ /* In hook.c. */
#define TARGET_CANNOT_MODIFY_JUMPS_P hook_bool_void_false #define TARGET_CANNOT_MODIFY_JUMPS_P hook_bool_void_false
#define TARGET_BRANCH_TARGET_REGISTER_CLASS hook_reg_class_void_no_regs #define TARGET_BRANCH_TARGET_REGISTER_CLASS hook_int_void_no_regs
#define TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED hook_bool_bool_false #define TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED hook_bool_bool_false
#define TARGET_CANNOT_FORCE_CONST_MEM hook_bool_rtx_false #define TARGET_CANNOT_FORCE_CONST_MEM hook_bool_rtx_false
#define TARGET_CANNOT_COPY_INSN_P NULL #define TARGET_CANNOT_COPY_INSN_P NULL
......
...@@ -296,8 +296,15 @@ struct gcc_target ...@@ -296,8 +296,15 @@ struct gcc_target
not, at the current point in the compilation. */ not, at the current point in the compilation. */
bool (* cannot_modify_jumps_p) PARAMS ((void)); bool (* cannot_modify_jumps_p) PARAMS ((void));
enum reg_class (* branch_target_register_class) PARAMS ((void)); /* Return a register class for which branch target register
bool (* branch_target_register_callee_saved) PARAMS ((bool)); optimizations should be applied. */
int (* branch_target_register_class) PARAMS ((void));
/* Return true if branch target register optimizations should include
callee-saved registers that are not already live during the current
function. AFTER_PE_GEN is true if prologues and epilogues have
already been generated. */
bool (* branch_target_register_callee_saved) PARAMS ((bool after_pe_gen));
/* True if the constant X cannot be placed in the constant pool. */ /* True if the constant X cannot be placed in the constant pool. */
bool (* cannot_force_const_mem) PARAMS ((rtx)); bool (* cannot_force_const_mem) PARAMS ((rtx));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment