@@ -42,7 +42,7 @@ pub fn render(
42
42
if access == Access :: ReadWrite {
43
43
reg_impl_items. push ( quote ! {
44
44
/// Modifies the contents of the register
45
- #[ inline]
45
+ #[ inline( always ) ]
46
46
pub fn modify<F >( & self , f: F )
47
47
where
48
48
for <' w> F : FnOnce ( & R , & ' w mut W ) -> & ' w mut W
@@ -56,7 +56,7 @@ pub fn render(
56
56
if access == Access :: ReadOnly || access == Access :: ReadWrite {
57
57
reg_impl_items. push ( quote ! {
58
58
/// Reads the contents of the register
59
- #[ inline]
59
+ #[ inline( always ) ]
60
60
pub fn read( & self ) -> R {
61
61
R { bits: self . register. get( ) }
62
62
}
@@ -71,7 +71,7 @@ pub fn render(
71
71
72
72
r_impl_items. push ( quote ! {
73
73
/// Value of the register as raw bits
74
- #[ inline]
74
+ #[ inline( always ) ]
75
75
pub fn bits( & self ) -> #rty {
76
76
self . bits
77
77
}
@@ -81,7 +81,7 @@ pub fn render(
81
81
if access == Access :: WriteOnly || access == Access :: ReadWrite {
82
82
reg_impl_items. push ( quote ! {
83
83
/// Writes to the register
84
- #[ inline]
84
+ #[ inline( always ) ]
85
85
pub fn write<F >( & self , f: F )
86
86
where
87
87
F : FnOnce ( & mut W ) -> & mut W
@@ -105,20 +105,20 @@ pub fn render(
105
105
106
106
reg_impl_items. push ( quote ! {
107
107
/// Reset value of the register
108
- #[ inline]
108
+ #[ inline( always ) ]
109
109
pub const fn reset_value( ) -> #rty {
110
110
#rv
111
111
}
112
112
/// Writes the reset value to the register
113
- #[ inline]
113
+ #[ inline( always ) ]
114
114
pub fn reset( & self ) {
115
115
self . register. set( Self :: reset_value( ) )
116
116
}
117
117
} ) ;
118
118
119
119
w_impl_items. push ( quote ! {
120
120
/// Writes raw bits to the register
121
- #[ inline]
121
+ #[ inline( always ) ]
122
122
pub #unsafety fn bits( & mut self , bits: #rty) -> & mut Self {
123
123
self . bits = bits;
124
124
self
@@ -365,7 +365,7 @@ pub fn fields(
365
365
let sc = & f. sc ;
366
366
r_impl_items. push ( quote ! {
367
367
#[ doc = #description]
368
- #[ inline]
368
+ #[ inline( always ) ]
369
369
pub fn #sc( & self ) -> #pc_r {
370
370
#pc_r:: _from( #value )
371
371
}
@@ -421,13 +421,13 @@ pub fn fields(
421
421
if f. width == 1 {
422
422
enum_items. push ( quote ! {
423
423
/// Returns `true` if the bit is clear (0)
424
- #[ inline]
424
+ #[ inline( always ) ]
425
425
pub fn bit_is_clear( & self ) -> bool {
426
426
!self . #bits( )
427
427
}
428
428
429
429
/// Returns `true` if the bit is set (1)
430
- #[ inline]
430
+ #[ inline( always ) ]
431
431
pub fn bit_is_set( & self ) -> bool {
432
432
self . #bits( )
433
433
}
@@ -436,7 +436,7 @@ pub fn fields(
436
436
437
437
enum_items. push ( quote ! {
438
438
/// Value of the field as raw bits
439
- #[ inline]
439
+ #[ inline( always ) ]
440
440
pub fn #bits( & self ) -> #fty {
441
441
match * self {
442
442
#( #arms) , *
@@ -469,7 +469,7 @@ pub fn fields(
469
469
enum_items. push ( quote ! {
470
470
#[ allow( missing_docs) ]
471
471
#[ doc( hidden) ]
472
- #[ inline]
472
+ #[ inline( always ) ]
473
473
pub fn _from( value: #fty) -> #pc_r {
474
474
match value {
475
475
#( #arms) , * ,
@@ -490,7 +490,7 @@ pub fn fields(
490
490
let doc = format ! ( "Checks if the value of the field is `{}`" , pc) ;
491
491
enum_items. push ( quote ! {
492
492
#[ doc = #doc]
493
- #[ inline]
493
+ #[ inline( always ) ]
494
494
pub fn #is_variant( & self ) -> bool {
495
495
* self == #pc_r:: #pc
496
496
}
@@ -509,7 +509,7 @@ pub fn fields(
509
509
let sc = & f. sc ;
510
510
r_impl_items. push ( quote ! {
511
511
#[ doc = #description]
512
- #[ inline]
512
+ #[ inline( always ) ]
513
513
pub fn #sc( & self ) -> #pc_r {
514
514
let bits = #value;
515
515
#pc_r { bits }
@@ -519,7 +519,7 @@ pub fn fields(
519
519
let mut pc_r_impl_items = vec ! [
520
520
quote! {
521
521
/// Value of the field as raw bits
522
- #[ inline]
522
+ #[ inline( always ) ]
523
523
pub fn #bits( & self ) -> #fty {
524
524
self . bits
525
525
}
@@ -529,13 +529,13 @@ pub fn fields(
529
529
if f. width == 1 {
530
530
pc_r_impl_items. push ( quote ! {
531
531
/// Returns `true` if the bit is clear (0)
532
- #[ inline]
532
+ #[ inline( always ) ]
533
533
pub fn bit_is_clear( & self ) -> bool {
534
534
!self . #bits( )
535
535
}
536
536
537
537
/// Returns `true` if the bit is set (1)
538
- #[ inline]
538
+ #[ inline( always ) ]
539
539
pub fn bit_is_set( & self ) -> bool {
540
540
self . #bits( )
541
541
}
@@ -690,7 +690,7 @@ pub fn fields(
690
690
impl #pc_w {
691
691
#[ allow( missing_docs) ]
692
692
#[ doc( hidden) ]
693
- #[ inline]
693
+ #[ inline( always ) ]
694
694
pub fn _bits( & self ) -> #fty {
695
695
match * self {
696
696
#( #arms) , *
@@ -702,7 +702,7 @@ pub fn fields(
702
702
703
703
proxy_items. push ( quote ! {
704
704
/// Writes `variant` to the field
705
- #[ inline]
705
+ #[ inline( always ) ]
706
706
pub fn variant( self , variant: #pc_w) -> & ' a mut W {
707
707
#unsafety {
708
708
self . #bits( variant. _bits( ) )
@@ -718,15 +718,15 @@ pub fn fields(
718
718
if let Some ( enum_) = base_pc_w. as_ref ( ) {
719
719
proxy_items. push ( quote ! {
720
720
#[ doc = #doc]
721
- #[ inline]
721
+ #[ inline( always ) ]
722
722
pub fn #sc( self ) -> & ' a mut W {
723
723
self . variant( #enum_:: #pc)
724
724
}
725
725
} ) ;
726
726
} else {
727
727
proxy_items. push ( quote ! {
728
728
#[ doc = #doc]
729
- #[ inline]
729
+ #[ inline( always ) ]
730
730
pub fn #sc( self ) -> & ' a mut W {
731
731
self . variant( #pc_w:: #pc)
732
732
}
@@ -751,7 +751,7 @@ pub fn fields(
751
751
752
752
proxy_items. push ( quote ! {
753
753
/// Writes raw bits to the field
754
- #[ inline]
754
+ #[ inline( always ) ]
755
755
pub #unsafety fn #bits( self , value: #fty) -> & ' a mut W {
756
756
self . w. bits &= !( #mask << #offset) ;
757
757
self . w. bits |= ( ( value as #rty) & #mask) << #offset;
@@ -775,7 +775,7 @@ pub fn fields(
775
775
let sc = & f. sc ;
776
776
w_impl_items. push ( quote ! {
777
777
#[ doc = #description]
778
- #[ inline]
778
+ #[ inline( always ) ]
779
779
pub fn #sc( & mut self ) -> #_pc_w {
780
780
#_pc_w { w: self }
781
781
}
0 commit comments