@@ -432,41 +432,49 @@ pub struct ExceptionFrame {
432
432
433
433
impl ExceptionFrame {
434
434
/// Returns the value of (general purpose) register 0.
435
+ #[ inline( always) ]
435
436
pub fn r0 ( & self ) -> u32 {
436
437
self . r0
437
438
}
438
439
439
440
/// Returns the value of (general purpose) register 1.
441
+ #[ inline( always) ]
440
442
pub fn r1 ( & self ) -> u32 {
441
443
self . r1
442
444
}
443
445
444
446
/// Returns the value of (general purpose) register 2.
447
+ #[ inline( always) ]
445
448
pub fn r2 ( & self ) -> u32 {
446
449
self . r2
447
450
}
448
451
449
452
/// Returns the value of (general purpose) register 3.
453
+ #[ inline( always) ]
450
454
pub fn r3 ( & self ) -> u32 {
451
455
self . r3
452
456
}
453
457
454
458
/// Returns the value of (general purpose) register 12.
459
+ #[ inline( always) ]
455
460
pub fn r12 ( & self ) -> u32 {
456
461
self . r12
457
462
}
458
463
459
464
/// Returns the value of the Link Register.
465
+ #[ inline( always) ]
460
466
pub fn lr ( & self ) -> u32 {
461
467
self . lr
462
468
}
463
469
464
470
/// Returns the value of the Program Counter.
471
+ #[ inline( always) ]
465
472
pub fn pc ( & self ) -> u32 {
466
473
self . pc
467
474
}
468
475
469
476
/// Returns the value of the Program Status Register.
477
+ #[ inline( always) ]
470
478
pub fn xpsr ( & self ) -> u32 {
471
479
self . xpsr
472
480
}
@@ -477,6 +485,7 @@ impl ExceptionFrame {
477
485
///
478
486
/// This affects the `r0` register of the preempted code, which must not rely on it getting
479
487
/// restored to its previous value.
488
+ #[ inline( always) ]
480
489
pub unsafe fn set_r0 ( & mut self , value : u32 ) {
481
490
self . r0 = value;
482
491
}
@@ -487,6 +496,7 @@ impl ExceptionFrame {
487
496
///
488
497
/// This affects the `r1` register of the preempted code, which must not rely on it getting
489
498
/// restored to its previous value.
499
+ #[ inline( always) ]
490
500
pub unsafe fn set_r1 ( & mut self , value : u32 ) {
491
501
self . r1 = value;
492
502
}
@@ -497,6 +507,7 @@ impl ExceptionFrame {
497
507
///
498
508
/// This affects the `r2` register of the preempted code, which must not rely on it getting
499
509
/// restored to its previous value.
510
+ #[ inline( always) ]
500
511
pub unsafe fn set_r2 ( & mut self , value : u32 ) {
501
512
self . r2 = value;
502
513
}
@@ -507,6 +518,7 @@ impl ExceptionFrame {
507
518
///
508
519
/// This affects the `r3` register of the preempted code, which must not rely on it getting
509
520
/// restored to its previous value.
521
+ #[ inline( always) ]
510
522
pub unsafe fn set_r3 ( & mut self , value : u32 ) {
511
523
self . r3 = value;
512
524
}
@@ -517,6 +529,7 @@ impl ExceptionFrame {
517
529
///
518
530
/// This affects the `r12` register of the preempted code, which must not rely on it getting
519
531
/// restored to its previous value.
532
+ #[ inline( always) ]
520
533
pub unsafe fn set_r12 ( & mut self , value : u32 ) {
521
534
self . r12 = value;
522
535
}
@@ -527,6 +540,7 @@ impl ExceptionFrame {
527
540
///
528
541
/// This affects the `lr` register of the preempted code, which must not rely on it getting
529
542
/// restored to its previous value.
543
+ #[ inline( always) ]
530
544
pub unsafe fn set_lr ( & mut self , value : u32 ) {
531
545
self . lr = value;
532
546
}
@@ -537,6 +551,7 @@ impl ExceptionFrame {
537
551
///
538
552
/// This affects the `pc` register of the preempted code, which must not rely on it getting
539
553
/// restored to its previous value.
554
+ #[ inline( always) ]
540
555
pub unsafe fn set_pc ( & mut self , value : u32 ) {
541
556
self . pc = value;
542
557
}
@@ -547,6 +562,7 @@ impl ExceptionFrame {
547
562
///
548
563
/// This affects the `xPSR` registers (`IPSR`, `APSR`, and `EPSR`) of the preempted code, which
549
564
/// must not rely on them getting restored to their previous value.
565
+ #[ inline( always) ]
550
566
pub unsafe fn set_xpsr ( & mut self , value : u32 ) {
551
567
self . xpsr = value;
552
568
}
0 commit comments