<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJzVVlGP2zYM_jXOC2FDke3EefDDXdINB1yHobt2j4FsS4k7WQokOent14-SnTs7a68rhj3MEOJIJD99pEjKlW6ey9-PXMEDNK1l1vKuks_gjhwYM_VxlUHVKmaeodbKsVYdIKLUdjUQfANTjZ93xsIXXNjC09P9B7J_90hx1c8fQOgelTyg4baXDrTwJlKeu1hXn5u-O0EcUIAZjiyE4IYrBxV3F47MvOYyDVuFv1kSkV1E7obJCwbvWmfn5MI0yrdRuu3VH0pfVJi8G7mN5OHr7EfzV-Fv6T7bb-l-S_YefsoifWFhOe8snEyrnI9VrY3htZPPo_b4S1Mc8MStg61u-Li6IsOor1o_4XColIwrCAodnkFEi7Num4huIFrfDzIYH2Y7OGvJXCs58i8mAUH9KP2--rcO8-_GhrveKMS-CqL17saXmdtT5x8fP72HT9zYVqtB8ACtso5JyYeDhvHQlxkIozs4OneyUTrGhZ1c4rUSbQ44Ba2gr3rl-uSGgT1yKa9bZzDNuxh3iOPzlMTHgDGwGwXIIyHJcu7DLVD2j4AyBCJvRWiIzVZ3J38e-O4wAm87VEumDgMBx8yBuyjdjaUbK614zKUAiIUwHFMJ4XxeQlzDNLPeYvMhlO0PRrUZ4PUUb1xJ70B474Q2HXOA9JCpbJ2TfOQ9NdpNuhJ2DovV5EOZOP7F-WSYqJKbB7DuQ7lgxV81x8wlngVJAZVwNBku-SrxD7pMZrpZ0CVACaQ1NDku-RLxz22ZTM0Kb8aJ32UpgDJvps9BdAlmlz_NzKD2BnUwyAU0q6HAvpt2_79IT9ox6v9QqGc9-L-L9jXLF02ZNpt0wxasd0dtyl9_jt_f_XK36I0s5_3o0LpjXyW17nDiD2l8xSejP2Mocdpa23OLf_J0k68Wx5IUebGsaSHWOVlvBBOMi9VyQ-tlURXrtFlIVnFpyyi_xw6s-AUCRLjUdot_z6AtKaFhkFW-SmmS5nRVCFZlBaVLsc6ijHA8V_nSaRemDJBVf7AolK119lWI6dMeFOeBMDJ0LWZaObvpx1t6mgGhyV-MxrZk-AERuQHFOm7h4j9Mevv60TH55Jhd1ZimzHSYzrS4JjbdLIK3ZXD1L8gCgQo>53956</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            llvm-objdump emits <unknown> and wrong register names when using "smc" and "TTBR0_EL2" on arm64(aarch64)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          PG-MANA
      </td>
    </tr>
</table>

<pre>
    When I disassembly the aarch64 binary containg "smc 0" and "mrs x0, TTBR0_EL2", I found the result of "llvm-objdump -d " are different between llvm13 and llvm14.
llvm14-objdump emits "smc 0" as "\<unknown\>", and " mrs x0, TTBR0_EL2" as "mrs x0, S3_4_C2_C0_0".
llvm13-objdump seems printing correctly.

## Test Code
```c
//test.c
int main(void) {
        asm volatile ("smc 0");
        asm volatile ("mrs x0, TTBR0_EL2");
        return 0;
}
```


## LLVM Version
I installed llvm 13 and 14 from https://apt.llvm.org/ on ubuntu.
```shell
$ llvm-objdump-13 --version
Ubuntu LLVM version 13.0.1

$ llvm-objdump-14 --version
Ubuntu LLVM version 14.0.0
```

## Compile Command
```shell
$ clang-14 --target=aarch64-none-elf  -ffreestanding  -c test.c
```

## Result
```shell
$ llvm-objdump-13 -d test.o

test.o: file format elf64-littleaarch64

Disassembly of section .text:

0000000000000000 <main>:
       0: 03 00 00 d4   smc     #0
       4: 00 20 3c d5   mrs     x0, TTBR0_EL2
       8: e0 03 1f 2a   mov     w0, wzr
       c: c0 03 5f d6   ret

$ llvm-objdump-14 -d test.o

test.o: file format elf64-littleaarch64

Disassembly of section .text:

0000000000000000 <main>:
       0: 03 00 00 d4   <unknown>
       4: 00 20 3c d5   mrs     x0, S3_4_C2_C0_0
       8: e0 03 1f 2a   mov     w0, wzr
       c: c0 03 5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