Commit 998871e9 by Anatoly Sokolov Committed by Anatoly Sokolov

stormy16.h (FUNCTION_VALUE, [...]): Remove.

	* config/stormy16/stormy16.h (FUNCTION_VALUE, LIBCALL_VALUE,
	FUNCTION_VALUE_REGNO_P): Remove.
	* config/stormy16/stormy16-protos.h (xstormy16_function_value):
	Remove.
	* config/stormy16/stormy16.c (xstormy16_function_value): Make static.
	Add 'outgoing' argument.
	(xstormy16_libcall_value, xstormy16_function_value_regno_p): New
	function.
	(TARGET_FUNCTION_VALUE, TARGET_LIBCALL_VALUE,
	TARGET_FUNCTION_VALUE_REGNO_P): Define.

From-SVN: r170573
parent 9926de2c
2011-02-28 Anatoly Sokolov <aesok@post.ru>
* config/stormy16/stormy16.h (FUNCTION_VALUE, LIBCALL_VALUE,
FUNCTION_VALUE_REGNO_P): Remove.
* config/stormy16/stormy16-protos.h (xstormy16_function_value):
Remove.
* config/stormy16/stormy16.c (xstormy16_function_value): Make static.
Add 'outgoing' argument.
(xstormy16_libcall_value, xstormy16_function_value_regno_p): New
function.
(TARGET_FUNCTION_VALUE, TARGET_LIBCALL_VALUE,
TARGET_FUNCTION_VALUE_REGNO_P): Define.
2011-02-28 Kai Tietz <kai.tietz@onevision.com> 2011-02-28 Kai Tietz <kai.tietz@onevision.com>
PR debug/28047 PR debug/28047
......
...@@ -37,7 +37,6 @@ extern void xstormy16_asm_output_aligned_common (FILE *, tree, const char *, ...@@ -37,7 +37,6 @@ extern void xstormy16_asm_output_aligned_common (FILE *, tree, const char *,
#if defined (TREE_CODE) && defined (RTX_CODE) #if defined (TREE_CODE) && defined (RTX_CODE)
extern void xstormy16_initialize_trampoline (rtx, rtx, rtx); extern void xstormy16_initialize_trampoline (rtx, rtx, rtx);
extern rtx xstormy16_function_value (const_tree, const_tree);
#endif #endif
#ifdef RTX_CODE #ifdef RTX_CODE
......
...@@ -1419,10 +1419,12 @@ xstormy16_trampoline_init (rtx m_tramp, tree fndecl, rtx static_chain) ...@@ -1419,10 +1419,12 @@ xstormy16_trampoline_init (rtx m_tramp, tree fndecl, rtx static_chain)
emit_move_insn (reg_addr_mem, reg_fnaddr); emit_move_insn (reg_addr_mem, reg_fnaddr);
} }
/* Worker function for FUNCTION_VALUE. */ /* Worker function for TARGET_FUNCTION_VALUE. */
rtx static rtx
xstormy16_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED) xstormy16_function_value (const_tree valtype,
const_tree func ATTRIBUTE_UNUSED,
bool outgoing ATTRIBUTE_UNUSED)
{ {
enum machine_mode mode; enum machine_mode mode;
mode = TYPE_MODE (valtype); mode = TYPE_MODE (valtype);
...@@ -1430,6 +1432,23 @@ xstormy16_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED) ...@@ -1430,6 +1432,23 @@ xstormy16_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
return gen_rtx_REG (mode, RETURN_VALUE_REGNUM); return gen_rtx_REG (mode, RETURN_VALUE_REGNUM);
} }
/* Worker function for TARGET_LIBCALL_VALUE. */
static rtx
xstormy16_libcall_value (enum machine_mode mode,
const_rtx fun ATTRIBUTE_UNUSED)
{
return gen_rtx_REG (mode, RETURN_VALUE_REGNUM);
}
/* Worker function for TARGET_FUNCTION_VALUE_REGNO_P. */
static bool
xstormy16_function_value_regno_p (const unsigned int regno)
{
return (regno == RETURN_VALUE_REGNUM);
}
/* A C compound statement that outputs the assembler code for a thunk function, /* A C compound statement that outputs the assembler code for a thunk function,
used to implement C++ virtual function calls with multiple inheritance. The used to implement C++ virtual function calls with multiple inheritance. The
thunk acts as a wrapper around a virtual function, adjusting the implicit thunk acts as a wrapper around a virtual function, adjusting the implicit
...@@ -2603,6 +2622,12 @@ static const struct default_options xstorym16_option_optimization_table[] = ...@@ -2603,6 +2622,12 @@ static const struct default_options xstorym16_option_optimization_table[] =
#undef TARGET_RETURN_IN_MEMORY #undef TARGET_RETURN_IN_MEMORY
#define TARGET_RETURN_IN_MEMORY xstormy16_return_in_memory #define TARGET_RETURN_IN_MEMORY xstormy16_return_in_memory
#undef TARGET_FUNCTION_VALUE
#define TARGET_FUNCTION_VALUE xstormy16_function_value
#undef TARGET_LIBCALL_VALUE
#define TARGET_LIBCALL_VALUE xstormy16_libcall_value
#undef TARGET_FUNCTION_VALUE_REGNO_P
#define TARGET_FUNCTION_VALUE_REGNO_P xstormy16_function_value_regno_p
#undef TARGET_MACHINE_DEPENDENT_REORG #undef TARGET_MACHINE_DEPENDENT_REORG
#define TARGET_MACHINE_DEPENDENT_REORG xstormy16_reorg #define TARGET_MACHINE_DEPENDENT_REORG xstormy16_reorg
......
...@@ -319,13 +319,6 @@ enum reg_class ...@@ -319,13 +319,6 @@ enum reg_class
/* The number of the hard register that is used to return a scalar value from a /* The number of the hard register that is used to return a scalar value from a
function call. */ function call. */
#define RETURN_VALUE_REGNUM FIRST_ARGUMENT_REGISTER #define RETURN_VALUE_REGNUM FIRST_ARGUMENT_REGISTER
#define FUNCTION_VALUE(VALTYPE, FUNC) \
xstormy16_function_value (VALTYPE, FUNC)
#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, RETURN_VALUE_REGNUM)
#define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == RETURN_VALUE_REGNUM)
/* Function Entry and Exit. */ /* Function Entry and Exit. */
......
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