From b5e9e44e0709ac040feb6611dd692cf73ff31e0d Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 27 May 2008 18:11:31 -0700 Subject: [PATCH] Fix error in of_SUBI with wide results. This patch fixes an error in the recent rework of of_SUBI. It was doing a double bit inversion. --- vvp/vthread.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vvp/vthread.cc b/vvp/vthread.cc index 442fc0be6..5f82644ba 100644 --- a/vvp/vthread.cc +++ b/vvp/vthread.cc @@ -3770,7 +3770,7 @@ bool of_SUBI(vthread_t thr, vvp_code_t cp) carry = 1; for (unsigned idx = 0 ; idx < word_count ; idx += 1) { lva[idx] = add_with_carry(lva[idx], ~imm, carry); - imm = ~0UL; + imm = 0UL; } /* We know from the vector_to_array that the address is valid