public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/47272] New: In addition to the bug uncovered in 42751, gcc can't bootstrap using --with-cpu=power7
@ 2011-01-12 21:17 meissner at gcc dot gnu.org
  2011-01-12 22:18 ` [Bug target/47272] GCC can't bootstrap on powerpc64-linx " meissner at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-01-12 21:17 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: In addition to the bug uncovered in 42751, gcc can't
                    bootstrap using --with-cpu=power7
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: target
        AssignedTo: meissner@gcc.gnu.org
        ReportedBy: meissner@gcc.gnu.org
                CC: bergner@vnet.ibm.com
        Depends on: 42751
              Host: powerpc64-linux
            Target: powerpc64-linux
             Build: powerpc64-linux


The VSX support changed to use the VSX form of the instruction if both VSX and
Altivec forms existed.  Unfortunately, there are differences between the
Altivec memory references instructions (LVX/STVX) and the VSX memory reference
instructions (LXVW4X/STXVW4X).  In particular, the Altivec memory instructions
ignore the bottom 3 bits of the address field, and the VSX instructions do not.
 The altivec code in libcpp/lex.c was coded such that it knew about ignoring
the bottom 3 bits of the load.

Thus we should modify __builtin_vec_ld and __builtin_vec_st to use the Altivec
versions of the instructions, and provide other builtins that can use either
the altivec or VSX memory instructions, depending on the switches used.

In addition, during testing, I discovered that __builtin_vec_ld and
__builtin_vec_st don't support the vector double and vector long long types
added with VSX.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/47272] GCC can't bootstrap on powerpc64-linx using --with-cpu=power7
  2011-01-12 21:17 [Bug target/47272] New: In addition to the bug uncovered in 42751, gcc can't bootstrap using --with-cpu=power7 meissner at gcc dot gnu.org
@ 2011-01-12 22:18 ` meissner at gcc dot gnu.org
  2011-01-12 22:38 ` meissner at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-01-12 22:18 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Meissner <meissner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.01.12 21:53:09
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/47272] GCC can't bootstrap on powerpc64-linx using --with-cpu=power7
  2011-01-12 21:17 [Bug target/47272] New: In addition to the bug uncovered in 42751, gcc can't bootstrap using --with-cpu=power7 meissner at gcc dot gnu.org
  2011-01-12 22:18 ` [Bug target/47272] GCC can't bootstrap on powerpc64-linx " meissner at gcc dot gnu.org
@ 2011-01-12 22:38 ` meissner at gcc dot gnu.org
  2011-01-20 21:56 ` meissner at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-01-12 22:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Michael Meissner <meissner at gcc dot gnu.org> 2011-01-12 21:54:25 UTC ---
Note, the fixes for 47251 will be needed in addition to changes for this bug in
order to do a full bootstrap on a power7 system using the --with-cpu=power7
configure option.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/47272] GCC can't bootstrap on powerpc64-linx using --with-cpu=power7
  2011-01-12 21:17 [Bug target/47272] New: In addition to the bug uncovered in 42751, gcc can't bootstrap using --with-cpu=power7 meissner at gcc dot gnu.org
  2011-01-12 22:18 ` [Bug target/47272] GCC can't bootstrap on powerpc64-linx " meissner at gcc dot gnu.org
  2011-01-12 22:38 ` meissner at gcc dot gnu.org
@ 2011-01-20 21:56 ` meissner at gcc dot gnu.org
  2011-02-03  5:42 ` meissner at gcc dot gnu.org
  2011-02-03  5:43 ` meissner at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-01-20 21:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Michael Meissner <meissner at gcc dot gnu.org> 2011-01-20 20:57:54 UTC ---
Created attachment 23052
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23052
Preliminary patch to allow --with-cpu=power7 to work

The root problem is under VSX, the vec_ld/vec_st builtins use VSX memory
instructions which have different semantics than Altivec when the memory is not
aligned.  The Altivec speedup in libcpp/lex.c specifically knows about the
Altivec behaviour and accesses the wrong memory location if the compiler is
built with VSX instructions.

This patch changes vec_ld/vec_st to go back to using Altivec instructions.  It
also adds vector double/vector long long support to the Altivec builtin whole
vector memory operations.  However, in doing so, it may affect users who have
been using GCC 4.5 for VSX that expects to use VSX instructions.  I anticipate
this is not the final patch for the problem.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/47272] GCC can't bootstrap on powerpc64-linx using --with-cpu=power7
  2011-01-12 21:17 [Bug target/47272] New: In addition to the bug uncovered in 42751, gcc can't bootstrap using --with-cpu=power7 meissner at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-01-20 21:56 ` meissner at gcc dot gnu.org
@ 2011-02-03  5:42 ` meissner at gcc dot gnu.org
  2011-02-03  5:43 ` meissner at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-02-03  5:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Michael Meissner <meissner at gcc dot gnu.org> 2011-02-03 05:42:23 UTC ---
Author: meissner
Date: Thu Feb  3 05:42:19 2011
New Revision: 169780

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169780
Log:
Fix PR target/47272

Added:
    trunk/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/altivec.h
    trunk/gcc/config/rs6000/altivec.md
    trunk/gcc/config/rs6000/rs6000-builtin.def
    trunk/gcc/config/rs6000/rs6000-c.c
    trunk/gcc/config/rs6000/rs6000-protos.h
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/config/rs6000/rs6000.h
    trunk/gcc/config/rs6000/vector.md
    trunk/gcc/config/rs6000/vsx.md
    trunk/gcc/doc/extend.texi
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/powerpc/avoid-indexed-addresses.c
    trunk/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c
    trunk/gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/47272] GCC can't bootstrap on powerpc64-linx using --with-cpu=power7
  2011-01-12 21:17 [Bug target/47272] New: In addition to the bug uncovered in 42751, gcc can't bootstrap using --with-cpu=power7 meissner at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-02-03  5:42 ` meissner at gcc dot gnu.org
@ 2011-02-03  5:43 ` meissner at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-02-03  5:43 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Meissner <meissner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Michael Meissner <meissner at gcc dot gnu.org> 2011-02-03 05:43:34 UTC ---
Patch committed Feb. 3, 2011, subversion id 169780.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-02-03  5:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-12 21:17 [Bug target/47272] New: In addition to the bug uncovered in 42751, gcc can't bootstrap using --with-cpu=power7 meissner at gcc dot gnu.org
2011-01-12 22:18 ` [Bug target/47272] GCC can't bootstrap on powerpc64-linx " meissner at gcc dot gnu.org
2011-01-12 22:38 ` meissner at gcc dot gnu.org
2011-01-20 21:56 ` meissner at gcc dot gnu.org
2011-02-03  5:42 ` meissner at gcc dot gnu.org
2011-02-03  5:43 ` meissner at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).