[pypy-commit] stmgc default: Another llvm "fix", in quotes, because it might be bogus.
arigo
noreply at buildbot.pypy.org
Thu Mar 13 15:38:31 CET 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r998:321767c428c6
Date: 2014-03-13 15:38 +0100
http://bitbucket.org/pypy/stmgc/changeset/321767c428c6/
Log: Another llvm "fix", in quotes, because it might be bogus.
If 'a' is a global with an address_space(256), then this fix allows
us to use "(void *)(long)&a" in prebuilt structs.
It looks bogus because "(void *)&a" still doesn't work, with clang
giving the error "error: initializer element is not a compile-time
constant". Too bad, we can always generate the first variant in
pypy and be happy.
diff --git a/c7/llvmfix/addrspacecast-in-constant.diff b/c7/llvmfix/addrspacecast-in-constant.diff
new file mode 100644
--- /dev/null
+++ b/c7/llvmfix/addrspacecast-in-constant.diff
@@ -0,0 +1,13 @@
+Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+===================================================================
+--- lib/CodeGen/AsmPrinter/AsmPrinter.cpp (revision 203791)
++++ lib/CodeGen/AsmPrinter/AsmPrinter.cpp (working copy)
+@@ -1529,6 +1529,8 @@
+ Ctx);
+ }
+
++ case Instruction::AddrSpaceCast:
++ // XXX??? I *think* it is correct at least in PyPy's case
+ case Instruction::Trunc:
+ // We emit the value and depend on the assembler to truncate the generated
+ // expression properly. This is important for differences between
More information about the pypy-commit
mailing list