Re: [PATCH v5 16/30] tcg/loongarch64: Implement shl/shr/sar/rotl/rotr ops

2021-09-25 Thread Philippe Mathieu-Daudé
On 9/25/21 16:09, Richard Henderson wrote: On 9/25/21 6:05 AM, Philippe Mathieu-Daudé wrote: +    case INDEX_op_shl_i32: +    if (c2) { Why can't we use:     tcg_debug_assert(a2 <= 0x1f);     tcg_out_opc_slli_w(s, a0, a1, a2); ? Because tcg/optimize.c can produc

Re: [PATCH v5 16/30] tcg/loongarch64: Implement shl/shr/sar/rotl/rotr ops

2021-09-25 Thread Richard Henderson
On 9/25/21 6:05 AM, Philippe Mathieu-Daudé wrote: +    case INDEX_op_shl_i32: +    if (c2) { Why can't we use:    tcg_debug_assert(a2 <= 0x1f);    tcg_out_opc_slli_w(s, a0, a1, a2); ? Because tcg/optimize.c can produce out-of-range values. We have this same mas

Re: [PATCH v5 16/30] tcg/loongarch64: Implement shl/shr/sar/rotl/rotr ops

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-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 91 tcg/loongarch64/tcg-target.h | 4 +- 3 files changed, 94 insertio

[PATCH v5 16/30] tcg/loongarch64: Implement shl/shr/sar/rotl/rotr ops

2021-09-24 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 91 tcg/loongarch64/tcg-target.h | 4 +- 3 files changed, 94 insertions(+), 2 deletions(-) diff --git a/tcg/loo