<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/124427>124427</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Error assembling movk instruction on aarch64 in clang 19 (breaks compiling isa-l on aarch64)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
DaGenix
</td>
</tr>
</table>
<pre>
The following assembly:
```asm
.equ p4_low_b0, 0x0000
movk x1, p4_low_b0, lsl 16
```
Could be assembled by earlier versions of clang (I tested 16, 17, and 18). However, starting with 5da801386c2b820a4596fc6d8da6b5f4a6da94b4, trying to assemble this code now produces:
```
> clang -c test.S
test.S:2:25: error: unexpected token in argument list
movk x1, p4_low_b0, lsl 16
^
```
If we modify the code to not use `.equ`:
```asm
movk x1, 0x0000, lsl 16
```asm
Then it assembles without error.
I found this issue when attempting to compile https://github.com/intel/isa-l on MacOS aarch64 with clang 19.
FYI: @MaskRay
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8k0tv2zgUhX8NtbmwQFHvhRaeJJ7JIhhgks2sAkq6slhTpMuHH_--oCS7DdIGoE2C5rm85zsmt1bsFWJD8r9I_hhx70Ztmkf-NypxiVrdX5u3EWHQUuqzUHvg1uLUyitJt4TOo6DL4HYidBvjdw8AcMzepT6_t5SwB6AXSikldDvp0yH8eknC9ocz0kpIil8LLvUftJc9tHi7GXtor4DcSIEGTmis0MqCHqCTXO2BsOoZHFqHfajHHiApwzdXPSQVYXUM_-gzntCEXeu4ccHXWbgR8p5XNEmromNtxSjP8roYuqKvel60-ZDxoud11mZB6cw16Jy-NwZuFBY63SMofYaj0b3v0H4mFdbp09rvppu7jV8J3a6LdMvCJyfpFtAYbcLCK7wcsQu2nD6gAqGAm72fUDmQwrob3q_YAsmfPiN-HuCMMOleDFdwIy4enAalHXiLQAoacg2CP8T-Mdg179-mupwndPs2BhPujs_OGWjvFs_x2hsM2qt-YSus9QjnIOTO4XR0awSdno5CIozOHWfgbEfYbi_c6Nu40xNhO6EcyjBbvpGgFbzw7t9X4Nx0Y5Et-S-JJPV69-7_50CeZPSF28N__ApR36R9ndY8wiYp07JKi4SyaGwSmg5liaxiXZtkeVW1iLxNCk4zrAvESDSMspwmLGc0ySmLS16mWBTFMKQ1dshIRnHiQsZSnqZYm300u20SlmWsjCRvUdr5nTI290kYC0_WNEGwaf3ekoyGP4L9WcIJJ7F5CjxvnAOxOS2hrDO-c0KrgOMGQqg7hvCWWoP8YFfAQXvntwoIqyNvZPMF-tDOOm2ORn_Dzs1BWI-WsN3q8NSwHwEAAP__DJJoNQ">