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)
|
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
|
||||||
|
@ -372,10 +373,10 @@ do_rep:
|
||||||
{
|
{
|
||||||
if (p1->type == A_REG)
|
if (p1->type == A_REG)
|
||||||
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
|
||||||
{
|
{
|
||||||
assert(ACC_IS_MEM(p1));
|
assert(ACC_IS_MEM(p1));
|
||||||
|
|
Loading…
Reference in New Issue