diff --git a/configure.ac b/configure.ac index fcc57637d62..9493b0142ca 100644 --- a/configure.ac +++ b/configure.ac @@ -630,6 +630,12 @@ case "$host_cpu" in c_targetcpu="m68k" c_unalignedmemory=yes ;; + loongarch64*) + AC_DEFINE(C_TARGETCPU,LOONGARCH64) + AC_MSG_RESULT(LoongArch) + c_targetcpu="loongarch64" + c_unalignedmemory=yes + ;; armv7*) AC_DEFINE(C_TARGETCPU,ARMV7LE) AC_MSG_RESULT(ARMv7 Little Endian) @@ -871,6 +877,10 @@ if test x$enable_mt32 = xyes ; then AC_MSG_RESULT(yes) AC_DEFINE(C_MT32,1) ;; + loongarch64) + AC_MSG_RESULT(yes) + AC_DEFINE(C_MT32,1) + ;; *) enable_mt32=no AC_MSG_RESULT(no) diff --git a/src/libs/libchdr/lzma/CpuArch.h b/src/libs/libchdr/lzma/CpuArch.h index bd429388024..e322bc9ff3c 100644 --- a/src/libs/libchdr/lzma/CpuArch.h +++ b/src/libs/libchdr/lzma/CpuArch.h @@ -83,6 +83,12 @@ MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned mem #endif +#if defined(__loongarch_lp64) + #define MY_CPU_NAME "loongarch64" + #define MY_CPU_64BIT +#endif + + #if defined(__ppc64__) \ || defined(__powerpc64__) #ifdef __ILP32__