start loongarch compile

fix: modify the code to pass compile

add: add code for tcg_out_op, tcg_can_emit_vec_op, tcg_target_op_def to support new tcg_op

fix: fix bugs related to epilogue and ret_addr

fix: fix bug in qemu_ld_slow_path, the return register is wrong
This commit is contained in:
zhaodongru
2023-10-23 18:15:01 +08:00
committed by WangLiangpu
parent 6db5d1a036
commit b957324d3d
8 changed files with 9917 additions and 1 deletions

16
qemu/configure vendored
View File

@@ -491,6 +491,8 @@ elif check_define __aarch64__ ; then
cpu="aarch64"
elif check_define __tricore__ ; then
cpu="tricore"
elif check_define __loongarch64 ; then
cpu="loongarch64"
else
cpu=$(uname -m)
fi
@@ -534,6 +536,10 @@ case "$cpu" in
cpu="tricore"
supported_cpu="yes"
;;
loongarch64)
cpu="loongarch64"
supported_cpu="yes"
;;
*)
# This will result in either an error or falling back to TCI later
ARCH=unknown
@@ -844,6 +850,11 @@ case "$cpu" in
CPU_CFLAGS="-m64 -mcx16"
QEMU_LDFLAGS="-m64 $QEMU_LDFLAGS"
;;
loongarch*)
CPU_CFLAGS=""
QEMU_LDFLAGS=" $QEMU_LDFLAGS"
;;
x32)
CPU_CFLAGS="-mx32"
QEMU_LDFLAGS="-mx32 $QEMU_LDFLAGS"
@@ -2628,6 +2639,11 @@ case "$target_name" in
mttcg="yes"
TARGET_SYSTBL_ABI=i386
;;
loongarch64)
mttcg="yes"
TARGET_ARCH=loongarch64
TARGET_SYSTBL_ABI=common,64
;;
x86_64)
TARGET_BASE_ARCH=i386
TARGET_SYSTBL_ABI=common,64