<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Fix aeabi_cfcmp.S and aeabi_cdcmp.S for Thumb2 MachO targets"
   href="https://bugs.llvm.org/show_bug.cgi?id=34768">34768</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Fix aeabi_cfcmp.S and aeabi_cdcmp.S for Thumb2 MachO targets
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>compiler-rt
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>manojgupta@google.com
          </td>
        </tr>

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

        <tr>
          <th>Blocks</th>
          <td>34715
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Peter Smith <<a href="mailto:Peter.Smith@arm.com">Peter.Smith@arm.com</a>> wrote:
To hazard a guess at what the problem is when compiling with Thumb2 using
--target=armv7k-watchos

The bne __aeabi_cdcmple is a Thumb2 conditional branch to a symbol defined in a
separate section (thanks to the subsections_via_symbols). In ELF there is a
relocation directive R_ARM_THM_JMP19 I think. Whereas I don't think that there
is one defined for Mach-O.

Personally if these symbols are in different sections it isn't ideal to use a
conditional branch in Thumb2 even when a relocation exists as the range is only
+- 1 MiB. I suggest when compiling in Thumb2 we separate the comparison and do
an unconditional branch.

This is blocking form landing fix for PR 34715.</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - compiler-rt builtins are broken for thumb"
   href="https://bugs.llvm.org/show_bug.cgi?id=34715">Bug 34715</a>] compiler-rt builtins are broken for thumb
              </li>
          </ul>
        </div>
        <br>

      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>