diff options
author | Anatoly Sokolov <aesok@post.ru> | 2015-07-31 00:36:18 +0300 |
---|---|---|
committer | Anatoly Sokolov <aesok@gcc.gnu.org> | 2015-07-31 00:36:18 +0300 |
commit | 1a31dcd0148ad75a78d0963bdeae05ce7df3b308 (patch) | |
tree | e8ee364041b895d4fa7508c97b2daca02f4b835f /gcc/config/v850 | |
parent | 3403a1a9597dd6f853c25aff2290a16d3a9c9d00 (diff) | |
download | gcc-1a31dcd0148ad75a78d0963bdeae05ce7df3b308.zip gcc-1a31dcd0148ad75a78d0963bdeae05ce7df3b308.tar.gz gcc-1a31dcd0148ad75a78d0963bdeae05ce7df3b308.tar.bz2 |
[V850] Hookize LIBCALL_VALUE
From-SVN: r226418
Diffstat (limited to 'gcc/config/v850')
-rw-r--r-- | gcc/config/v850/v850.c | 15 | ||||
-rw-r--r-- | gcc/config/v850/v850.h | 6 | ||||
-rw-r--r-- | gcc/config/v850/v850.md | 1 |
3 files changed, 14 insertions, 8 deletions
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index 2474e75..a03f5e2 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -2979,7 +2979,7 @@ v850_select_section (tree exp, static bool v850_function_value_regno_p (const unsigned int regno) { - return (regno == 10); + return (regno == RV_REGNUM); } /* Worker function for TARGET_RETURN_IN_MEMORY. */ @@ -3002,7 +3002,16 @@ v850_function_value (const_tree valtype, const_tree fn_decl_or_type ATTRIBUTE_UNUSED, bool outgoing ATTRIBUTE_UNUSED) { - return gen_rtx_REG (TYPE_MODE (valtype), 10); + return gen_rtx_REG (TYPE_MODE (valtype), RV_REGNUM); +} + +/* Implement TARGET_LIBCALL_VALUE. */ + +static rtx +v850_libcall_value (machine_mode mode, + const_rtx func ATTRIBUTE_UNUSED) +{ + return gen_rtx_REG (mode, RV_REGNUM); } @@ -3304,6 +3313,8 @@ v850_gen_movdi (rtx * operands) #define TARGET_FUNCTION_VALUE_REGNO_P v850_function_value_regno_p #undef TARGET_FUNCTION_VALUE #define TARGET_FUNCTION_VALUE v850_function_value +#undef TARGET_LIBCALL_VALUE +#define TARGET_LIBCALL_VALUE v850_libcall_value #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h index dcc169b..7b65187 100644 --- a/gcc/config/v850/v850.h +++ b/gcc/config/v850/v850.h @@ -549,12 +549,6 @@ struct cum_arg { int nbytes; }; #define FUNCTION_ARG_REGNO_P(N) (N >= 6 && N <= 9) -/* Define how to find the value returned by a library function - assuming the value has mode MODE. */ - -#define LIBCALL_VALUE(MODE) \ - gen_rtx_REG (MODE, 10) - #define DEFAULT_PCC_STRUCT_RETURN 0 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, diff --git a/gcc/config/v850/v850.md b/gcc/config/v850/v850.md index 7f2c5bb..5d7bd5f 100644 --- a/gcc/config/v850/v850.md +++ b/gcc/config/v850/v850.md @@ -39,6 +39,7 @@ [(ZERO_REGNUM 0) ; constant zero (SP_REGNUM 3) ; Stack Pointer (GP_REGNUM 4) ; GP Pointer + (RV_REGNUM 10) ; Return value register (EP_REGNUM 30) ; EP pointer (LP_REGNUM 31) ; Return address register (CC_REGNUM 32) ; Condition code pseudo register |