46 lines
1.7 KiB
Diff
46 lines
1.7 KiB
Diff
commit ffb877fd6ac8b004f3263e284b584d778fd681e5
|
|
Author: q66 <daniel@octaforge.org>
|
|
Date: Sun Jul 24 21:10:55 2022 +0200
|
|
|
|
fix build on ppc*
|
|
|
|
diff --git a/3rd/bee.lua/bee/thread/spinlock.h b/3rd/bee.lua/bee/thread/spinlock.h
|
|
index ad0cf4e..f4c2f22 100644
|
|
--- a/3rd/bee.lua/bee/thread/spinlock.h
|
|
+++ b/3rd/bee.lua/bee/thread/spinlock.h
|
|
@@ -18,6 +18,8 @@
|
|
asm volatile ("div %0, %0, zero" : "=r" (dummy));
|
|
asm volatile ("" ::: "memory");
|
|
}}
|
|
+#elif defined(__powerpc__)
|
|
+ namespace bee { inline void cpu_relax() { asm volatile ("or 27,27,27" ::: "memory"); }}
|
|
#else
|
|
#error unsupport platform
|
|
#endif
|
|
diff --git a/3rd/luamake/3rd/bee.lua/bee/thread/spinlock.h b/3rd/luamake/3rd/bee.lua/bee/thread/spinlock.h
|
|
index ad0cf4e..f4c2f22 100644
|
|
--- a/3rd/luamake/3rd/bee.lua/bee/thread/spinlock.h
|
|
+++ b/3rd/luamake/3rd/bee.lua/bee/thread/spinlock.h
|
|
@@ -18,6 +18,8 @@
|
|
asm volatile ("div %0, %0, zero" : "=r" (dummy));
|
|
asm volatile ("" ::: "memory");
|
|
}}
|
|
+#elif defined(__powerpc__)
|
|
+ namespace bee { inline void cpu_relax() { asm volatile ("or 27,27,27" ::: "memory"); }}
|
|
#else
|
|
#error unsupport platform
|
|
#endif
|
|
diff --git a/luamake/3rd/bee.lua/bee/thread/spinlock.h b/luamake/3rd/bee.lua/bee/thread/spinlock.h
|
|
index ad0cf4e..f4c2f22 100644
|
|
--- a/luamake/3rd/bee.lua/bee/thread/spinlock.h
|
|
+++ b/luamake/3rd/bee.lua/bee/thread/spinlock.h
|
|
@@ -18,6 +18,8 @@
|
|
asm volatile ("div %0, %0, zero" : "=r" (dummy));
|
|
asm volatile ("" ::: "memory");
|
|
}}
|
|
+#elif defined(__powerpc__)
|
|
+ namespace bee { inline void cpu_relax() { asm volatile ("or 27,27,27" ::: "memory"); }}
|
|
#else
|
|
#error unsupport platform
|
|
#endif
|