Skip to content

Commit

Permalink
Merge pull request #4704 from wuruilong01/master
Browse files Browse the repository at this point in the history
Add support for loongarch
  • Loading branch information
vstakhov committed Nov 16, 2023
2 parents 34843a2 + 0880967 commit 2310380
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/FindArch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ set(archdetect_c_code "
#else
#error cmake_ARCH ppc
#endif
#elif defined(__loongarch__) || defined(__loongarch64)
#error cmake_ARCH loongarch64
#endif
#error cmake_ARCH unknown
Expand Down
2 changes: 2 additions & 0 deletions contrib/backward-cpp/backward.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4222,6 +4222,8 @@ class SignalHandling {
#else
error_addr = reinterpret_cast<void *>(uctx->uc_mcontext.pc);
#endif
#elif defined(__loongarch__)
error_addr = reinterpret_cast<void *>(uctx->uc_mcontext.__pc);
#elif defined(__mips__)
error_addr = reinterpret_cast<void *>(
reinterpret_cast<struct sigcontext *>(&uctx->uc_mcontext)->sc_pc);
Expand Down
2 changes: 2 additions & 0 deletions contrib/libev/ev.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,8 @@ struct signalfd_siginfo
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("tb1 0,%%r0,128" : : : "memory")
#elif defined __sh__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("" : : : "memory")
#elif defined __loongarch__ || __loongarch64
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("dbar %0 ": : "I"(0) : "memory")
#endif
#endif
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/rspamd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,8 @@ get_cpu_architecture(void)
return "ARM64";
#elif defined(__arm__) || defined(_M_ARM)
return "ARM";
#elif defined(__loongarch__) || defined(__loongarch64)
return "LOONGARCH64";
#elif defined(__mips__)
return "MIPS";
#elif defined(__powerpc__) || defined(_M_PPC)
Expand Down

0 comments on commit 2310380

Please sign in to comment.