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

            Bug ID: 84129
           Summary: GCC on AArch32 no longer compiles files which change
                    architectures using in-line assembly.
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tnfchris at gcc dot gnu.org
                CC: arnd at linaro dot org
  Target Milestone: ---
            Target: arm*-*-*

Commit r255468 broke compilation on Arm when in-line assembly is used to switch
architectures:

 asm("    .arch armv5te\n");
 void cpu_has_iwmmxt(void)
 {
   int lo;
   int hi;
   __asm__ __volatile__ (
      "mcrr   p0, 0, %2, %3, c0\n"
      : "=r" (lo), "=r" (hi)
      : "r" (0), "r" (0x100));
 }

used to work and now doesn't. This breaks the Linux kernel compilation.
Using the new approach instead of in-line assembly

 #pragma GCC target("arch=armv5te")

results in a cpp warning being emitted when the architecture is changed.

Reply via email to