File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -478,11 +478,20 @@ fn register_or_cluster_block(
478478 let is_region_a_union = region. is_union ( ) ;
479479
480480 for reg_block_field in & region. rbfs {
481- let comment = & format ! (
482- "0x{:02x} - {}" ,
483- reg_block_field. offset,
484- util:: escape_brackets( util:: respace( & reg_block_field. description) . as_ref( ) ) ,
485- ) [ ..] ;
481+ let comment = if reg_block_field. size > 32 {
482+ format ! (
483+ "0x{:02x}..0x{:02x} - {}" ,
484+ reg_block_field. offset,
485+ reg_block_field. offset + reg_block_field. size / 8 ,
486+ util:: escape_brackets( util:: respace( & reg_block_field. description) . as_ref( ) ) ,
487+ )
488+ } else {
489+ format ! (
490+ "0x{:02x} - {}" ,
491+ reg_block_field. offset,
492+ util:: escape_brackets( util:: respace( & reg_block_field. description) . as_ref( ) ) ,
493+ )
494+ } ;
486495
487496 if is_region_a_union {
488497 let name = & reg_block_field. field . ident ;
You can’t perform that action at this time.
0 commit comments