Re: [0/1] RISC-V: Update CSR to priv 1.11.

Tom Tromey
2020-06-08T15:37:44Z

>>>>> ">" == Nelson Chu <nelson.chu@sifive.com> writes:

>> Since RISCV priv spec 1.11 has been officially released, it would be good if
>> binutils, gdb, qemu and OpenOCD can support the new CSR. Therfore, I update
>> the CSR to 1.11 in binutils, and the gdm xml files and gas/testsuite/gas/riscv/csr-dw-regnums
>> also need to be updated. There are two difference between 1.10 and 1.11,

>> 1. 0x320 is mcountinhibit rather than mucounteren. You can still use the
>> mucounteren, but objdump will show mcountinhibit for it.

>> 2. 0x7b2 is dscratch0 rather than dscratch, and 0x7b3 is dscratch1. You
>> can still use the old naming, but objdump will show the new one.

I noticed that this patch broke compatibility between gdb and some
versions of qemu.

We're using qemu 4.0.0. Our internal test suite has many failures if I
run an unpatched gdb against this version -- locally I've backed out all
RISC-V patches since this one, but that's getting cumbersome, and I
belated realized I should probably just bring this up.

A typical failure looks like:

(gdb) info registers dscratch
dscratch Could not fetch register "dscratch"; remote failure reply 'E14'

It seems to me that the best thing to do would be to have gdb adapt to
the registers that are reported by the remote. Is there a reason this
was not done?

Tom