================
@@ -192,6 +192,13 @@ std::string AArch64SysReg::genericRegisterString(uint32_t 
Bits) {
          utostr(CRm) + "_" + utostr(Op2);
 }
 
+bool AArch64SysReg::isHINTESystemRegisterEncoding(uint32_t Bits) {
----------------
jthackray wrote:

Yes, it's because the `HINTE` encoding space overlaps with the system register 
encoding space. It's related to your change 
https://github.com/llvm/llvm-project/pull/185709 (but which you reverted in 
https://github.com/llvm/llvm-project/pull/201137) but slightly different as you 
removed bit 20, whereas this change only carves out the `HINTE` space.

Without it, `hinte #0` disassembles to `msr S0_0_C2_C0_0, x0`:
```
  printf '[0x00,0x20,0x00,0xd5]\n' | llvm-mc -triple=aarch64 -disassemble 
--mattr=-hinte --show-encoding
        msr     S0_0_C2_C0_0, x0                // encoding: 
[0x00,0x20,0x00,0xd5]
```
and with it:
```
%   printf '[0x00,0x20,0x00,0xd5]\n' | rel/bin/llvm-mc -triple=aarch64 
-disassemble --mattr=+hinte --show-encoding
        hinte   #0                              // encoding: 
[0x00,0x20,0x00,0xd5]
```

https://github.com/llvm/llvm-project/pull/206905
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to