Author: Armin Rigo <[email protected]>
Branch: c7-refactor
Changeset: r871:35baad3a75f6
Date: 2014-02-26 15:08 +0100
http://bitbucket.org/pypy/stmgc/changeset/35baad3a75f6/
Log: Workaround for another llvm bug
diff --git a/c7/stmgc.h b/c7/stmgc.h
--- a/c7/stmgc.h
+++ b/c7/stmgc.h
@@ -213,11 +213,15 @@
Use the macro STM_START_TRANSACTION() to start a transaction that
can be restarted using the 'jmpbuf' (a local variable of type
stm_jmpbuf_t). */
-#define STM_START_TRANSACTION(tl, jmpbuf) ({ \
- int _restart = __builtin_setjmp(jmpbuf); \
- _stm_start_transaction(tl, &jmpbuf); \
- _restart; \
+#define STM_START_TRANSACTION(tl, jmpbuf) ({ \
+ int _restart = __builtin_setjmp(jmpbuf) ? _stm_duck() : 0; \
+ _stm_start_transaction(tl, &jmpbuf); \
+ _restart; \
})
+static inline int _stm_duck(void) {
+ asm("/* workaround for a llvm bug */");
+ return 1;
+}
/* Start an inevitable transaction, if it's going to return from the
current function immediately. */
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit