Fix %ix/load to work with all index registers.
draw_number_bool64() in tgt-vvp/eval_bool.c was using %ix/load to load immediate values into registers greater than three. The problem was that of_IX_LOAD() in vvp/vthread.cc was masking off the upper bits. This was putting the results in the wrong register. This patch removes the bit masking from of_IX_LOAD() and updates the %ix/load documentation.
This commit is contained in:
parent
b5ef6d7a37
commit
ec87c7f6de
|
|
@ -342,9 +342,9 @@ bits 4/5/6 just line %ix/get.
|
|||
|
||||
This instruction loads an immediate value into the addressed index
|
||||
register. The index register holds numeric values, so the <value> is a
|
||||
number. The idx value selects the index register, and may be 0, 1, 2
|
||||
or 3. This is different from %ix/get, which loads the index register
|
||||
from a value in the thread bit vector.
|
||||
number. The idx value selects the index register. This is different
|
||||
from %ix/get, which loads the index register from a value in the
|
||||
thread bit vector.
|
||||
|
||||
|
||||
* %ix/add <idx>, <value>
|
||||
|
|
|
|||
|
|
@ -1858,7 +1858,7 @@ bool of_IX_MUL(vthread_t thr, vvp_code_t cp)
|
|||
|
||||
bool of_IX_LOAD(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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue