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:
Stephen Williams 2008-02-27 17:01:53 -08:00
parent ec87c7f6de
commit 75df8fb6bb
2 changed files with 4 additions and 5 deletions

View File

@ -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>

View File

@ -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;
} }