public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/56010] New: Powerpc, -mcpu=native and -mtune=native  use the wrong name for target 7450
@ 2013-01-16 20:33 ulrik.sverdrup at gmail dot com
  2013-01-17 10:59 ` [Bug target/56010] " jakub at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ulrik.sverdrup at gmail dot com @ 2013-01-16 20:33 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56010
           Summary: Powerpc, -mcpu=native and -mtune=native  use the wrong
                    name for target 7450
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ulrik.sverdrup@gmail.com


-mcpu=native and -mtune=native  mismap/misspell the name of the (correctly)
identified cpu. Should be -mcpu=7450, not -mcpu=ppc7450.

$ gcc-4.7  -mcpu=native -c  rollsum.c
cc1: error: unrecognized argument in option ‘-mcpu=ppc7450’
cc1: note: valid arguments to ‘-mcpu=’ are: 401 403 405 405fp 440 440fp 464
464fp 476 476fp 505 601 602 603 603e 604 604e 620 630 740 7400 7450 750 801 821
823 8540 8548 860 970 G3 G4 G5 a2 cell common e300c2 e300c3 e500mc e500mc64
ec603e native power power2 power3 power4 power5 power5+ power6 power6x power7
powerpc powerpc64 rios rios1 rios2 rs64 rsc rsc1 titan

$ gcc-4.7 -mtune=native -c  rollsum.c
cc1: error: unrecognized argument in option ‘-mtune=ppc7450’
cc1: note: valid arguments to ‘-mtune=’ are: 401 403 405 405fp 440 440fp 464
464fp 476 476fp 505 601 602 603 603e 604 604e 620 630 740 7400 7450 750 801 821
823 8540 8548 860 970 G3 G4 G5 a2 cell common e300c2 e300c3 e500mc e500mc64
ec603e native power power2 power3 power4 power5 power5+ power6 power6x power7
powerpc powerpc64 rios rios1 rios2 rs64 rsc rsc1 titan

Using gcc-4.7 (Debian 4.7.2-4) 4.7.2


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

* [Bug target/56010] Powerpc, -mcpu=native and -mtune=native  use the wrong name for target 7450
  2013-01-16 20:33 [Bug c/56010] New: Powerpc, -mcpu=native and -mtune=native use the wrong name for target 7450 ulrik.sverdrup at gmail dot com
@ 2013-01-17 10:59 ` jakub at gcc dot gnu.org
  2013-01-17 22:28 ` bergner at vnet dot ibm.com
  2013-07-19 22:53 ` acrux at linuxmail dot org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-17 10:59 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dje at gcc dot gnu.org,
                   |                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-17 10:59:08 UTC ---
Seems the elf_platform () returned strings need some adjustment to match the
RS6000_CPU names.  Grepping Linux kernel, elf_platform can return e.g.
pa6t
power3
power4
power5
power5+
power6
power6x
power7
power7+
power8
powerpc
ppc403
ppc405
ppc440
ppc440gp
ppc470
ppc5554
ppc601
ppc603
ppc604
ppc7400
ppc7450
ppc750
ppc823
ppc8540
ppc8548
ppc970
ppca2
ppc-cell-be
ppce500mc
ppce5500
ppce6500

so, supposedly initialy "ppc" prefix, if any, should be dropped, "ppc-cell-be"
should be replaced by "cell" and most likely the string checked against the
asm_names[].cpu strings.  There are other minor differences, e.g. kernel has
ppc440 and ppc440gp, while gcc 440fp and 440 (do they match in this order, or
differently?).


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

* [Bug target/56010] Powerpc, -mcpu=native and -mtune=native  use the wrong name for target 7450
  2013-01-16 20:33 [Bug c/56010] New: Powerpc, -mcpu=native and -mtune=native use the wrong name for target 7450 ulrik.sverdrup at gmail dot com
  2013-01-17 10:59 ` [Bug target/56010] " jakub at gcc dot gnu.org
@ 2013-01-17 22:28 ` bergner at vnet dot ibm.com
  2013-07-19 22:53 ` acrux at linuxmail dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bergner at vnet dot ibm.com @ 2013-01-17 22:28 UTC (permalink / raw)
  To: gcc-bugs


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

Peter Bergner <bergner at vnet dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bergner at vnet dot ibm.com

--- Comment #2 from Peter Bergner <bergner at vnet dot ibm.com> 2013-01-17 22:27:34 UTC ---
Jakub Jelinek wrote:
> There are other minor differences, e.g. kernel has
> ppc440 and ppc440gp, while gcc 440fp and 440 (do they
> match in this order, or differently?).

Ick, If you look at kernel/cputable.c, it seems some of the
"ppc440" cpus have the PPC_FEATURE_HAS_FPU feature bit set,
while some don't, so we can't really rely on the AT_PLATFORM
value alone for the ppc440 cpus, we'll also have to look
at the HWCAP to see whether we should use 440 or 440fp.


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

* [Bug target/56010] Powerpc, -mcpu=native and -mtune=native  use the wrong name for target 7450
  2013-01-16 20:33 [Bug c/56010] New: Powerpc, -mcpu=native and -mtune=native use the wrong name for target 7450 ulrik.sverdrup at gmail dot com
  2013-01-17 10:59 ` [Bug target/56010] " jakub at gcc dot gnu.org
  2013-01-17 22:28 ` bergner at vnet dot ibm.com
@ 2013-07-19 22:53 ` acrux at linuxmail dot org
  2 siblings, 0 replies; 4+ messages in thread
From: acrux at linuxmail dot org @ 2013-07-19 22:53 UTC (permalink / raw)
  To: gcc-bugs

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

acrux <acrux at linuxmail dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |acrux at linuxmail dot org

--- Comment #3 from acrux <acrux at linuxmail dot org> ---
here same issue.


root@hermes:/usr/ports/ppc/opt/# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/powerpc-unknown-linux-gnu/4.7.3/lto-wrapper
Target: powerpc-unknown-linux-gnu
Configured with: ../gcc-4.7.3/configure --enable-bootstrap --disable-multilib
--prefix=/usr --mandir=/usr/man --libexecdir=/usr/lib
--enable-languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-shared --enable-lto --with-ppl
--enable-cloog-backend=ppl --disable-ppl-version-check
--disable-cloog-version-check --disable-nls --with-x=no --enable-long-long
--with-system-zlib --with-pkgversion='CRUX PPC'
--host=powerpc-unknown-linux-gnu --build=powerpc-unknown-linux-gnu
--target=powerpc-unknown-linux-gnu
Thread model: posix
gcc version 4.7.3 (CRUX PPC)

root@hermes:/usr/ports/ppc/opt/# gcc -c -Q -mcpu=native --help=target
cc1: error: unrecognized argument in option '-mcpu=ppc7450'
cc1: note: valid arguments to '-mcpu=' are: 401 403 405 405fp 440 440fp 464
464fp 476 476fp 505 601 602 603 603e 604 604e 620 630 740 7400 7450 750 801 821
823 8540 8548 860 970 G3 G4 G5 a2 cell common e300c2 e300c3 e500mc e500mc64
ec603e native power power2 power3 power4 power5 power5+ power6 power6x power7
powerpc powerpc64 rios rios1 rios2 rs64 rsc rsc1 titan
The following options are target specific:
  -G<number>                            0
  -m32                                  [enabled]
  -m64                                  [disabled]
  -mabi=altivec                         [disabled]
  -mabi=d32                             [enabled]
  -mabi=d64                             [disabled]
  -mabi=ibmlongdouble                   [enabled]
  -mabi=ieeelongdouble                  [disabled]
  -mabi=no-altivec                      [enabled]
  -mabi=no-spe                          [enabled]
  -mabi=spe                             [disabled]
  -mads                                 [disabled]
  -maix-struct-return                   [disabled]
  -malign-                              power
  -malign-branch-targets                [enabled]
  -mallow-df-permute                    [disabled]
  -mallow-movmisalign                   [enabled]
  -maltivec                             [disabled]
  -malways-hint                         [enabled]
  -mandroid                             [disabled]
  -mavoid-indexed-addresses             [enabled]
  -mbig                                 [enabled]
  -mbig-endian                          [enabled]
  -mbionic                              [disabled]
  -mbit-align                           [disabled]
  -mbit-word                            [disabled]
  -mblock-move-inline-limit=            0
  -mbss-plt                             [enabled]
  -mcall-
  -mcmpb                                [disabled]
  -mcpu=                                [default]
  -mdebug=
  -mdlmzb                               [disabled]
  -mdouble-float                        [disabled]
  -meabi                                [disabled]
  -memb                                 [disabled]
  -mfloat-gprs=                         no
  -mfp-in-toc                           [enabled]
  -mfprnd                               [disabled]
  -mfpu=                                none
  -mfriz                                [enabled]
  -mfull-toc                            [disabled]
  -mfused-madd
  -mgen-cell-microcode                  [enabled]
  -mglibc                               [enabled]
  -mhard-dfp                            [disabled]
  -mhard-float                          [enabled]
  -minsert-sched-nops=
  -misel                                [disabled]
  -misel=no
  -misel=yes
  -mlittle                              [disabled]
  -mlittle-endian                       [disabled]
  -mlong-double-<n>                     0
  -mlongcall                            [disabled]
  -mmfcrf                               [disabled]
  -mmfpgpr                              [disabled]
  -mminimal-toc                         [disabled]
  -mmulhw                               [disabled]
  -mmultiple                            [disabled]
  -mmvme                                [disabled]
  -mnew-mnemonics                       [enabled]
  -mnewlib                              [disabled]
  -mno-fp-in-toc                        [disabled]
  -mno-power                            [disabled]
  -mno-powerpc                          [disabled]
  -mno-sum-in-toc                       [disabled]
  -mno-toc                              [disabled]
  -mno-traceback                        [disabled]
  -mno-update                           [disabled]
  -mold-mnemonics                       [disabled]
  -mpaired                              [disabled]
  -mpointers-to-nested-functions        [enabled]
  -mpopcntb                             [disabled]
  -mpopcntd                             [disabled]
  -mpower                               [disabled]
  -mpower2                              [disabled]
  -mpowerpc                             [enabled]
  -mpowerpc-gfxopt                      [disabled]
  -mpowerpc-gpopt                       [disabled]
  -mpowerpc64                           [disabled]
  -mprioritize-restricted-insns=        0
  -mprototype                           [disabled]
  -mrecip                               [disabled]
  -mrecip-precision                     [disabled]
  -mrecip=
  -mregnames                            [disabled]
  -mrelocatable                         [disabled]
  -mrelocatable-lib                     [disabled]
  -msave-toc-indirect                   [disabled]
  -msched-costly-dep=
  -msched-epilog                        [enabled]
  -msched-groups                        [enabled]
  -msched-prolog                        [enabled]
  -msdata                               [disabled]
  -msdata=
  -msecure-plt                          [disabled]
  -mshlib                               [disabled]
  -msim                                 [disabled]
  -msimple-fpu                          [disabled]
  -msingle-float                        [disabled]
  -msingle-pic-base                     [disabled]
  -msoft-float                          [disabled]
  -mspe                                 [disabled]
  -mspe=no
  -mspe=yes
  -mstrict-align                        [disabled]
  -mstring                              [disabled]
  -msum-in-toc                          [enabled]
  -msvr4-struct-return                  [enabled]
  -mtls-markers                         [enabled]
  -mtls-size=                           32
  -mtoc                                 [disabled]
  -mtraceback=                          [default]
  -mtune=                               [default]
  -muclibc                              [disabled]
  -mupdate                              [enabled]
  -mveclibabi=
  -mvectorize-builtins                  [enabled]
  -mvrsave                              [disabled]
  -mvrsave=no
  -mvrsave=yes
  -mvsx                                 [disabled]
  -mvsx-align-128                       [disabled]
  -mvsx-scalar-double                   [enabled]
  -mvsx-scalar-memory                   [disabled]
  -mwarn-altivec-long                   [enabled]
  -mwarn-cell-microcode                 [disabled]
  -mxilinx-fpu                          [disabled]
  -mxl-compat                           [disabled]
  -myellowknife                         [disabled]

  Valid arguments to -malign-:
    natural power

  Known CPUs (for use with the -mcpu= and -mtune= options):
    401 403 405 405fp 440 440fp 464 464fp 476 476fp 505 601 602 603 603e 604
    604e 620 630 740 7400 7450 750 801 821 823 8540 8548 860 970 G3 G4 G5 a2
    cell common e300c2 e300c3 e500mc e500mc64 ec603e native power power2 power3
    power4 power5 power5+ power6 power6x power7 powerpc powerpc64 rios rios1
    rios2 rs64 rsc rsc1 titan

  Valid arguments to -mfloat-gprs=:
    double no single yes


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

end of thread, other threads:[~2013-07-19 22:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-16 20:33 [Bug c/56010] New: Powerpc, -mcpu=native and -mtune=native use the wrong name for target 7450 ulrik.sverdrup at gmail dot com
2013-01-17 10:59 ` [Bug target/56010] " jakub at gcc dot gnu.org
2013-01-17 22:28 ` bergner at vnet dot ibm.com
2013-07-19 22:53 ` acrux at linuxmail dot 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).