<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/110632>110632</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
aaarch64: there is no way to use the FPU on a softfloat target without creating an ABI mess
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
RalfJung
</td>
</tr>
</table>
<pre>
On aarch64, if one is building for a softfloat target (in Rust that's e.g. the target aarch64-unknown-none-softfloat, which in particular sets `-neon,-fp-armv8` target features by default), there seems to be no way to build some code that does make use of the FPU while remaining ABI-compatible with the rest of the binary: to enable use of the FPU, we have to set `+fp-armv8`, but this will inevitably also change which registers are being used to pass float arguments around.
On other targets, one can have the target do something like set `+soft-float`, so even if someone now enables e.g. SSE features on x86 or `fpregs` on ARM, code will be built with the softfloat ABI and thus be compatible with this target. But aarch64 doesn't seem to have something like `+soft-float`, meaning it is impossible to disentangle the float ABI from whether FPU instructions can be used.
Is there a specific reason this is currently not possible on aarch64, or is it just that nobody implemented this yet? Or am I missing some other way to generate aarch64 code that uses the FPU but uses a softfloat ABI?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0VN2O4rgSfhpzUwIFkwlwkQt65iD1kVa96tE-gJNUEk87NnKVYXn7VZkA3TvaG1CS8uf6fqoMkR08Yq2-vahvPxYm8Rhi_W5c___kh0UTumv95sGY2I5VqfR3sD0Ej2AJmmRdZ_0AfYhggELPvQuGgU0ckEHpnfXwnoiBR8NKbwlwNayAR7zXzMDL5D98uPilDx6XDyS57zLadgTr4WQi2zY5E4GQCVRVLD0Gr_T3ZX9amjidd6oq7sg9Gk4RCZordNib5FjpvSDyiBGBECcCDtAg-AAXc80PwgkoTAht6DA3Dl1Agsl8ICRCCH0mcPzzL-nNIUScjPUixOHlddmG6WTYNg7hYnnMtRGJ7-ca6028qs1BrkNvpPArbGaNMJozSg2Jl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