<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/72157>72157</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Cannot compile FEnv implementation with software floating-point
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
petrhosek
</td>
</tr>
</table>
<pre>
I tried compiling LLVM libc for Cortext-M0+ with software floating-point, but I hit a compiler error in https://github.com/llvm/llvm-project/blob/269685545e439ad050b67740533c59f965cae955/libc/src/__support/FPUtil/arm/FEnvImpl.h#L47-L50
```
fatal error: error in backend: Cannot select: intrinsic %llvm.arm.get.fpscr
...
fatal error: error in backend: Cannot select: intrinsic %llvm.arm.set.fpscr
```
This is because Cortex-M0+ doesn't have an FPU so there's no `FPSCR` register.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysklFr3DgUhX-N_HIZI0uWPXrww2SyhsAEwu5mX4NsX9vayJKRrpP23xdPpoT2oVAoGAsJce45Op9JyU4esWHqjqn7zGw0h9isSHEOCV-zLgxfmwegaHGAPiyrddZPcLn89wjOdj2MIcI5RMIvdHjkTNzBu6UZUhjp3USE0QVD1k-HNVhPTJyh2wgeYLYE5qaIETDGEMF6mInWxOSJiZaJdrI0b13eh4WJ1rm378thjeF_7ImJtnOhY6IVla6OSpUKS6nNwBXvqrouuZKyV3rUleoNaqV2Adv1TLQp7v-Xl7Sta4i7VPv0TNYx0Zq4D2r_8m8Py-rymQl5KevDRXHG7xk_sYrfvut2NGTcRwQmT59ZOtO_oh_2s7PxPhAkdLtreQLrKVqfbA9MqD1SbuKST0j5uKY-fgjnef6nJ6QfJ_yU5N_ZJrAJOuzNlvDW7K3YIWDyTNQEs3lDMB7ap2dIAWjGiEzUCXwAVvH26Z_z36ziEHGyiTDm2dDIQUttMmyKSmvN61Ifs7kZDWKHY49Ho7URw7HTcr_XV4Xsj0pnthFcyKIopOCykMe8lmVhBpTFwEsuqoKVHBdjXX6NGOKU2ZQ2bGpRqDpzpkOXrngL8VG82EGPzRWjbpsSK7mzidKnAFly2Nwe9IYo7DSAXVaHC3oyZIP_JerZFl3z2zRfvScm2qv9bwEAAP__-pMphQ">