#else
#error cmake_ARCH ppc
#endif
+#elif defined(__loongarch__) || defined(__loongarch64)
+ #error cmake_ARCH loongarch64
#endif
#error cmake_ARCH unknown
#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);
#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
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)