Permalink
Browse files

be more specific why emulation quit

  • Loading branch information...
1 parent 1031d3a commit eb6073f694eff2adfe9a702315ae97f8ac031597 @bartman committed Apr 28, 2012
Showing with 4 additions and 1 deletion.
  1. +1 −0 lib/dcpu_exec.c
  2. +3 −1 lib/dcpu_vcpu.c
View
@@ -322,6 +322,7 @@ DCPU_ISN_HANDLER(JSR)
DCPU_ISN_HANDLER(HCF)
{
+ warn("HCF reached");
return -EFAULT;
}
View
@@ -183,8 +183,10 @@ static int dcpu_vcpu_run (struct dcpu_vcpu *vcpu)
dcpu_vcpu_poke_hardware(vcpu);
// if there is no hardware, and the PC didn't change, there is no hope
- if (prev_st.sr.pc == vcpu->st.sr.pc && vcpu->hw_count)
+ if (prev_st.sr.pc == vcpu->st.sr.pc && !vcpu->hw_count) {
+ warn("PC didn't change, bailing out.");
return -ENODEV;
+ }
}
}

0 comments on commit eb6073f

Please sign in to comment.