Check for Altivec mode when returning altivec register.
authorFariborz Jahanian <fjahanian@apple.com>
Tue, 17 Aug 2004 16:40:40 +0000 (16:40 +0000)
committerFariborz Jahanian <fjahanian@gcc.gnu.org>
Tue, 17 Aug 2004 16:40:40 +0000 (16:40 +0000)
Reviewed by David Edehlson.

From-SVN: r86135

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 47a6ede89925e6666e4a634b3155fd3cac7cb6b6..5d06f493dea435f191446f7cc5ce45cf86fd768c 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-17  Fariborz Jahanian <fjahanian@apple.com>
+
+       * config/rs6000/rs6000.c (rs6000_function_value): Check for
+       altivec mode for altivec return register.
+
 2004-08-17  David Edelsohn  <edelsohn@gnu.org>
 
        Revert 2004-08-16  Stan Shebs  <shebs@apple.com>
index a3a8f34e2371f1139336f08d765f40b181f81c1f..03125965c3879ea31e9887c8e35d09539cadda6c 100644 (file)
@@ -17047,7 +17047,8 @@ rs6000_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
           && targetm.calls.split_complex_arg)
     return rs6000_complex_function_value (mode);
   else if (TREE_CODE (valtype) == VECTOR_TYPE
-          && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI)
+          && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI
+          && ALTIVEC_VECTOR_MODE(mode))
     regno = ALTIVEC_ARG_RETURN;
   else
     regno = GP_ARG_RETURN;