<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59294>59294</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
error: write to reserved register 'R7' in inline asm
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
google-mirror
</td>
</tr>
</table>
<pre>
```
:113:20: error: write to reserved register 'R7'
__asm__ volatile("swi #0"
^
```
To clarify, these are the combinations that work or don't work:
works:
clang -mthumb -fomit-frame-pointer
clang -mthumb -fomit-frame-pointer -O0
clang -marm
clang -marm -O3
broken:
clang -mthumb
clang -mthumb -O0
clang -mthumb -fomit-frame-pointer -O1
clang -mthumb -fomit-frame-pointer -O3
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkstu2zwQhZ9mtBnIoIa6WAst_P-ptwGK7g1KGklseAlIykbevpBitGkaFA1AkMPh4ZxvcVSMenbMHVT_QfWQqTUtPnSz97Ph3OoQfMh6P750UIv7Eg8gTiBPRSFBnkiAPCFvwq24BZ0Yk8fAkcOVRww865g4IFDztQFqXgcgXi4q2ssFr96opA0DHYEo3jQCSQFEdyFUX-6e7xD2_ZvHwaigpxeg_zEtHBlV4K3CwdteO5W0dxHTohLefHhCH3D0Dqh5vYM8vR24teLP3mCUmzG3aVltj_nkrU75FJTl_Nlrlzj8qw7zR_G7VgX7RwPzR_mWpg_-id3HOB86vzf5K1DxCa3Mxk6OrWxVxl1R121bV3SkbOn6shayOXJLhVBTO8m2V8yiaMbyOFWiyHRHgqggQaIpStkexmbq5dTXdV02A4kGSsFWaXMw5moPPsyZjnHlrmqpLTOjejZxjyiR4xvuj1tAqocsdNufvF_nCKUwOqb4a0rSyXD3mXCidqid0Y5RRZutwXRLSs97IOgMdJ51Wtb-MHgLdN6M7kf-HPx3HhLQeceLQOcd_0cAAAD__y9WDT0">