<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/111474>111474</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[llvm-mc] llcm-mc cannot decode certain aarch64 instructions
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zhaopengoog
</td>
</tr>
</table>
<pre>
My llvm-mc 20.0.0 can decode regular aarch64 instructions, but fail on some special instructions like LSE, MTE extension.
> ./llvm-mc --version
LLVM (http://llvm.org/):
LLVM version 20.0.0git
DEBUG build with assertions.
> # llvm-mc works on regular aarch64 instructions
> llvm-mc -triple=arm64 -disassemble <<< '0x91 0x00 0x22 0x94'
.text
bl #8913476`
# an CASA instruction word decoded by objdump
> objdump -d aarch64.o
000000000044b890 <__aarch64_cas4_acq>:
...
44b8a0: 88e07c41 casa w0, w1, [x2]
...
# But llvm-mc cannot decode LSE instructions like CASA
> llvm-mc -triple=arm64 -disassemble <<< '0x41 0x7c 0xe0 0xc8'
.text
<stdin>:1:1: warning: invalid instruction encoding
0x41 0x7c 0xe0 0xc8
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVM1y8yYUfRq0uWMNAv0utHBip5tklbbbDAIs830IXECx0qfvoB-nad1MGVsjXQ6Xc-6By7xXvZGyRcUDKg4JG8PZuvbPM7MXaXpr-6Sz4qN9-QCt34fdwIHgFKcYODMgJLdCgpP9qJkDxhw_lzko44MbeVDWeEQeoRsDnJjSYA14O0jwF8kV01-AoNVPCc-vx7ji5dcjyClI45U1KcIHhPfrkx4BUkSeNjqw271LF3ELAOD5-fcXQKQ-h3BBdI_I0wpPrevnryaGF_QMXhOs0noVtlSH48Nvv0A3Ki3gqsIZmPfSzXz_xQoReqvR1bqfPsr9tjS3pZ9aglMXLRE9MDeUOeyE8nHLodMSEH1cfoBIhacmAzxhDHgiBPDU5IhUALBRX0Ya5BT-Eet05Fo3Gc2rEpX4ixBCgRl43L_u_841ChKr3QK6D7DdDzEOlyXhp5AtvBOb4tRum-PbyPOubnDU8_a2wt448_kb438gekR0f2Ocpun2GlcxHCeXUdcSVzzPgDPPYuCK49G5ZvGJioeJoOJwJ8-n0Icx3ErPmTE2bCf6-fV453DOVfkfrv2XbYtvefSt4oAnGc3jNSLVPdO-GSsc0UcfhDJLzbL1D1fmjDJ9fFXmnWklvlgpDbcizm973qEEiWipaGjDEtlmFalpUWdNkZzbklYnwRrRNbKUuZC4oqKqsjLruvJ0YixRLcEkzzCuMSVNUaScklPBmvLUSElpgVGO5cCUTrcrmSjvR9lmWZZXeaJZJ7Wf-xEhRl5hnkUkupm4di56N_Ye5VgrH_xnmqCCnhvZagwqDqA1v2Mvly4wZe7eymR0uo2tw996R6_CeexSboe1kWzt5-LsD8kDIk8zSY_I06rivSV_BQAA___pb5MI">