From a73aed0790d6f56cbf70bd1453cdd77a38d1c3cc Mon Sep 17 00:00:00 2001 From: m8pple Date: Tue, 21 Oct 2014 10:11:04 +0100 Subject: Fixed #8 : Added the documentation for mips_cpu_get_pc (oversight on my part). I didn't add constraints on the pointer validity, as they are covered under a more common sense argument. There is no reasonable interpretation for passing a null or invalid pointer for pc, as it cannot give the caller any more information than they already have. --- include/mips_cpu.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mips_cpu.h b/include/mips_cpu.h index 117d869..8af9827 100644 --- a/include/mips_cpu.h +++ b/include/mips_cpu.h @@ -77,8 +77,14 @@ mips_error mips_cpu_set_pc( uint32_t pc //!< Address of the next instruction to exectute. ); -/*! Gets the pc for the next instruction. */ -mips_error mips_cpu_get_pc(mips_cpu_h state, uint32_t *pc); +/*! Gets the pc for the next instruction. + + Returns the program counter for the next instruction to be executed. +*/ +mips_error mips_cpu_get_pc( + mips_cpu_h state, //!< Valid (non-empty) handle to a CPU + uint32_t *pc //!< Where to write the byte address too +); /*! Advances the processor by one instruction. -- cgit