Remove dead %set/dar and %set/dar/obj instructions.
This commit is contained in:
parent
1c80c6e37a
commit
97bde47c31
|
|
@ -105,18 +105,16 @@ static int eval_darray_new(ivl_expr_t ex)
|
|||
a constant. Generate an unrolled set of assignments. */
|
||||
long idx;
|
||||
long cnt = get_number_immediate(size_expr);
|
||||
struct vector_info rvec;
|
||||
unsigned wid;
|
||||
switch (ivl_type_base(element_type)) {
|
||||
case IVL_VT_BOOL:
|
||||
wid = width_of_packed_type(element_type);
|
||||
rvec = draw_eval_expr_wid(init_expr, wid, STUFF_OK_XZ);
|
||||
draw_eval_vec4(init_expr);
|
||||
resize_vec4_wid(init_expr, wid);
|
||||
for (idx = 0 ; idx < cnt ; idx += 1) {
|
||||
fprintf(vvp_out, " %%ix/load 3, %ld, 0;\n", idx);
|
||||
fprintf(vvp_out, " %%set/dar/obj 3, %u, %u;\n",
|
||||
rvec.base, rvec.wid);
|
||||
fprintf(vvp_out, " %%set/dar/obj/vec4 3;\n");
|
||||
}
|
||||
if (rvec.base >= 4) clr_vector(rvec);
|
||||
break;
|
||||
case IVL_VT_REAL:
|
||||
draw_eval_real(init_expr);
|
||||
|
|
|
|||
|
|
@ -205,10 +205,8 @@ extern bool of_RELEASE_WR(vthread_t thr, vvp_code_t code);
|
|||
extern bool of_REPLICATE(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_SCOPY(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_SET_AV(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_SET_DAR(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_SET_QB(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_SET_QF(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_SET_DAR_OBJ(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_SET_DAR_OBJ_REAL(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_SET_DAR_OBJ_STR(vthread_t thr, vvp_code_t code);
|
||||
extern bool of_SET_DAR_OBJ_VEC4(vthread_t thr, vvp_code_t code);
|
||||
|
|
|
|||
|
|
@ -253,8 +253,6 @@ static const struct opcode_table_s opcode_table[] = {
|
|||
{ "%replicate", of_REPLICATE, 1,{OA_NUMBER, OA_NONE,OA_NONE} },
|
||||
{ "%scopy", of_SCOPY, 0, {OA_NONE, OA_NONE, OA_NONE} },
|
||||
{ "%set/av", of_SET_AV, 3, {OA_ARR_PTR, OA_BIT1, OA_BIT2} },
|
||||
{ "%set/dar",of_SET_DAR,3, {OA_FUNC_PTR, OA_BIT1, OA_BIT2} },
|
||||
{ "%set/dar/obj", of_SET_DAR_OBJ, 3,{OA_NUMBER,OA_BIT1,OA_BIT2} },
|
||||
{ "%set/dar/obj/real",of_SET_DAR_OBJ_REAL,1,{OA_NUMBER,OA_NONE,OA_NONE} },
|
||||
{ "%set/dar/obj/str", of_SET_DAR_OBJ_STR, 1,{OA_NUMBER,OA_NONE,OA_NONE} },
|
||||
{ "%set/dar/obj/vec4",of_SET_DAR_OBJ_VEC4,1,{OA_NUMBER,OA_NONE,OA_NONE} },
|
||||
|
|
|
|||
|
|
@ -1136,17 +1136,6 @@ Pop the vec4 value, replicate it <count> times, then push the
|
|||
result. In other words, push the concatenation of <count> copies.
|
||||
See also the %concat instruction.
|
||||
|
||||
* %set/dar <var-label>, <bit>, <wid>
|
||||
* %set/dar/obj <index>, <bit>, <wid>
|
||||
|
||||
The "%set/dar" opcode sets a vector to a word of the dynamic
|
||||
array. Index register 3 contains the word address within the dynamic
|
||||
array, and <bit>,<wid> specifies the thread vector to be written.
|
||||
|
||||
The "%set/dar/obj" opcode is similar, except that it sets elements of
|
||||
a dynamic array that is in the top of the object stack. Instead of
|
||||
using a fixed index register, use the register addressed by <index>.
|
||||
|
||||
* %set/dar/obj/real <index>
|
||||
* %set/dar/obj/str <index>
|
||||
* %set/dar/obj/vec4 <index>
|
||||
|
|
|
|||
|
|
@ -5652,56 +5652,6 @@ bool of_SET_AV(vthread_t thr, vvp_code_t cp)
|
|||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* %set/dar <label>, <bit>, <wid>
|
||||
*/
|
||||
bool of_SET_DAR(vthread_t thr, vvp_code_t cp)
|
||||
{
|
||||
#if 0
|
||||
unsigned bit = cp->bit_idx[0];
|
||||
unsigned wid = cp->bit_idx[1];
|
||||
unsigned adr = thr->words[3].w_int;
|
||||
|
||||
/* Make a vector of the desired width. */
|
||||
vvp_vector4_t value = vthread_bits_to_vector(thr, bit, wid);
|
||||
|
||||
vvp_net_t*net = cp->net;
|
||||
vvp_fun_signal_object*obj = dynamic_cast<vvp_fun_signal_object*> (net->fun);
|
||||
assert(obj);
|
||||
|
||||
vvp_darray*darray = obj->get_object().peek<vvp_darray>();
|
||||
assert(darray);
|
||||
|
||||
darray->set_word(adr, value);
|
||||
#else
|
||||
fprintf(stderr, "XXXX NOT IMPLEMENTED: %%set/dar ...\n");
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* %set/dar/obj <index>, <bit>, <wid>
|
||||
*/
|
||||
bool of_SET_DAR_OBJ(vthread_t thr, vvp_code_t cp)
|
||||
{
|
||||
#if 0
|
||||
unsigned adr = thr->words[cp->number].w_int;
|
||||
unsigned bit = cp->bit_idx[0];
|
||||
unsigned wid = cp->bit_idx[1];
|
||||
|
||||
vvp_vector4_t value = vthread_bits_to_vector(thr, bit, wid);
|
||||
|
||||
vvp_object_t&top = thr->peek_object();
|
||||
vvp_darray*darray = top.peek<vvp_darray>();
|
||||
assert(darray);
|
||||
|
||||
darray->set_word(adr, value);
|
||||
#else
|
||||
fprintf(stderr, "XXXX NOT IMPLEMENTED: %%set/dar/obj ...\n");
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* %set/dar/obj/real <index>
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue