From 522bd54edaa2fa404fd428f8ad0bcb0f0bec5639 Mon Sep 17 00:00:00 2001 From: Hongliang Wang Date: Tue, 26 Sep 2023 09:12:01 +0800 Subject: add loongarch64 port Author: Xiaojuan Zhai Author: Meidan Li Author: Guoqi Chen Author: Xiaolin Zhao Author: Fan peng Author: Jiantao Shan Author: Xuhui Qiang Author: Jingyun Hua Author: Liu xue Author: Hongliang Wang --- configure | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 0b966ede..940b3eaf 100755 --- a/configure +++ b/configure @@ -328,6 +328,7 @@ i?86*) ARCH=i386 ;; x86_64-x32*|x32*|x86_64*x32) ARCH=x32 ;; x86_64-nt64*) ARCH=nt64 ;; x86_64*) ARCH=x86_64 ;; +loongarch64*) ARCH=loongarch64 ;; m68k*) ARCH=m68k ;; mips64*|mipsisa64*) ARCH=mips64 ;; mips*) ARCH=mips ;; @@ -671,6 +672,19 @@ if test "$ARCH" = "aarch64" ; then trycppif __AARCH64EB__ "$t" && SUBARCH=${SUBARCH}_be fi +if test "$ARCH" = "loongarch64" ; then +trycppif __loongarch_soft_float "$t" && SUBARCH=${SUBARCH}-sf +trycppif __loongarch_single_float "$t" && SUBARCH=${SUBARCH}-sp +printf "checking whether assembler support FCSRs... " +echo "__asm__(\"movfcsr2gr \$t0,\$fcsr0\");" > "$tmpc" +if $CC -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then +printf "yes\n" +else +printf "no\n" +CFLAGS_AUTO="$CFLAGS_AUTO -DBROKEN_LOONGARCH_FCSR_ASM" +fi +fi + if test "$ARCH" = "m68k" ; then if trycppif "__HAVE_68881__" ; then : ; elif trycppif "__mcffpu__" ; then SUBARCH="-fp64" -- cgit v1.2.1