File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,11 @@ impl Vm {
182
182
self . state . fp
183
183
}
184
184
185
+ /// Returns the current `sp` register value.
186
+ pub fn sp ( & self ) -> * mut u8 {
187
+ self . state . sp
188
+ }
189
+
185
190
/// Returns the current `lr` register value.
186
191
pub fn lr ( & self ) -> * mut u8 {
187
192
self . state . lr
@@ -578,6 +583,7 @@ pub struct MachineState {
578
583
f_regs : [ FRegVal ; FReg :: RANGE . end as usize ] ,
579
584
v_regs : [ VRegVal ; VReg :: RANGE . end as usize ] ,
580
585
fp : * mut u8 ,
586
+ sp : * mut u8 ,
581
587
lr : * mut u8 ,
582
588
stack : Vec < u8 > ,
583
589
done_reason : Option < DoneReason < ( ) > > ,
@@ -595,6 +601,7 @@ impl fmt::Debug for MachineState {
595
601
stack : _,
596
602
done_reason : _,
597
603
fp : _,
604
+ sp : _,
598
605
lr : _,
599
606
} = self ;
600
607
@@ -676,6 +683,7 @@ impl MachineState {
676
683
stack,
677
684
done_reason : None ,
678
685
fp : HOST_RETURN_ADDR ,
686
+ sp : HOST_RETURN_ADDR ,
679
687
lr : HOST_RETURN_ADDR ,
680
688
} ;
681
689
You can’t perform that action at this time.
0 commit comments