Remove index register restrictions on ix/arith instructions.
The %ix/<arith> instructions are currently not in use, but even so it is just plain wrong to restrict their register argument to 0-3.
This commit is contained in:
parent
ec87c7f6de
commit
75df8fb6bb
|
|
@ -353,8 +353,7 @@ thread bit vector.
|
||||||
|
|
||||||
This instruction adds, subtracts, or multiplies an immediate value to
|
This instruction adds, subtracts, or multiplies an immediate value to
|
||||||
the addressed index register. The index register holds numeric values,
|
the addressed index register. The index register holds numeric values,
|
||||||
so the <value> is a number. The <idx> value selects the index register,
|
so the <value> is a number. The <idx> value selects the index register.
|
||||||
and may be 0, 1, 2 or 3.
|
|
||||||
|
|
||||||
|
|
||||||
* %jmp <code-label>
|
* %jmp <code-label>
|
||||||
|
|
|
||||||
|
|
@ -1840,19 +1840,19 @@ bool of_INV(vthread_t thr, vvp_code_t cp)
|
||||||
|
|
||||||
bool of_IX_ADD(vthread_t thr, vvp_code_t cp)
|
bool of_IX_ADD(vthread_t thr, vvp_code_t cp)
|
||||||
{
|
{
|
||||||
thr->words[cp->bit_idx[0] & 3].w_int += cp->number;
|
thr->words[cp->bit_idx[0]].w_int += cp->number;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool of_IX_SUB(vthread_t thr, vvp_code_t cp)
|
bool of_IX_SUB(vthread_t thr, vvp_code_t cp)
|
||||||
{
|
{
|
||||||
thr->words[cp->bit_idx[0] & 3].w_int -= cp->number;
|
thr->words[cp->bit_idx[0]].w_int -= cp->number;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool of_IX_MUL(vthread_t thr, vvp_code_t cp)
|
bool of_IX_MUL(vthread_t thr, vvp_code_t cp)
|
||||||
{
|
{
|
||||||
thr->words[cp->bit_idx[0] & 3].w_int *= cp->number;
|
thr->words[cp->bit_idx[0]].w_int *= cp->number;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue