Commit f28f2337 by Anatoly Sokolov Committed by Anatoly Sokolov

m32c.c (m32c_function_value_regno_p): Make static.

	* config/m32c/m32c.c (m32c_function_value_regno_p): Make static.
	(m32c_override_options): Rename to...
	(m32c_option_override): ...this. Make static.
	(TARGET_FUNCTION_VALUE_REGNO_P, TARGET_OPTION_OVERRIDE): Define.
	* config/m32c/m32c.h (OVERRIDE_OPTIONS, FUNCTION_VALUE_REGNO_P):
	Remove.
	* config/m32c/m32c-protos.h (m32c_override_options,
	m32c_function_value_regno_p): Remove.

From-SVN: r163488
parent 52965ca6
2010-08-23 Anatoly Sokolov <aesok@post.ru>
* config/m32c/m32c.c (m32c_function_value_regno_p): Make static.
(m32c_override_options): Rename to...
(m32c_option_override): ...this. Make static.
(TARGET_FUNCTION_VALUE_REGNO_P, TARGET_OPTION_OVERRIDE): Define.
* config/m32c/m32c.h (OVERRIDE_OPTIONS, FUNCTION_VALUE_REGNO_P):
Remove.
* config/m32c/m32c-protos.h (m32c_override_options,
m32c_function_value_regno_p): Remove.
2010-08-23 Changpeng Fang <changpeng.fang@amd.com> 2010-08-23 Changpeng Fang <changpeng.fang@amd.com>
* tree-ssa-loop-prefetch.c (gather_memory_references_ref) : * tree-ssa-loop-prefetch.c (gather_memory_references_ref) :
......
/* Target Prototypes for R8C/M16C/M32C /* Target Prototypes for R8C/M16C/M32C
Copyright (C) 2005, 2007, 2008 Copyright (C) 2005, 2007, 2008, 2010
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Red Hat. Contributed by Red Hat.
...@@ -37,7 +37,6 @@ void m32c_init_expanders (void); ...@@ -37,7 +37,6 @@ void m32c_init_expanders (void);
int m32c_initial_elimination_offset (int, int); int m32c_initial_elimination_offset (int, int);
void m32c_output_reg_pop (FILE *, int); void m32c_output_reg_pop (FILE *, int);
void m32c_output_reg_push (FILE *, int); void m32c_output_reg_push (FILE *, int);
void m32c_override_options (void);
int m32c_print_operand_punct_valid_p (int); int m32c_print_operand_punct_valid_p (int);
int m32c_push_rounding (int); int m32c_push_rounding (int);
int m32c_reg_class_from_constraint (char, const char *); int m32c_reg_class_from_constraint (char, const char *);
...@@ -75,7 +74,6 @@ bool m32c_immd_dbl_mov (rtx *, MM); ...@@ -75,7 +74,6 @@ bool m32c_immd_dbl_mov (rtx *, MM);
rtx m32c_incoming_return_addr_rtx (void); rtx m32c_incoming_return_addr_rtx (void);
int m32c_legitimate_constant_p (rtx); int m32c_legitimate_constant_p (rtx);
int m32c_legitimize_reload_address (rtx *, MM, int, int, int); int m32c_legitimize_reload_address (rtx *, MM, int, int, int);
bool m32c_function_value_regno_p (const unsigned int);
int m32c_limit_reload_class (MM, int); int m32c_limit_reload_class (MM, int);
int m32c_memory_move_cost (MM, int, int); int m32c_memory_move_cost (MM, int, int);
int m32c_modes_tieable_p (MM, MM); int m32c_modes_tieable_p (MM, MM);
......
/* Target Code for R8C/M16C/M32C /* Target Code for R8C/M16C/M32C
Copyright (C) 2005, 2006, 2007, 2008, 2009 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Red Hat. Contributed by Red Hat.
...@@ -416,11 +416,15 @@ m32c_handle_option (size_t code, ...@@ -416,11 +416,15 @@ m32c_handle_option (size_t code,
return TRUE; return TRUE;
} }
/* Implements OVERRIDE_OPTIONS. We limit memregs to 0..16, and /* Implements TARGET_OPTION_OVERRIDE. */
provide a default. */
void #undef TARGET_OPTION_OVERRIDE
m32c_override_options (void) #define TARGET_OPTION_OVERRIDE m32c_option_override
static void
m32c_option_override (void)
{ {
/* We limit memregs to 0..16, and provide a default. */
if (target_memregs_set) if (target_memregs_set)
{ {
if (target_memregs < 0 || target_memregs > 16) if (target_memregs < 0 || target_memregs > 16)
...@@ -1675,9 +1679,12 @@ m32c_function_value (const_tree valtype, ...@@ -1675,9 +1679,12 @@ m32c_function_value (const_tree valtype,
return m32c_libcall_value (mode, NULL_RTX); return m32c_libcall_value (mode, NULL_RTX);
} }
/* Implements FUNCTION_VALUE_REGNO_P. */ /* Implements TARGET_FUNCTION_VALUE_REGNO_P. */
bool #undef TARGET_FUNCTION_VALUE_REGNO_P
#define TARGET_FUNCTION_VALUE_REGNO_P m32c_function_value_regno_p
static bool
m32c_function_value_regno_p (const unsigned int regno) m32c_function_value_regno_p (const unsigned int regno)
{ {
return (regno == R0_REGNO || regno == MEM0_REGNO); return (regno == R0_REGNO || regno == MEM0_REGNO);
......
/* Target Definitions for R8C/M16C/M32C /* Target Definitions for R8C/M16C/M32C
Copyright (C) 2005, 2007, 2008, 2009 Copyright (C) 2005, 2007, 2008, 2009, 2010
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Red Hat. Contributed by Red Hat.
...@@ -96,8 +96,6 @@ extern int target_memregs; ...@@ -96,8 +96,6 @@ extern int target_memregs;
#define TARGET_VERSION fprintf (stderr, " (m32c)"); #define TARGET_VERSION fprintf (stderr, " (m32c)");
#define OVERRIDE_OPTIONS m32c_override_options ()
/* Defining data structures for per-function information */ /* Defining data structures for per-function information */
typedef struct GTY (()) machine_function typedef struct GTY (()) machine_function
...@@ -530,10 +528,6 @@ typedef struct m32c_cumulative_args ...@@ -530,10 +528,6 @@ typedef struct m32c_cumulative_args
#define FUNCTION_ARG_BOUNDARY(MODE,TYPE) (TARGET_A16 ? 8 : 16) #define FUNCTION_ARG_BOUNDARY(MODE,TYPE) (TARGET_A16 ? 8 : 16)
#define FUNCTION_ARG_REGNO_P(r) m32c_function_arg_regno_p (r) #define FUNCTION_ARG_REGNO_P(r) m32c_function_arg_regno_p (r)
/* How Scalar Function Values Are Returned */
#define FUNCTION_VALUE_REGNO_P(r) m32c_function_value_regno_p (r)
/* How Large Values Are Returned */ /* How Large Values Are Returned */
#define DEFAULT_PCC_STRUCT_RETURN 1 #define DEFAULT_PCC_STRUCT_RETURN 1
......
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