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:
Cary R
2008-02-27 16:54:38 -08:00
committed by Stephen Williams
parent b5ef6d7a37
commit ec87c7f6de
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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>
+1 -1
View File
@@ -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;
}