This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/81193] New: PowerPC GCC __builtin_cpu_is and __builtin_cpu_supports should warn about old libraries


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

            Bug ID: 81193
           Summary: PowerPC GCC __builtin_cpu_is and
                    __builtin_cpu_supports should warn about old libraries
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: meissner at gcc dot gnu.org
  Target Milestone: ---

If GCC is configured with a new glibc, it supports the __builtin_cpu_is and
__builtin_cpu_supports built-in functions.

However, if GCC is configured with an old glibc, the various __builtin_cpu*
functions just return 0.

GCC should do either:

1) Warn that __builtin_cpu_is/__builtin_cpu_supports is not supported; (or)

2) It should call getauxval and check the HWCAP/HWCAP2 bits directly.  Perhaps
there should be a helper function in libgcc that stands the built-in calls and
the code generated for the built-in functions.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]