File tree 1 file changed +14
-5
lines changed 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(
478
478
let is_region_a_union = region. is_union ( ) ;
479
479
480
480
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
+ } ;
486
495
487
496
if is_region_a_union {
488
497
let name = & reg_block_field. field . ident ;
You can’t perform that action at this time.
0 commit comments