[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2011-03-01 Thread mrs at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381

m...@gcc.gnu.org mrs at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |NEW
 CC||mrs at gcc dot gnu.org

--- Comment #15 from mrs at gcc dot gnu.org mrs at gcc dot gnu.org 2011-03-01 
08:07:08 UTC ---
I don't think this is waiting on anything anymore.  It would be nice if someone
would check in the patch an unbreak the build, as it used to build.


[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2011-02-15 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381

--- Comment #14 from Dominique d'Humieres dominiq at lps dot ens.fr 
2011-02-15 21:06:59 UTC ---
Note that I did not have any problem to compile libcpp/lex.c on
powerpc-apple-darwin8 with
gcc version 4.0.1 (Apple Computer, Inc. build 5370):

...
gcc  -I../../work/libcpp -I. -I../../work/libcpp/../include
-I../../work/libcpp/include -I/sw/include -g -fkeep-inline-functions -W -Wall
-Wwrite-strings -Wmissing-format-attribute -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -pedantic -Wno-long-long 
-I../../work/libcpp -I. -I../../work/libcpp/../include
-I../../work/libcpp/include -I/sw/include -c -o lex.o -MT lex.o -MMD -MP -MF
.deps/lex.Tpo ../../work/libcpp/lex.c
...
/opt/gcc/build/./prev-gcc/xgcc -B/opt/gcc/build/./prev-gcc/
-B/opt/gcc/gcc4.6w/powerpc-apple-darwin8/bin/
-B/opt/gcc/gcc4.6w/powerpc-apple-darwin8/bin/
-B/opt/gcc/gcc4.6w/powerpc-apple-darwin8/lib/ -isystem
/opt/gcc/gcc4.6w/powerpc-apple-darwin8/include -isystem
/opt/gcc/gcc4.6w/powerpc-apple-darwin8/sys-include -I../../work/libcpp -I.
-I../../work/libcpp/../include -I../../work/libcpp/include -I/sw/include -g -O2
-mdynamic-no-pic -gtoggle -W -Wall -Wwrite-strings -Wmissing-format-attribute
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wc++-compat
-pedantic -Wno-long-long -Werror -I../../work/libcpp -I.
-I../../work/libcpp/../include -I../../work/libcpp/include -I/sw/include -c -o
lex.o -MT lex.o -MMD -MP -MF .deps/lex.Tpo ../../work/libcpp/lex.c


[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2011-02-09 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381

--- Comment #13 from Iain Sandoe iains at gcc dot gnu.org 2011-02-09 12:35:57 
UTC ---
(In reply to comment #6)
 (In reply to comment #5)
  I think altivec should disabled with gcc version 4.0.1 (Apple Inc. build
  5493). Otherwise this pr could be closed as wontfix.
 
 I'd prefer it if you provided some amount of detail about *what*
 fails with the patch attached to this PR, rather than just reporting
 the bare fact of not working.

Sorry ... I should have read the audit trail better.
The fault is a very subtle header-ordering 'gotcha'...

[At least on Darwin] One cannot include external headers after system.h because
of the fact that system.h re-defines bool.

... the reason that comment #12 works (which is essentially the same thing as
your attachment) is that altivec.h is included before system.h.

I guess on ppc64-linux there is no difference in the size of bool - and I don't
wish to re-open the debate about Darwin's way of doing it ('tis out of our
control in any event).

I still don't know if it's worth doing any more than below, for 4.6:

Index: libcpp/lex.c
===
--- libcpp/lex.c(revision 169914)
+++ libcpp/lex.c(working copy)
@@ -512,7 +513,7 @@ init_vectorized_lexer (void)
   search_line_fast = impl;
 }

-#elif defined(__GNUC__)  defined(__ALTIVEC__)
+#elif defined(__GNUC__)  (GCC_VERSION = 4005)  defined(__ALTIVEC__)

 /* A vection of the fast scanner using AltiVec vectorized byte compares.  */
 /* ??? Unfortunately, attribute(target(altivec)) is not yet supported,


[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2011-02-08 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381

Iain Sandoe iains at gcc dot gnu.org changed:

   What|Removed |Added

 CC||iains at gcc dot gnu.org

--- Comment #8 from Iain Sandoe iains at gcc dot gnu.org 2011-02-08 12:17:28 
UTC ---
what was the reason that the patch at comment #1 was not acceptable?

If the builtins were not available prior to 4.0.5, then the caveat seems
sensible ... I must be missing something ;)

===

if not, for all darwin 8  9 the system compiler is 4.0.1 
(3.3 for darwin 7, and I doubt trunk builds for earlier than that)

4.2.1 is not available on darwin 8 (so I'd imagine that bootstrap is broken
there without a ready workaround).  I don't have a ppc darwin 8 box available
right now - although I will try to crank one up before 4.6 forks.

I could not find a permutation of installed headers that gave the right result
- perhaps looking in the wrong place.

Do we want to pursue this further - or just accept a slower solution for the
(legacy) darwin versions?


[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2011-02-08 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381

--- Comment #9 from Richard Henderson rth at gcc dot gnu.org 2011-02-08 
16:17:10 UTC ---
I don't think we really want to pursue this further.

I had hoped to find a solution that satisfied the older apple compiler -- it
is supposed to support altivec after all -- but it remains a mystery what is
broken with that compiler.


[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2011-02-08 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381

--- Comment #10 from Iain Sandoe iains at gcc dot gnu.org 2011-02-08 16:44:15 
UTC ---
(In reply to comment #9)
 I don't think we really want to pursue this further.
 
 I had hoped to find a solution that satisfied the older apple compiler -- it
 is supposed to support altivec after all -- but it remains a mystery what is
 broken with that compiler.

OK, that's fair 
- so is the solution to apply (an updated) patch like comment #1  ?
- or must earlier darwin systems do that locally?

(I'm not clear whether the limitation of 4.0.5 applies generally or only to the
Apple Local versions)


[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2011-02-08 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381

--- Comment #11 from Richard Henderson rth at gcc dot gnu.org 2011-02-08 
16:52:41 UTC ---
Yes, a patch like in #1 would be fine.


[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2011-02-08 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381

--- Comment #12 from Iain Sandoe iains at gcc dot gnu.org 2011-02-08 21:25:05 
UTC ---
(In reply to comment #11)
 Yes, a patch like in #1 would be fine.

I will produce one in due course (unless Dominique beats me to it...)

-- the hack below is purely to satisfy curiosity  :-)
-- I doubt it is worth unravelling how to make it work in reality..

The hack produces a working stage1 compiler built from gcc-4.0.1 or gcc-4.2.1

it seems that gcc-4.0.1 does not recognize __attribute__((altivec(vector))) and
altivec.h does not indeed define the functions it complains about...

---

Index: libcpp/lex.c
===
--- libcpp/lex.c(revision 169914)
+++ libcpp/lex.c(working copy)
@@ -21,6 +21,7 @@ along with this program; see the file COPYING3.  I
 http://www.gnu.org/licenses/.  */

 #include config.h
+#include altivec.h
 #include system.h
 #include cpplib.h
 #include internal.h
@@ -519,10 +520,11 @@ init_vectorized_lexer (void)
so we can't compile this function without -maltivec on the command line
(or implied by some other switch).  */

+
 static const uchar *
 search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
 {
-  typedef __attribute__((altivec(vector))) unsigned char vc;
+  typedef __vector unsigned char vc ;

   const vc repl_nl = {
 '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n', 
@@ -550,14 +552,14 @@ search_line_fast (const uchar *s, const uchar *end

   /* Altivec loads automatically mask addresses with -16.  This lets us
  issue the first load as early as possible.  */
-  data = __builtin_vec_ld(0, (const vc *)s);
+  data = vec_ld(0, (const vc *)s);

   /* Discard bytes before the beginning of the buffer.  Do this by
  beginning with all ones and shifting in zeros according to the
  mis-alignment.  The LVSR instruction pulls the exact shift we
  want from the address.  */
-  mask = __builtin_vec_lvsr(0, s);
-  mask = __builtin_vec_perm(zero, ones, mask);
+  mask = vec_lvsr(0, s);
+  mask = vec_perm(zero, ones, mask);
   data = mask;

   /* While altivec loads mask addresses, we still need to align S so
@@ -571,20 +573,20 @@ search_line_fast (const uchar *s, const uchar *end
   vc m_nl, m_cr, m_bs, m_qm;

   s += 16;
-  data = __builtin_vec_ld(0, (const vc *)s);
+  data = vec_ld(0, (const vc *)s);

 start:
-  m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
-  m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
-  m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
-  m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
+  m_nl = (vc) vec_cmpeq(data, repl_nl);
+  m_cr = (vc) vec_cmpeq(data, repl_cr);
+  m_bs = (vc) vec_cmpeq(data, repl_bs);
+  m_qm = (vc) vec_cmpeq(data, repl_qm);
   t = (m_nl | m_cr) | (m_bs | m_qm);

   /* T now contains 0xff in bytes for which we matched one of the relevant
 characters.  We want to exit the loop if any byte in T is non-zero.
 Below is the expansion of vec_any_ne(t, zero).  */
 }
-  while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
+  while (!vec_any_ne(t, zero));

   {
 #define N  (sizeof(vc) / sizeof(long))


[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-10-01 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381

--- Comment #6 from Richard Henderson rth at gcc dot gnu.org 2010-10-01 
22:00:47 UTC ---
(In reply to comment #5)
 I think altivec should disabled with gcc version 4.0.1 (Apple Inc. build
 5493). Otherwise this pr could be closed as wontfix.

I'd prefer it if you provided some amount of detail about *what*
fails with the patch attached to this PR, rather than just reporting
the bare fact of not working.


[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-10-01 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381

--- Comment #7 from Dominique d'Humieres dominiq at lps dot ens.fr 2010-10-01 
23:33:03 UTC ---
(In reply to comment #6)
 I'd prefer it if you provided some amount of detail about *what*
 fails with the patch attached to this PR, rather than just reporting
 the bare fact of not working.

gcc  -I../../gcc-4.6-work/libcpp -I. -I../../gcc-4.6-work/libcpp/../include
-I../../gcc-4.6-work/libcpp/include  -g -fkeep-inline-functions -W -Wall
-Wwrite-strings -Wmissing-format-attribute -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -pedantic -Wno-long-long 
-I../../gcc-4.6-work/libcpp -I. -I../../gcc-4.6-work/libcpp/../include
-I../../gcc-4.6-work/libcpp/include  -c -o lex.o -MT lex.o -MMD -MP -MF
.deps/lex.Tpo ../../gcc-4.6-work/libcpp/lex.c
../../gcc-4.6-work/libcpp/lex.c:789: error: conflicting types for
'warn_in_comment'
../../gcc-4.6-work/libcpp/lex.c:62: error: previous declaration of
'warn_in_comment' was here
../../gcc-4.6-work/libcpp/lex.c: In function 'warn_in_comment':
../../gcc-4.6-work/libcpp/lex.c:796: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:801: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:810: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:811: warning: control reaches end of non-void
function
../../gcc-4.6-work/libcpp/lex.c: In function '_cpp_process_line_notes':
../../gcc-4.6-work/libcpp/lex.c:851: error: invalid operands to binary ||
../../gcc-4.6-work/libcpp/lex.c: At top level:
../../gcc-4.6-work/libcpp/lex.c:883: error: conflicting types for
'_cpp_skip_block_comment'
../../gcc-4.6-work/libcpp/internal.h:596: error: previous declaration of
'_cpp_skip_block_comment' was here
../../gcc-4.6-work/libcpp/lex.c: In function '_cpp_skip_block_comment':
../../gcc-4.6-work/libcpp/lex.c:922: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:934: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:935: warning: control reaches end of non-void
function
../../gcc-4.6-work/libcpp/lex.c: In function 'skip_whitespace':
../../gcc-4.6-work/libcpp/lex.c:958: error: incompatible types in
initialization
../../gcc-4.6-work/libcpp/lex.c:967: error: incompatible types in assignment
../../gcc-4.6-work/libcpp/lex.c:979: error: invalid operands to binary !=
../../gcc-4.6-work/libcpp/lex.c: In function 'forms_identifier_p':
../../gcc-4.6-work/libcpp/lex.c:1035: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:1044: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:1055: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:1059: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:1060: warning: control reaches end of non-void
function
../../gcc-4.6-work/libcpp/lex.c: In function 'lex_identifier':
../../gcc-4.6-work/libcpp/lex.c:1130: error: wrong type argument to unary
exclamation mark
../../gcc-4.6-work/libcpp/lex.c:1137: error: invalid operands to binary !=
../../gcc-4.6-work/libcpp/lex.c:1146: error: invalid operands to binary !=
../../gcc-4.6-work/libcpp/lex.c: In function 'lex_number':
../../gcc-4.6-work/libcpp/lex.c:1209: error: invalid operands to binary !=
../../gcc-4.6-work/libcpp/lex.c: In function 'lex_string':
../../gcc-4.6-work/libcpp/lex.c:1523: error: incompatible types in
initialization
../../gcc-4.6-work/libcpp/lex.c:1579: error: incompatible types in assignment
../../gcc-4.6-work/libcpp/lex.c:1582: error: invalid operands to binary !=
../../gcc-4.6-work/libcpp/lex.c: At top level:
../../gcc-4.6-work/libcpp/lex.c:1863: error: conflicting types for
'_cpp_get_fresh_line'
../../gcc-4.6-work/libcpp/internal.h:595: error: previous declaration of
'_cpp_get_fresh_line' was here
../../gcc-4.6-work/libcpp/lex.c: In function '_cpp_get_fresh_line':
../../gcc-4.6-work/libcpp/lex.c:1868: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:1875: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:1880: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:1885: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c:1899: error: incompatible types in return
../../gcc-4.6-work/libcpp/lex.c: In function '_cpp_lex_direct':
../../gcc-4.6-work/libcpp/lex.c:1944: error: wrong type argument to unary
exclamation mark
../../gcc-4.6-work/libcpp/lex.c:2044: error: incompatible type for argument 3
of 'lex_identifier'
../../gcc-4.6-work/libcpp/lex.c:2068: error: invalid operands to binary !=
../../gcc-4.6-work/libcpp/lex.c:2270: error: invalid operands to binary !=
../../gcc-4.6-work/libcpp/lex.c:2273: error: incompatible type for argument 3
of 'lex_identifier'
../../gcc-4.6-work/libcpp/lex.c: At top level:
../../gcc-4.6-work/libcpp/lex.c:2356: error: conflicting types for
'cpp_spell_token'
../../gcc-4.6-work/libcpp/include/cpplib.h:723: error: previous declaration of
'cpp_spell_token' was here
../../gcc-4.6-work/libcpp/lex.c: In function 

[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-09-30 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4


[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-09-11 Thread dominiq at lps dot ens dot fr


--- Comment #5 from dominiq at lps dot ens dot fr  2010-09-11 08:53 ---
I think altivec should disabled with gcc version 4.0.1 (Apple Inc. build
5493). Otherwise this pr could be closed as wontfix.


-- 

dominiq at lps dot ens dot fr changed:

   What|Removed |Added

   Last reconfirmed|2010-08-24 21:16:50 |2010-09-11 08:53:54
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381



[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-08-26 Thread rth at gcc dot gnu dot org


--- Comment #2 from rth at gcc dot gnu dot org  2010-08-26 16:27 ---
Created an attachment (id=21571)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21571action=view)
Use altivec.h

Rather than use gcc builtins directly, use the standard header file.
Hopefully this will work with Apple's GCC as well, and continue to
work in the future with any FSF GCC changes.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381



[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-08-26 Thread rth at gcc dot gnu dot org


--- Comment #3 from rth at gcc dot gnu dot org  2010-08-26 16:27 ---
The patch bootstraps on ppc64-linux; please test on Darwin.


-- 

rth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381



[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-08-26 Thread dominiq at lps dot ens dot fr


--- Comment #4 from dominiq at lps dot ens dot fr  2010-08-26 16:57 ---
Following a discussion on IRC I have tested the following patch that does not
work with gcc version 4.0.1 (Apple Inc. build 5493) and without 'GCC_VERSION
= 4005'. 

--- /opt/gcc/gcc-4.6-work/libcpp/lex.c  2010-08-25 00:53:19.0 +0200
+++ /opt/gcc/gcc-4.6-work/old-patches/lex.c 2010-08-23 18:46:46.0
+0200
@@ -264,17 +264,7 @@ search_line_acc_char (const uchar *s, co
 }
 }

-/* Disable on Solaris 2/x86 until the following problems can be properly
-   autoconfed:
-
-   The Solaris 8 assembler cannot assemble SSE2/SSE4.2 insns.
-   The Solaris 9 assembler cannot assemble SSE4.2 insns.
-   Before Solaris 9 Update 6, SSE insns cannot be executed.
-   The Solaris 10+ assembler tags objects with the instruction set
-   extensions used, so SSE4.2 executables cannot run on machines that
-   don't support that extension.  */
-
-#if (GCC_VERSION = 4005)  (defined(__i386__) || defined(__x86_64__)) 
!(defined(__sun__)  defined(__svr4__))
+#if (GCC_VERSION = 4005)  (defined(__i386__) || defined(__x86_64__))

 /* Replicated character data to be shared between implementations.
Recall that outside of a context with vector support we can't
@@ -410,7 +400,6 @@ search_line_sse2 (const uchar *s, const 
   return (const uchar *)p + found;
 }

-#ifdef HAVE_SSE4
 /* A version of the fast scanner using SSE 4.2 vectorized string insns.  */

 static const uchar *
@@ -465,11 +454,6 @@ search_line_sse42 (const uchar *s, const
   return s + index;
 }

-#else
-/* Work around out-dated assemblers without sse4 support.  */
-#define search_line_sse42 search_line_sse2
-#endif
-
 /* Check the CPU capabilities.  */

 #include ../gcc/config/i386/cpuid.h
@@ -512,7 +496,8 @@ init_vectorized_lexer (void)
   search_line_fast = impl;
 }

-#elif defined(__GNUC__)  defined(__ALTIVEC__)
+#elif GCC_VERSION = 4005  defined(__ALTIVEC__)
+#include altivec.h

 /* A vection of the fast scanner using AltiVec vectorized byte compares.  */
 /* ??? Unfortunately, attribute(target(altivec)) is not yet supported,
@@ -522,7 +507,7 @@ init_vectorized_lexer (void)
 static const uchar *
 search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
 {
-  typedef __attribute__((altivec(vector))) unsigned char vc;
+  typedef __vector unsigned char vc;

   const vc repl_nl = {
 '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n', 
@@ -550,14 +535,14 @@ search_line_fast (const uchar *s, const 

   /* Altivec loads automatically mask addresses with -16.  This lets us
  issue the first load as early as possible.  */
-  data = __builtin_vec_ld(0, (const vc *)s);
+  data = vec_ld(0, (const vc *)s);

   /* Discard bytes before the beginning of the buffer.  Do this by
  beginning with all ones and shifting in zeros according to the
  mis-alignment.  The LVSR instruction pulls the exact shift we
  want from the address.  */
-  mask = __builtin_vec_lvsr(0, s);
-  mask = __builtin_vec_perm(zero, ones, mask);
+  mask = vec_lvsr(0, s);
+  mask = vec_perm(zero, ones, mask);
   data = mask;

   /* While altivec loads mask addresses, we still need to align S so
@@ -571,20 +556,20 @@ search_line_fast (const uchar *s, const 
   vc m_nl, m_cr, m_bs, m_qm;

   s += 16;
-  data = __builtin_vec_ld(0, (const vc *)s);
+  data = vec_ld(0, (const vc *)s);

 start:
-  m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
-  m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
-  m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
-  m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
+  m_nl = (vc) vec_cmpeq(data, repl_nl);
+  m_cr = (vc) vec_cmpeq(data, repl_cr);
+  m_bs = (vc) vec_cmpeq(data, repl_bs);
+  m_qm = (vc) vec_cmpeq(data, repl_qm);
   t = (m_nl | m_cr) | (m_bs | m_qm);

   /* T now contains 0xff in bytes for which we matched one of the relevant
 characters.  We want to exit the loop if any byte in T is non-zero.
 Below is the expansion of vec_any_ne(t, zero).  */
 }
-  while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
+  while (!vec_any_ne(t, zero));

   {
 #define N  (sizeof(vc) / sizeof(long))


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381



[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-08-24 Thread dominiq at lps dot ens dot fr


--- Comment #1 from dominiq at lps dot ens dot fr  2010-08-24 10:38 ---
The stage1 failure comes with 'gcc version 4.0.1 (Apple Inc. build 5493)' and
is fixed (from IRC) with

--- ../_gcc_clean/libcpp/lex.c  2010-08-22 13:10:39.0 +0200
+++ ../gcc-4.6-work/old-patches/lex.c   2010-08-23 18:46:46.0 +0200
@@ -496,7 +496,7 @@ init_vectorized_lexer (void)
   search_line_fast = impl;
 }

-#elif defined(__GNUC__)  defined(__ALTIVEC__)
+#elif GCC_VERSION = 4005  defined(__ALTIVEC__)

 /* A vection of the fast scanner using AltiVec vectorized byte compares.  */
 /* ??? Unfortunately, attribute(target(altivec)) is not yet supported,

With 'gcc version 4.2.1 (Apple Inc. build 5577)' the original libcpp/lex.c
compiles (I am now at stage2).
This could explain why 'regress' was bootstrapping without problem.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381



[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-08-24 Thread rth at gcc dot gnu dot org


-- 

rth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rth at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-08-24 21:16:50
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381



[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-08-23 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381