aboutsummaryrefslogtreecommitdiff
path: root/target-mips/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'target-mips/cpu.h')
-rw-r--r--target-mips/cpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index 569f9325bf..dd8388152a 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -548,4 +548,9 @@ CPUMIPSState *cpu_mips_init(void);
uint32_t cpu_mips_get_clock (void);
int cpu_mips_signal_handler(int host_signum, void *pinfo, void *puc);
+static inline target_ulong get_sp_from_cpustate(CPUMIPSState *state)
+{
+ return state->gpr[29][state->current_tc];
+}
+
#endif /* !defined (__MIPS_CPU_H__) */