33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
commit a384b9814f0d1c0072d557c96df5b73831d25325
|
|
Author: q66 <daniel@octaforge.org>
|
|
Date: Sun Sep 25 13:46:41 2022 +0000
|
|
|
|
fix build on ppc*
|
|
|
|
diff --git a/3rd/luamake/3rd/bee.lua/bee/thread/spinlock.h b/3rd/luamake/3rd/bee.lua/bee/thread/spinlock.h
|
|
index ad0cf4e..ac77d14 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("ori 0,0,0" ::: "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..ac77d14 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("ori 0,0,0" ::: "memory"); }}
|
|
#else
|
|
#error unsupport platform
|
|
#endif
|