mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
vm
This commit is contained in:
parent
0a9d1bdc93
commit
beb759b7e6
13
vm/pc/decd.c
13
vm/pc/decd.c
@ -17,7 +17,7 @@ static void check_param_type(ctx_t *ctx, uint prm, uchar fmt)
|
||||
else if (prm == P_IMM)
|
||||
ok = (fmt == A_IMM64);
|
||||
|
||||
else /* if (prm == P_MEM */
|
||||
else /* if (prm == P_MEM) */
|
||||
ok = ACC_FMT_IS_MEM(fmt);
|
||||
|
||||
if (!ok)
|
||||
@ -34,7 +34,8 @@ void decode(ctx_t *ctx)
|
||||
acc_t p1 = { 0 };
|
||||
acc_t p2 = { 0 };
|
||||
|
||||
bool rep = 0, cond = 0;
|
||||
bool rep = 0
|
||||
uint cond = 0;
|
||||
bool lock, nomore;
|
||||
|
||||
ushort w1, w2;
|
||||
@ -75,7 +76,7 @@ void decode(ctx_t *ctx)
|
||||
w2 = ctx->get(ctx);
|
||||
|
||||
// REP and COND
|
||||
rep = w2 & PREF_REP;
|
||||
rep = !!(w2 & PREF_REP);
|
||||
cond = (w2 & BITS_COND) >> COND_SHIFT;
|
||||
|
||||
// F1 and F2
|
||||
@ -372,10 +373,10 @@ do_rep:
|
||||
{
|
||||
if (p1->type == A_REG)
|
||||
R(p1->reg) = ret;
|
||||
|
||||
|
||||
else if (p1->type == A_IMM64)
|
||||
_except(ctx, E_ACC, "Trying to output on an IMM64");
|
||||
|
||||
_except(ctx, E_ACC, "Trying to output to an IMM64");
|
||||
|
||||
else
|
||||
{
|
||||
assert(ACC_IS_MEM(p1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user