Re: [PATCH v5 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi

2021-09-25 Thread Philippe Mathieu-Daudé
On 9/25/21 16:04, Richard Henderson wrote: On 9/25/21 5:54 AM, Philippe Mathieu-Daudé wrote: +    /* High bits must be set; load with lu12i.w + optional ori.  */ +    tcg_target_long hi12 = sextreg(val, 12, 20); +    tcg_out_opc_lu12i_w(s, rd, hi12); +    if (lo != 0) { +    tcg_out_opc_o

Re: [PATCH v5 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi

2021-09-25 Thread WANG Xuerui
Hi Philippe, On 9/25/21 17:54, Philippe Mathieu-Daudé wrote: On 9/24/21 19:25, WANG Xuerui wrote: Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson ---   tcg/loongarch64/tcg-target.c.inc | 109 +++   1 file changed, 109 insertions(+) +/* Loads a 32-bit im

Re: [PATCH v5 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi

2021-09-25 Thread Richard Henderson
On 9/25/21 5:54 AM, Philippe Mathieu-Daudé wrote: +    /* High bits must be set; load with lu12i.w + optional ori.  */ +    tcg_target_long hi12 = sextreg(val, 12, 20); Please declare variables in function prologue. Ah, true. Officially, that's qemu coding style. I tend to overlook it becau

Re: [PATCH v5 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi

2021-09-25 Thread Philippe Mathieu-Daudé
On 9/24/21 19:25, WANG Xuerui wrote: Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 109 +++ 1 file changed, 109 insertions(+) +/* Loads a 32-bit immediate into rd, sign-extended. */ +static void tcg_out_movi_i

[PATCH v5 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi

2021-09-24 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 109 +++ 1 file changed, 109 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 8f7c556c37..f1d0047f5b 100644 --- a/tcg/