https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97367

            Bug ID: 97367
           Summary: powerpc64 g5 and cell optimizations result in .machine
                    power7
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rene at exactcode dot de
  Target Milestone: ---

Created attachment 49341
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49341&action=edit
Patch

Since reworking the rs6000 .machine output selection in commit
e154242724b084380e3221df7c08fcdbd8460674 22 May 2019, compiling glibc with
either G5 or cell results in power7 assembly optimizations to be chosen, which
obviously crash with illegal instructions. This is because gcc's .machine
output was accidentally changed due to OPTION_MASK_ALTIVEC only otherwise
present in IBM CPUs since power7.

powerpc64-t2-linux-gnu-gcc  test.c -S -o - -mcpu=G5
        .file   "test.c"
        .machine power7
        .abiversion 2
        .section        ".text"
        .ident  "GCC: (GNU) 10.2.0"
        .section        .note.GNU-stack,"",@progbits

Attached patch fixes this to filter out ALTIVEC just like GFXOPT and GPOPT.

Reply via email to