diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index 19c94208224b..c51ff1215b92 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -594,26 +594,28 @@ riscv_print_register_formatted (struct ui_file *file, struct frame_info *frame, else internal_error (__FILE__, __LINE__, _("unknown size for mstatus")); unsigned xlen = size * 4; + fprintf_filtered (file, "SD:%X", (int)((d >> (xlen-1)) & 0x1)); + if (size > 4) + fprintf_filtered (file, " SXL:%X UXL:%X", + (int)((d >> 34) & 3), (int)((d >> 32) & 3)); fprintf_filtered (file, - "SD:%X VM:%02X MXR:%X PUM:%X MPRV:%X XS:%X " - "FS:%X MPP:%x HPP:%X SPP:%X MPIE:%X HPIE:%X " - "SPIE:%X UPIE:%X MIE:%X HIE:%X SIE:%X UIE:%X", - (int)((d >> (xlen-1)) & 0x1), - (int)((d >> 24) & 0x1f), + " TSR:%X TW:%X TVM:%X MXR:%X SUM:%X MPRV:%X XS:%X " + "FS:%X MPP:%X SPP:%X MPIE:%X SPIE:%X UPIE:%X MIE:%X " + "SIE:%X UIE:%X", + (int)((d >> 22) & 0x1f), + (int)((d >> 21) & 0x1), + (int)((d >> 20) & 0x1), (int)((d >> 19) & 0x1), (int)((d >> 18) & 0x1), (int)((d >> 17) & 0x1), (int)((d >> 15) & 0x3), (int)((d >> 13) & 0x3), (int)((d >> 11) & 0x3), - (int)((d >> 9) & 0x3), (int)((d >> 8) & 0x1), (int)((d >> 7) & 0x1), - (int)((d >> 6) & 0x1), (int)((d >> 5) & 0x1), (int)((d >> 4) & 0x1), (int)((d >> 3) & 0x1), - (int)((d >> 2) & 0x1), (int)((d >> 1) & 0x1), (int)((d >> 0) & 0x1)); }