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
@ -17,7 +17,7 @@ static void check_param_type(ctx_t *ctx, uint prm, uchar fmt)
|
|||||||
else if (prm == P_IMM)
|
else if (prm == P_IMM)
|
||||||
ok = (fmt == A_IMM64);
|
ok = (fmt == A_IMM64);
|
||||||
|
|
||||||
else /* if (prm == P_MEM */
|
else /* if (prm == P_MEM) */
|
||||||
ok = ACC_FMT_IS_MEM(fmt);
|
ok = ACC_FMT_IS_MEM(fmt);
|
||||||
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
@ -34,7 +34,8 @@ void decode(ctx_t *ctx)
|
|||||||
acc_t p1 = { 0 };
|
acc_t p1 = { 0 };
|
||||||
acc_t p2 = { 0 };
|
acc_t p2 = { 0 };
|
||||||
|
|
||||||
bool rep = 0, cond = 0;
|
bool rep = 0
|
||||||
|
uint cond = 0;
|
||||||
bool lock, nomore;
|
bool lock, nomore;
|
||||||
|
|
||||||
ushort w1, w2;
|
ushort w1, w2;
|
||||||
@ -75,7 +76,7 @@ void decode(ctx_t *ctx)
|
|||||||
w2 = ctx->get(ctx);
|
w2 = ctx->get(ctx);
|
||||||
|
|
||||||
// REP and COND
|
// REP and COND
|
||||||
rep = w2 & PREF_REP;
|
rep = !!(w2 & PREF_REP);
|
||||||
cond = (w2 & BITS_COND) >> COND_SHIFT;
|
cond = (w2 & BITS_COND) >> COND_SHIFT;
|
||||||
|
|
||||||
// F1 and F2
|
// F1 and F2
|
||||||
@ -374,7 +375,7 @@ do_rep:
|
|||||||
R(p1->reg) = ret;
|
R(p1->reg) = ret;
|
||||||
|
|
||||||
else if (p1->type == A_IMM64)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user