I don't see why this bundles bee.lua three times, but okay (that is why the fixes are duplicated three times) In any case, fixes two things: 1) bee.lua implements a custom spinlock (why???) which needs a cpu_relax, which was unimplemented on ppc* so fill that in 2) at some point this random test was added, which I do not see what it is supposed to accomplish, since Lua does not guarantee order of iteration in a table in any way, so technically this should fail in most cases (the tests are run on every build, why does it not fail on x86?) - the commit message is literally just "add a test" in chinese, so it is not particularly helpful
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
|