This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/14960] -maltivec affects vector return with -mabi=no-altivec
- From: "hpenner at de dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Apr 2004 09:25:35 -0000
- Subject: [Bug target/14960] -maltivec affects vector return with -mabi=no-altivec
- References: <20040414231341.14960.janis187@us.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From hpenner at de dot ibm dot com 2004-04-19 09:25 -------
Yes, this is a bug. Looks to me, that rs6000_function_arg has a wrong check.
I think, we should check for TARGET_ALTIVEC_ABI instead of TARGET_ALTIVEC,
when we decide how to pass return value.
Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.397.2.35
diff -u -p -r1.397.2.35 rs6000.c
--- rs6000.c 30 Mar 2004 09:01:22 -0000 1.397.2.35
+++ rs6000.c 19 Apr 2004 09:21:52 -0000
@@ -16200,7 +16200,7 @@ rs6000_function_value (valtype, func)
&& TARGET_HARD_FLOAT
&& SPLIT_COMPLEX_ARGS)
return rs6000_complex_function_value (mode);
- else if (TREE_CODE (valtype) == VECTOR_TYPE && TARGET_ALTIVEC)
+ else if (TREE_CODE (valtype) == VECTOR_TYPE && TARGET_ALTIVEC_ABI)
regno = ALTIVEC_ARG_RETURN;
else
regno = GP_ARG_RETURN;
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |aldyh at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14960