RISC-V: Reflect actual range of vlen for hashing
authorTsukasa OI <research_trasio@irq.a4lg.com>
Fri, 11 Aug 2023 03:12:52 +0000 (03:12 +0000)
committerTsukasa OI <research_trasio@irq.a4lg.com>
Fri, 11 Aug 2023 13:27:52 +0000 (13:27 +0000)
Before actual vlen handling, fix the riscv_gdbarch_features hashing
function based on the actual valid range of vlen.  In bytes, vlen is 0,
or 4 <= xlen <= 8192.

gdb/arch/riscv.h

index d5ea1a5..e1965da 100644 (file)
@@ -90,7 +90,7 @@ struct riscv_gdbarch_features
                       | (has_fcsr_reg ? 1 : 0) << 13
                       | (xlen & 0x1f) << 5
                       | (flen & 0x1f) << 0
-                      | (vlen & 0xfff) << 14);
+                      | (vlen & 0x3fff) << 14);
     return val;
   }
 };