Re: [PATCH] Fix constant folding logic of setcond2_i32

2021-10-20 Thread Liren Wei
On 10/21/21 10:13, Liren Wei wrote: For setcond2_i32 DST, A_low, A_high, B_low, B_high, TCG_COND_EQ, DST should be 0 as long as either half of A and B are not equal. Signed-off-by: Liren Wei --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg

[PATCH] Fix constant folding logic of setcond2_i32

2021-10-20 Thread Liren Wei
For setcond2_i32 DST, A_low, A_high, B_low, B_high, TCG_COND_EQ, DST should be 0 as long as either half of A and B are not equal. Signed-off-by: Liren Wei --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index c239c3bd07

Re: [PATCH 2/2] tcg: Bake tb_destroy() into tcg_region_tree

2021-07-06 Thread Liren Wei
On 7/7/21 8:34 AM, Richard Henderson wrote: On 7/4/21 7:31 AM, Liren Wei wrote: -static gint tb_tc_cmp(gconstpointer ap, gconstpointer bp) +static gint tb_tc_cmp(gconstpointer ap, gconstpointer bp, gpointer _) Using _ here as the variable name isn't ideal.  I guess if this were c++ we

[PATCH 1/2] accel/tcg: Hoist tcg_tb_insert() up above tb_link_page()

2021-07-04 Thread Liren Wei
TranslationBlocks not inserted into the corresponding region tree shall be regarded as partially initialized objects, and needs to be finalized first before inserting into QHT. Signed-off-by: Liren Wei --- accel/tcg/translate-all.c | 9 - 1 file changed, 8 insertions(+), 1 deletion

[PATCH 2/2] tcg: Bake tb_destroy() into tcg_region_tree

2021-07-04 Thread Liren Wei
. Signed-off-by: Liren Wei --- accel/tcg/translate-all.c | 6 -- include/tcg/tcg.h | 1 - tcg/region.c | 18 +++--- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 75e4d06557

[PATCH 0/2] Fix defect in TranslationBlock insertion procedure

2021-07-04 Thread Liren Wei
rewinding. Liren Wei (2): accel/tcg: Hoist tcg_tb_insert() up above tb_link_page() tcg: Bake tb_destroy() into tcg_region_tree accel/tcg/translate-all.c | 15 --- include/tcg/tcg.h | 1 - tcg/region.c | 18 +++--- 3 files changed, 15 insertions

Re: [QUESTION] tcg: Is concurrent storing and code translation of the same code page considered as racing in MTTCG?

2021-02-01 Thread Liren Wei
lating vCPU so that it has chance to invalidate the TB after possibly running that TB for several times) But all these sounds very intrusive to the existing code base, and I'm not sure whether it make sense... Thanks Liren Wei

[QUESTION] tcg: Is concurrent storing and code translation of the same code page considered as racing in MTTCG?

2021-01-31 Thread Liren Wei
    re-translate modified TBs. My question is:   Should the situation described above be considered as a bug or,   an intended behavior for QEMU (, so it's the programmer's fault   for not flushing the icache after modifying shared code page)? Looking forward for your reply, and thanks in advance! -- Liren Wei