<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 - compiler-rt soft float support guarded by the wrong macro ( __SOFT_FP__ instead of __SOFTFP__)"
   href="https://bugs.llvm.org/show_bug.cgi?id=46294">46294</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>compiler-rt soft float support guarded by the wrong macro ( __SOFT_FP__ instead of __SOFTFP__)
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>10.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>builtins
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>salim.nasser@windriver.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>A handful of files in compiler-rt/builtins use the macro “__SOFT_FP__”. All the
uses are along the same lines. Here’s a representative example from
compiler-rt/lib/builtins/fixdfdi.c:

#ifndef __SOFT_FP__
// Support for systems that have hardware floating-point; can set the invalid
// flag as a side-effect of computation.

#else
// Support for systems that don't have hardware floating-point; there are no
// flags to set, and we don't want to code-gen to an unknown soft-float
// implementation.

#endif

The expectation seems to be that code guarded by #ifdef __SOFT_FP__ will be
used in soft float configurations.

However: __SOFT_FP__ is never set by the compiler (neither clang nor GCC). 

Nor (as far as I can tell) does it appear in any compiler-rt header file, build
script, or Makefile. In fact the only occurrences of this macro anywhere in the
llvm-project and GCC source trees are the aforementioned uses under
compiler-rt/builtins.

On the other hand both clang and GCC *do* set an alarmingly similar looking
macro - “__SOFTFP__” (no middle underscore) -  when compiling for soft-float.

So it appears that compiler-rt is using the wrong macro. Presumably this also
means that the "soft float" code has not actually been tested, since that code
path has never been enabled.</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>