diff --git a/vvp/opcodes.txt b/vvp/opcodes.txt index 117e5c83b..b6b6a4c90 100644 --- a/vvp/opcodes.txt +++ b/vvp/opcodes.txt @@ -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 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 , diff --git a/vvp/vthread.cc b/vvp/vthread.cc index 4eca71f1c..d8bde41d0 100644 --- a/vvp/vthread.cc +++ b/vvp/vthread.cc @@ -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; }