<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Generic ARM cpu targets"
   href="https://llvm.org/bugs/show_bug.cgi?id=29030">29030</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Generic ARM cpu targets
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: ARM
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>yyc1992@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Compare to other backend like x86 and ppc, the ARM/AArch64 CPU list/detection
seems to be missing support for generic archs. Examples of such in the x86
backends includes `core-avx2`, `x86_64`. OTOH, the CPU list in ARM only seems
to include specific CPU parts and core designs but it doesn't include generic
archs like armv7 etc. It would be nice to allow these arch names to be
specified as the CPU names too.

The native target detection doesn't seem to have a nice fallback to handle this
either. A few options that can be used to detect this on linux.
1. the `model name` or `Processor` field of `cpuinfo` contains `elf_platform`,
which should be a good lower bound on arch the current CPU supports. (The field
changed name between 3.10 and 4.0 though....).
2. the `CPU Archetecture`, `CPU Variant` fields can be used too.
3. `utcname::machine` returned by `uname()` is also the `elf_platform` should
be more reliable than reading `cpuinfo`.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>