1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
This commit is contained in:
julianb0 2019-06-18 23:01:41 +02:00
parent af9b87cc49
commit 6a8533c938
No known key found for this signature in database
GPG Key ID: DDF8325C95299A62
4 changed files with 6 additions and 2 deletions

View File

@ -32,6 +32,7 @@ cpudev_test:
trap 0
trap 0
trap 2
ret

View File

@ -62,6 +62,9 @@ struct ctx_t
// Devices list head
dev_t *dh;
// Instructions executed so far
ulong ninstrs;
};
#define R(X) ctx->rf[X]

View File

@ -163,7 +163,7 @@ void decode(ctx_t *ctx)
ulong pc = rip;
// Instruction counter
R(RX0)++;
ctx->ninstrs++;
//
// Process the first word of the instruction

View File

@ -100,7 +100,7 @@ void dumpregs(ctx_t *ctx)
log("\n\nrip=0x%-16lX rsp=0x%-16lX rbp=0x%-16lX rx0=%-16lu\n\n",
rip, rsp, rbp, R(RX0));
rip, rsp, rbp, ctx->ninstrs);
log("CF=%x OF=%x\n"
"ZF=%x SF=%x\n"