diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2015-01-16 17:32:51 +0100 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2015-01-16 17:32:51 +0100 |
commit | 42373118cf709f3ac003908654eaedf4e2a91e86 (patch) | |
tree | e7801cfb6a60d4595710e9def7ff7a905c8b249f | |
parent | 96922e4c5885cd77db84aa9526d444759a3ca630 (diff) | |
download | gcc-42373118cf709f3ac003908654eaedf4e2a91e86.zip gcc-42373118cf709f3ac003908654eaedf4e2a91e86.tar.gz gcc-42373118cf709f3ac003908654eaedf4e2a91e86.tar.bz2 |
rs6000.c (TARGET_PROMOTE_FUNCTION_MODE): Implement as rs6000_promote_function_mode.
* config/rs6000/rs6000.c (TARGET_PROMOTE_FUNCTION_MODE): Implement
as rs6000_promote_function_mode. Move comment to there.
(rs6000_promote_function_mode): New function.
From-SVN: r219751
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 18 |
2 files changed, 21 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 76ccc9d..e6bc709 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2015-01-16 Segher Boessenkool <segher@kernel.crashing.org> + * config/rs6000/rs6000.c (TARGET_PROMOTE_FUNCTION_MODE): Implement + as rs6000_promote_function_mode. Move comment to there. + (rs6000_promote_function_mode): New function. + +2015-01-16 Segher Boessenkool <segher@kernel.crashing.org> + * config/rs6000/rs6000.h (PROMOTE_MODE): Correct test for when -m32 -mpowerpc64 is active. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index ca21413..1a3e7eb 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1511,10 +1511,8 @@ static const struct attribute_spec rs6000_attribute_table[] = #undef TARGET_MEMBER_TYPE_FORCES_BLK #define TARGET_MEMBER_TYPE_FORCES_BLK rs6000_member_type_forces_blk -/* On rs6000, function arguments are promoted, as are function return - values. */ #undef TARGET_PROMOTE_FUNCTION_MODE -#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote +#define TARGET_PROMOTE_FUNCTION_MODE rs6000_promote_function_mode #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY rs6000_return_in_memory @@ -9308,6 +9306,20 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype, } } +/* On rs6000, function arguments are promoted, as are function return + values. */ + +static machine_mode +rs6000_promote_function_mode (const_tree type ATTRIBUTE_UNUSED, + machine_mode mode, + int *punsignedp ATTRIBUTE_UNUSED, + const_tree, int) +{ + PROMOTE_MODE (mode, *punsignedp, type); + + return mode; +} + /* Return true if TYPE must be passed on the stack and not in registers. */ static bool |