On 1/18/23 09:11, Richard Henderson wrote:
Adjust the constraints to allow any int32_t for immediate
addition.  Split immediate adds into addu16i + addi, which
covers quite a lot of the immediate space.  For the hole in
the middle, load the constant into TMP0 instead.

Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
  tcg/loongarch64/tcg-target-con-set.h |  4 +-
  tcg/loongarch64/tcg-target-con-str.h |  2 +-
  tcg/loongarch64/tcg-target.c.inc     | 57 ++++++++++++++++++++++++----
  3 files changed, 53 insertions(+), 10 deletions(-)

I've checked some generated code and this indeed benefits.

Reviewed-by: WANG Xuerui <g...@xen0n.name>


Reply via email to