From 9ba6ab49ac95bfb87e343f47525bc50a44f8f027 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Sun, 18 Dec 2011 17:56:41 -0800 Subject: [PATCH] Fix compressed assign to memory word. This is a pretty trivial fix for the code generation of compressed assign to a memory word. We generated incorect code for the stash of the calculated word index, causing the assign of the result to not work properly. --- tgt-vvp/stmt_assign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgt-vvp/stmt_assign.c b/tgt-vvp/stmt_assign.c index cf9ed0b71..13f2e2391 100644 --- a/tgt-vvp/stmt_assign.c +++ b/tgt-vvp/stmt_assign.c @@ -183,7 +183,7 @@ static void get_vec_from_lval_slice(ivl_lval_t lval, struct vec_slice_info*slice slice->u_.memory_word_dynamic.word_idx_reg = allocate_word(); slice->u_.memory_word_dynamic.x_flag = allocate_vector(1); fprintf(vvp_out, " %%mov/wu %d, 3;\n", - slice->u_.memory_word_dynamic.x_flag); + slice->u_.memory_word_dynamic.word_idx_reg); fprintf(vvp_out, " %%mov %u, 4, 1;\n", slice->u_.memory_word_dynamic.x_flag);