Hello community,

here is the log from the commit of package python-greenlet for openSUSE:Factory 
checked in at 2013-05-16 11:26:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-greenlet (Old)
 and      /work/SRC/openSUSE:Factory/.python-greenlet.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-greenlet"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-greenlet/python-greenlet.changes  
2013-03-08 09:43:21.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-greenlet.new/python-greenlet.changes     
2013-05-16 11:26:03.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Apr  8 11:40:21 UTC 2013 - [email protected]
+
+- Add python-greenlet-aarch64-support.diff, for, well, aarch64
+  support.
+
+-------------------------------------------------------------------

New:
----
  python-greenlet-aarch64-support.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-greenlet.spec ++++++
--- /var/tmp/diff_new_pack.vPEKO7/_old  2013-05-16 11:26:03.000000000 +0200
+++ /var/tmp/diff_new_pack.vPEKO7/_new  2013-05-16 11:26:03.000000000 +0200
@@ -33,6 +33,7 @@
 %if 0%{?suse_version} && 0%{?suse_version} <= 1110
 %{!?python_sitearch: %global python_sitearch %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 %endif
+Patch1:         python-greenlet-aarch64-support.diff
 
 %description
 The greenlet package is a spin-off of Stackless, a version of CPython
@@ -53,6 +54,7 @@
 
 %prep
 %setup -q -n greenlet-%{version}
+%patch1
 
 %build
 CFLAGS="%{optflags}" python setup.py build


++++++ python-greenlet-aarch64-support.diff ++++++
--- ./slp_platformselect.h.mm   2012-05-12 22:56:32.000000000 +0000
+++ ./slp_platformselect.h      2013-04-08 11:28:47.000000000 +0000
@@ -32,4 +32,6 @@
 #include "platform/switch_arm32_gcc.h" /* gcc using arm32 */
 #elif defined(__GNUC__) && defined(__mips__) && defined(__linux__)
 #include "platform/switch_mips_unix.h" /* Linux/MIPS */
+#elif defined(__GNUC__) && defined(__aarch64__)
+#include "platform/switch_aarch64_gcc.h" /* Aarch64 ABI */
 #endif
--- ./platform/switch_aarch64_gcc.h.mm  2013-04-13 21:40:23.000000000 +0000
+++ ./platform/switch_aarch64_gcc.h     2013-04-13 21:41:39.000000000 +0000
@@ -0,0 +1,76 @@
+/*
+ * this is the internal transfer function.
+ *
+ * HISTORY
+ * 13-Apr-13 Add support for strange GCC caller-save decisions
+ * 08-Apr-13 File creation. Michael Matz
+ *
+ * NOTES
+ *
+ * Simply save all callee saved registers
+ *
+ */
+
+#define STACK_REFPLUS 1
+
+#ifdef SLP_EVAL
+#define STACK_MAGIC 0
+#define REGS_TO_SAVE "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", \
+                     "r27", "r28", "r30" /* aka lr */, \
+                     "v8", "v9", "v10", "v11", \
+                     "v12", "v13", "v14", "v15"
+
+/* See below for the purpose of this function.  */
+__attribute__((noinline, noclone)) int fancy_return_zero(void);
+__attribute__((noinline, noclone)) int
+fancy_return_zero(void)
+{
+  return 0;
+}
+
+static int
+slp_switch(void)
+{
+       int err = 0;
+       void *fp;
+        register long *stackref, stsizediff;
+        __asm__ volatile ("" : : : REGS_TO_SAVE);
+       __asm__ volatile ("str x29, %0" : "=m"(fp) : : );
+        __asm__ ("mov %0, sp" : "=r" (stackref));
+        {
+                SLP_SAVE_STATE(stackref, stsizediff);
+                __asm__ volatile (
+                    "add sp,sp,%0\n"
+                   "add x29,x29,%0\n"
+                    :
+                    : "r" (stsizediff)
+                    );
+               SLP_RESTORE_STATE();
+               /* SLP_SAVE_STATE macro contains some return statements
+                  (of -1 and 1).  It falls through only when
+                  the return value of slp_save_state() is zero, which
+                  is placed in x0.
+                  In that case we (slp_switch) also want to return zero
+                  (also in x0 of course).
+                  Now, some GCC versions (seen with 4.8) think it's a
+                  good idea to save/restore x0 around the call to
+                  slp_restore_state(), instead of simply zeroing it
+                  at the return below.  But slp_restore_state
+                  writes random values to the stack slot used for this
+                  save/restore (from when it once was saved above in
+                  SLP_SAVE_STATE, when it was still uninitialized), so
+                  "restoring" that precious zero actually makes us
+                  return random values.  There are some ways to make
+                  GCC not use that zero value in the normal return path
+                  (e.g. making err volatile, but that costs a little
+                  stack space), and the simplest is to call a function
+                  that returns an unknown value (which happens to be zero),
+                  so the saved/restored value is unused.  */
+               err = fancy_return_zero();
+        }
+       __asm__ volatile ("ldr x29, %0" : : "m" (fp) :);
+        __asm__ volatile ("" : : : REGS_TO_SAVE);
+        return err;
+}
+
+#endif
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to