Some bugfixes, apparently a new bug.

git-svn-id: http://www.cdkersey.com/harp/harptool@112 0246edb2-e076-4747-b392-db732a341fa2
This commit is contained in:
chad
2013-01-15 23:16:10 +00:00
parent 6b41d25530
commit 77793a1dbb
10 changed files with 95 additions and 45 deletions

View File

@@ -8,6 +8,7 @@
#include "include/obj.h"
#include "include/core.h"
#include "include/harpfloat.h"
#include "include/debug.h"
#ifdef EMU_INSTRUMENTATION
#include "include/qsim-harp.h"
@@ -63,7 +64,7 @@ Instruction::InstTableEntry Instruction::instTable[] = {
{"andp", false, false, false, false, AC_3PREG, ITYPE_INTBASIC},
{"orp", false, false, false, false, AC_3PREG, ITYPE_INTBASIC},
{"xorp", false, false, false, false, AC_3PREG, ITYPE_INTBASIC},
{"notp", false, false, false, false, AC_3PREG, ITYPE_INTBASIC},
{"notp", false, false, false, false, AC_2PREG, ITYPE_INTBASIC},
{"isneg", false, false, false, false, AC_PREG_REG, ITYPE_INTBASIC},
{"iszero", false, false, false, false, AC_PREG_REG, ITYPE_INTBASIC},
{"halt", false, false, false, true, AC_NONE, ITYPE_NULL },
@@ -106,6 +107,8 @@ ostream &Harp::operator<<(ostream& os, Instruction &inst) {
}
void Instruction::executeOn(Core &c) {
D(1, "Begin instruction execute.");
/* If I try to execute a privileged instruction in user mode, throw an
exception 3. */
if (instTable[op].privileged && !c.supervisorMode) {
@@ -262,5 +265,7 @@ void Instruction::executeOn(Core &c) {
if (instTable[op].controlFlow) break;
}
D(3, "End instruction execute.");
c.activeThreads = nextActiveThreads;
}