diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2012-03-07 15:03:12 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2012-03-07 07:03:12 -0800 |
commit | cccff71a90a9d9492bd85dd86042662bb23c2967 (patch) | |
tree | 333c335dd9ac0095a53e274b1ad4537d2b0ce712 /gcc | |
parent | 6eddd7b4f35fd5e258260126de69e9c1e7e2617d (diff) | |
download | gcc-cccff71a90a9d9492bd85dd86042662bb23c2967.zip gcc-cccff71a90a9d9492bd85dd86042662bb23c2967.tar.gz gcc-cccff71a90a9d9492bd85dd86042662bb23c2967.tar.bz2 |
Pass pointers in word_mode instead of Pmode
2012-03-07 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (function_value_64): Return pointers in
word_mode instead of Pmode.
(ix86_promote_function_mode): Likewise.
From-SVN: r185057
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3e5e76d..a4236cd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-03-07 H.J. Lu <hongjiu.lu@intel.com> + + * config/i386/i386.c (function_value_64): Return pointers in + word_mode instead of Pmode. + (ix86_promote_function_mode): Likewise. + 2012-03-07 Richard Guenther <rguenther@suse.de> * coverage.c (get_gcov_type): Use type_for_mode. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 973bbeb..0527a2f2 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -7240,8 +7240,8 @@ function_value_64 (enum machine_mode orig_mode, enum machine_mode mode, } else if (POINTER_TYPE_P (valtype)) { - /* Pointers are always returned in Pmode. */ - mode = Pmode; + /* Pointers are always returned in word_mode. */ + mode = word_mode; } ret = construct_container (mode, orig_mode, valtype, 1, @@ -7312,7 +7312,8 @@ ix86_function_value (const_tree valtype, const_tree fntype_or_decl, return ix86_function_value_1 (valtype, fntype_or_decl, orig_mode, mode); } -/* Pointer function arguments and return values are promoted to Pmode. */ +/* Pointer function arguments and return values are promoted to + word_mode. */ static enum machine_mode ix86_promote_function_mode (const_tree type, enum machine_mode mode, @@ -7322,7 +7323,7 @@ ix86_promote_function_mode (const_tree type, enum machine_mode mode, if (type != NULL_TREE && POINTER_TYPE_P (type)) { *punsignedp = POINTERS_EXTEND_UNSIGNED; - return Pmode; + return word_mode; } return default_promote_function_mode (type, mode, punsignedp, fntype, for_return); |