aboutsummaryrefslogtreecommitdiffstats
path: root/include/mips_cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mips_cpu.h')
-rw-r--r--include/mips_cpu.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/mips_cpu.h b/include/mips_cpu.h
index 5b66ab9..ef1ea6e 100644
--- a/include/mips_cpu.h
+++ b/include/mips_cpu.h
@@ -93,10 +93,12 @@ mips_error mips_cpu_get_pc(
inspect what happened and find out what went wrong. So
this should be true:
- uint32_t pc=mips_cpu_get_pc(cpu);
+ uint32_t pcOrig, pcGot;
+ mips_cpu_get_pc(cpu, &pcOrig);
mips_error err=mips_cpu_step(cpu);
if(err!=mips_Success){
- assert(mips_cpu_get_pc(cpu)==pc);
+ mips_cpu_get_pc(cpu, &pcGot);
+ assert(pcOrig==pcGot);
assert(mips_cpu_step(cpu)==err);
}