File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -694,6 +694,10 @@ namespace udb {
694694 }
695695 }
696696
697+ constexpr std::conditional_t <Signed, SignedStorageType, const StorageType &> get_ignore_unknown () const {
698+ return m_val;
699+ }
700+
697701 constexpr const _Bits& to_defined () const { return *this ; }
698702
699703 // cast to other Bits types
@@ -3467,7 +3471,7 @@ struct fmt::formatter<BitsClass<N, Signed>>
34673471 : formatter<typename BitsClass<N, Signed>::StorageType> {
34683472 template <typename CONTEXT_TYPE>
34693473 auto format (BitsClass<N, Signed> value, CONTEXT_TYPE &ctx) const {
3470- return fmt::formatter<typename BitsClass<N, Signed>::StorageType>::format (value.get (), ctx);
3474+ return fmt::formatter<typename BitsClass<N, Signed>::StorageType>::format (value.get_ignore_unknown (), ctx);
34713475 }
34723476};
34733477
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ namespace udb {
254254 } else {
255255 udb_assert(xlen == 64_b, "Bad xlen");
256256 <%-
257- field_cpp = fields_for_xlen32 . map do |field |
257+ field_cpp = fields_for_xlen64 . map do |field |
258258 if field . dynamic_location?
259259 "((m_#{ field . name } ._hw_read() & 0x#{ ( ( 1 << field . location ( 64 ) . size ) - 1 ) . to_s ( 16 ) } _b).template widening_sll<#{ field . location ( 64 ) . begin } >())"
260260 else
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ fields:
3333 UXL :
3434 location : 33-32
3535 base : 64
36- alias : mstatus.MXR
36+ alias : mstatus.UXL
3737 description : |
3838 *U-mode XLEN*
3939
You can’t perform that action at this time.
0 commit comments