Skip to content

Commit

Permalink
Merge pull request #4891 from donmor/patch-2
Browse files Browse the repository at this point in the history
Add loongarch64 support
  • Loading branch information
joncampbell123 authored Mar 11, 2024
2 parents f8c2747 + 4fc85e7 commit 3c95b14
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions src/libs/libchdr/lzma/CpuArch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down

0 comments on commit 3c95b14

Please sign in to comment.