From aee540d8bbde64605d9e2620f8448d2815686187 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Mon, 6 Jan 2014 09:12:42 -0800 Subject: [PATCH] Fix sort of %event command in vvp compile list. The sort is important, the names must be sorted because the table is searched using binary search. --- vvp/compile.cc | 2 +- vvp/vpi_vthr_vector.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vvp/compile.cc b/vvp/compile.cc index e34adeed8..2c292dd1f 100644 --- a/vvp/compile.cc +++ b/vvp/compile.cc @@ -152,10 +152,10 @@ static const struct opcode_table_s opcode_table[] = { { "%dup/vec4", of_DUP_VEC4,0, {OA_NONE, OA_NONE, OA_NONE} }, { "%end", of_END, 0, {OA_NONE, OA_NONE, OA_NONE} }, { "%evctl", of_EVCTL, 2, {OA_FUNC_PTR, OA_BIT1, OA_NONE} }, - { "%event", of_EVENT, 1, {OA_FUNC_PTR, OA_NONE, OA_NONE} }, { "%evctl/c",of_EVCTLC, 0, {OA_NONE, OA_NONE, OA_NONE} }, { "%evctl/i",of_EVCTLI, 2, {OA_FUNC_PTR, OA_BIT1, OA_NONE} }, { "%evctl/s",of_EVCTLS, 2, {OA_FUNC_PTR, OA_BIT1, OA_NONE} }, + { "%event", of_EVENT, 1, {OA_FUNC_PTR, OA_NONE, OA_NONE} }, { "%flag_get/vec4", of_FLAG_GET_VEC4, 1, {OA_NUMBER, OA_NONE, OA_NONE} }, { "%flag_set/imm", of_FLAG_SET_IMM, 2, {OA_NUMBER, OA_BIT1, OA_NONE} }, { "%flag_set/vec4", of_FLAG_SET_VEC4, 1, {OA_NUMBER, OA_NONE, OA_NONE} }, diff --git a/vvp/vpi_vthr_vector.cc b/vvp/vpi_vthr_vector.cc index 276514664..604e7fbb6 100644 --- a/vvp/vpi_vthr_vector.cc +++ b/vvp/vpi_vthr_vector.cc @@ -709,7 +709,7 @@ class __vpiVThrVec4Stack : public __vpiHandle { int vpi_get(int code); void vpi_get_value(p_vpi_value val); private: - void vpi_get_value_string_(p_vpi_value val, const vvp_vector4_t&val); + void vpi_get_value_string_(p_vpi_value vp, const vvp_vector4_t&val); private: unsigned depth_; };