From 5edea4c66480239d8a6c75ca976af634ea6d1253 Mon Sep 17 00:00:00 2001 From: Janis Johnson Date: Fri, 3 Dec 2004 17:37:12 +0000 Subject: [PATCH] extend.texi (AltiVec Builtins): Fix info about signedness. * doc/extend.texi (AltiVec Builtins): Fix info about signedness. * testsuite/gcc.dg/altivec-18.c: Fix for darwin From-SVN: r91688 --- gcc/ChangeLog | 4 ++++ gcc/doc/extend.texi | 7 ++++--- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/altivec-18.c | 7 ++++--- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2aab1af8e79..a397f592148 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-12-03 Janis Johnson + + * doc/extend.texi (AltiVec Builtins): Fix info about signedness. + 2004-12-03 Andreas Tobler * config/rs6000/rs6000.c (rs6000_override_options): Protect diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index f4134b164b6..8a3decd7257 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -6620,9 +6620,10 @@ A vector initializer requires no cast if the vector constant is of the same type as the variable it is initializing. @item -If @code{signed} or @code{unsigned} is omitted, the vector type defaults -to @code{signed} for @code{vector int} or @code{vector short} and to -@code{unsigned} for @code{vector char}. +If @code{signed} or @code{unsigned} is omitted, the signedness of the +vector type is the default signedness of the base type. The default +varies depending on the operating system, so a portable program should +always specify the signedness. @item Compiling with @option{-maltivec} adds keywords @code{__vector}, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7f6dc120bd0..eba1f1eeebf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-12-03 Janis Johnson + + * gcc.dg/altivec-18.c: Fix for darwin + 2004-12-03 Nathan Sidwell PR c++/18782 diff --git a/gcc/testsuite/gcc.dg/altivec-18.c b/gcc/testsuite/gcc.dg/altivec-18.c index af5687e0a6b..9a3ee33f63d 100644 --- a/gcc/testsuite/gcc.dg/altivec-18.c +++ b/gcc/testsuite/gcc.dg/altivec-18.c @@ -1,13 +1,14 @@ /* { dg-do compile { target powerpc*-*-* } } */ /* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "-maltivec" } { "" } } */ /* { dg-options "-maltivec -mabi=altivec" } */ -/* { dg-final { scan-assembler "vcmpgtub" } } */ +/* { dg-final { scan-assembler "vcmpgtub" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler "vcmpgtsb" { target *-*-darwin* } } } */ /* { dg-final { scan-assembler "vcmpgtsh" } } */ /* { dg-final { scan-assembler "vcmpgtsw" } } */ /* Verify a statement in the GCC Manual that vector type specifiers can - omit "signed" or "unsigned", with the default being "signed" for int - and short, and "unsigned" for char. */ + omit "signed" or "unsigned". The default is the default signedness + of the base type, which differs depending on the ABI. */ #include -- 2.30.2