Commit feab9982 by Anatoly Sokolov Committed by Anatoly Sokolov

moxie.h (FUNCTION_VALUE, [...]): Remove macros.

	* config/moxie/moxie.h (FUNCTION_VALUE, FUNCTION_OUTGOING_VALUE,
	LIBCALL_VALUE, FUNCTION_VALUE_REGNO_P): Remove macros.
	* config/moxie/moxie-protos.h (moxie_function_value): Remove.
	* config/moxie/moxie.c (moxie_function_value): Make static.
	(moxie_libcall_value, moxie_function_value_regno_p): New functions.
	(TARGET_LIBCALL_VALUE, TARGET_FUNCTION_VALUE_REGNO_P): Define.

From-SVN: r160565
parent 567a4beb
2010-06-10 Anatoly Sokolov <aesok@post.ru>
* config/moxie/moxie.h (FUNCTION_VALUE, FUNCTION_OUTGOING_VALUE,
LIBCALL_VALUE, FUNCTION_VALUE_REGNO_P): Remove macros.
* config/moxie/moxie-protos.h (moxie_function_value): Remove.
* config/moxie/moxie.c (moxie_function_value): Make static.
(moxie_libcall_value, moxie_function_value_regno_p): New functions.
(TARGET_LIBCALL_VALUE, TARGET_FUNCTION_VALUE_REGNO_P): Define.
2010-06-10 Martin Jambor <mjambor@suse.cz>
* Makefile.in (tree-sra.o): Add DBGCNT_H to dependencies.
......
/* Prototypes for moxie.c functions used in the md file & elsewhere.
Copyright (C) 2009 Free Software Foundation, Inc.
Copyright (C) 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -21,8 +22,6 @@ extern void moxie_override_options (void);
extern void moxie_expand_prologue (void);
extern void moxie_expand_epilogue (void);
extern int moxie_initial_elimination_offset (int, int);
extern rtx moxie_function_value (const_tree, const_tree,
bool ATTRIBUTE_UNUSED);
extern void moxie_print_operand (FILE *, rtx, int);
extern void moxie_print_operand_address (FILE *, rtx);
#ifdef RTX_CODE
......
......@@ -70,7 +70,7 @@ moxie_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
We always return values in register $r0 for moxie. */
rtx
static rtx
moxie_function_value (const_tree valtype,
const_tree fntype_or_decl ATTRIBUTE_UNUSED,
bool outgoing ATTRIBUTE_UNUSED)
......@@ -78,6 +78,27 @@ moxie_function_value (const_tree valtype,
return gen_rtx_REG (TYPE_MODE (valtype), MOXIE_R0);
}
/* Define how to find the value returned by a library function.
We always return values in register $r0 for moxie. */
static rtx
moxie_libcall_value (enum machine_mode mode,
const_rtx fun ATTRIBUTE_UNUSED)
{
return gen_rtx_REG (mode, MOXIE_R0);
}
/* Handle TARGET_FUNCTION_VALUE_REGNO_P.
We always return values in register $r0 for moxie. */
static bool
moxie_function_value_regno_p (const unsigned int regno)
{
return (regno == MOXIE_R0);
}
/* Emit an error message when we're in an asm, and a fatal error for
"normal" insns. Formatted output isn't easily implemented, since we
use output_operand_lossage to output the actual message and handle the
......@@ -530,6 +551,10 @@ moxie_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
node node representing a data type. */
#undef TARGET_FUNCTION_VALUE
#define TARGET_FUNCTION_VALUE moxie_function_value
#undef TARGET_LIBCALL_VALUE
#define TARGET_LIBCALL_VALUE moxie_libcall_value
#undef TARGET_FUNCTION_VALUE_REGNO_P
#define TARGET_FUNCTION_VALUE_REGNO_P moxie_function_value_regno_p
#undef TARGET_FRAME_POINTER_REQUIRED
#define TARGET_FRAME_POINTER_REQUIRED hook_bool_void_true
......
......@@ -268,18 +268,6 @@ enum reg_class
/* How Scalar Function Values Are Returned */
/* These macros are deprecated, but we still need them for now since
the version of gcc we're using doesn't fully support
TARGET_FUNCTION_VALUE. */
#define FUNCTION_VALUE(VALTYPE, FUNC) \
moxie_function_value (VALTYPE, FUNC, 0)
#define FUNCTION_OUTGOING_VALUE(VALTYPE, FUNC) \
moxie_function_value (VALTYPE, FUNC, 1)
/* A C expression to create an RTX representing the place where a
library function returns a value of mode MODE. */
#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, 2)
/* STACK AND CALLING */
/* Define this macro if pushing a word onto the stack moves the stack
......@@ -429,10 +417,6 @@ enum reg_class
register in which function arguments are sometimes passed. */
#define FUNCTION_ARG_REGNO_P(r) (r >= MOXIE_R0 && r <= MOXIE_R5)
/* A C expression that is nonzero if REGNO is the number of a hard
register in which the values of called function may come back. */
#define FUNCTION_VALUE_REGNO_P(r) (r == MOXIE_R0)
/* A macro whose definition is the name of the class to which a valid
base register must belong. A base register is one used in an
address which is the register value plus a displacement. */
......
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