changeset in /hg/icedtea6: 2009-07-17 Gary Benson <gbenson at red...
Gary Benson
gbenson at redhat.com
Fri Jul 17 03:08:28 PDT 2009
changeset d20bab985f89 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d20bab985f89
description:
2009-07-17 Gary Benson <gbenson at redhat.com>
* ports/hotspot/src/share/vm/shark/sharkBuilder.hpp
(SharkBuilder::pointer_constant): Conditionalize a hack.
diffstat:
2 files changed, 9 insertions(+), 6 deletions(-)
ChangeLog | 5 +++++
ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 10 ++++------
diffs (45 lines):
diff -r ea9d66cbd06d -r d20bab985f89 ChangeLog
--- a/ChangeLog Thu Jul 16 15:34:14 2009 +0200
+++ b/ChangeLog Fri Jul 17 06:04:59 2009 -0400
@@ -1,3 +1,8 @@ 2009-07-16 Matthias Klose <doko at ubuntu
+2009-07-17 Gary Benson <gbenson at redhat.com>
+
+ * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp
+ (SharkBuilder::pointer_constant): Conditionalize a hack.
+
2009-07-16 Matthias Klose <doko at ubuntu.com>
* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp (native_entry):
diff -r ea9d66cbd06d -r d20bab985f89 ports/hotspot/src/share/vm/shark/sharkBuilder.hpp
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Thu Jul 16 15:34:14 2009 +0200
+++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp Fri Jul 17 06:04:59 2009 -0400
@@ -156,6 +156,9 @@ class SharkBuilder : public llvm::IRBuil
llvm::Constant* pointer_constant(const void *ptr)
{
+#if SHARK_LLVM_VERSION >= 25 || !defined(AMD64)
+ return LLVMValue::intptr_constant((intptr_t) ptr);
+#else
// Create a pointer constant that points at PTR. We do this by
// creating a GlobalVariable mapped at PTR. This is a workaround
// for http://www.llvm.org/bugs/show_bug.cgi?id=2920
@@ -175,18 +178,13 @@ class SharkBuilder : public llvm::IRBuil
snprintf(name, sizeof name - 1, "pointer_constant_%p", ptr);
GlobalVariable *value = new GlobalVariable(
-#if SHARK_LLVM_VERSION >= 26
- // LLVM 2.6 requires a LLVMContext during GlobalVariable construction.
- // getGlobalConext() returns one that can be used as long as the shark
- // compiler are single-threaded.
- getGlobalContext(),
-#endif
SharkType::intptr_type(),
false, GlobalValue::ExternalLinkage,
NULL, name, module());
execution_engine()->addGlobalMapping(value, const_cast<void*>(ptr));
return ConstantExpr::getPtrToInt(value, SharkType::intptr_type());
+#endif // SHARK_LLVM_VERSION >= 25 || !AMD64
}
// Helper for making pointers
More information about the distro-pkg-dev
mailing list