changeset in /hg/icedtea6: Merge
Gary Benson
gbenson at redhat.com
Tue Nov 4 08:36:45 PST 2008
changeset 74930fcb28d8 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=74930fcb28d8
description:
Merge
diffstat:
5 files changed, 85 insertions(+), 8 deletions(-)
ChangeLog | 22 ++++++++++++++++
ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 12 +++------
ports/hotspot/src/share/vm/shark/sharkBlock.hpp | 6 ++++
ports/hotspot/src/share/vm/shark/sharkRuntime.cpp | 28 +++++++++++++++++++++
ports/hotspot/src/share/vm/shark/sharkRuntime.hpp | 25 ++++++++++++++++++
diffs (160 lines):
diff -r f9592f3296d6 -r 74930fcb28d8 ChangeLog
--- a/ChangeLog Tue Nov 04 11:00:50 2008 -0500
+++ b/ChangeLog Tue Nov 04 11:32:33 2008 -0500
@@ -1,3 +1,25 @@ 2008-11-04 Omair Majid <omajid at redhat.
+2008-11-04 Gary Benson <gbenson at redhat.com>
+
+ * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp
+ (SharkRuntime::_f2i): New constant.
+ (SharkRuntime::_f2l): Likewise.
+ (SharkRuntime::_d2i): Likewise.
+ (SharkRuntime::_d2l): Likewise.
+ (SharkRuntime::f2i): New accessor.
+ (SharkRuntime::f2l): Likewise.
+ (SharkRuntime::d2i): Likewise.
+ (SharkRuntime::d2l): Likewise.
+ * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp
+ (SharkRuntime::_f2i): New constant.
+ (SharkRuntime::_f2l): Likewise.
+ (SharkRuntime::_d2i): Likewise.
+ (SharkRuntime::_d2l): Likewise.
+ (SharkRuntime::initialize): Initialize the above.
+ * ports/hotspot/src/share/vm/shark/sharkBlock.hpp
+ (SharkBlock::call_vm_leaf): New method.
+ * ports/hotspot/src/share/vm/shark/sharkBlock.cpp
+ (SharkBlock::parse): Use runtime calls for f2i, f2l, d2i and d2l.
+
2008-11-04 Omair Majid <omajid at redhat.com>
* Makefile.am (stamps/pulse-java.stamp): Link in libpulse.so after all
diff -r f9592f3296d6 -r 74930fcb28d8 ports/hotspot/src/share/vm/shark/sharkBlock.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Tue Nov 04 11:00:50 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Tue Nov 04 11:32:33 2008 -0500
@@ -742,13 +742,11 @@ void SharkBlock::parse()
case Bytecodes::_f2i:
push(SharkValue::create_jint(
- builder()->CreateFPToSI(
- pop()->jfloat_value(), SharkType::jint_type())));
+ call_vm_leaf(SharkRuntime::f2i(), pop()->jfloat_value())));
break;
case Bytecodes::_f2l:
push(SharkValue::create_jlong(
- builder()->CreateFPToSI(
- pop()->jfloat_value(), SharkType::jlong_type())));
+ call_vm_leaf(SharkRuntime::f2l(), pop()->jfloat_value())));
break;
case Bytecodes::_f2d:
push(SharkValue::create_jdouble(
@@ -758,13 +756,11 @@ void SharkBlock::parse()
case Bytecodes::_d2i:
push(SharkValue::create_jint(
- builder()->CreateFPToSI(
- pop()->jdouble_value(), SharkType::jint_type())));
+ call_vm_leaf(SharkRuntime::d2i(), pop()->jdouble_value())));
break;
case Bytecodes::_d2l:
push(SharkValue::create_jlong(
- builder()->CreateFPToSI(
- pop()->jdouble_value(), SharkType::jlong_type())));
+ call_vm_leaf(SharkRuntime::d2l(), pop()->jdouble_value())));
break;
case Bytecodes::_d2f:
push(SharkValue::create_jfloat(
diff -r f9592f3296d6 -r 74930fcb28d8 ports/hotspot/src/share/vm/shark/sharkBlock.hpp
--- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Tue Nov 04 11:00:50 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp Tue Nov 04 11:32:33 2008 -0500
@@ -371,6 +371,12 @@ class SharkBlock : public ResourceObj {
return call_vm_nocheck(callee, args, args + 4);
}
+ llvm::CallInst* call_vm_leaf(llvm::Constant* callee,
+ llvm::Value* arg1)
+ {
+ return builder()->CreateCall(callee, arg1);
+ }
+
// Whole-method synchronization
public:
void acquire_method_lock();
diff -r f9592f3296d6 -r 74930fcb28d8 ports/hotspot/src/share/vm/shark/sharkRuntime.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Tue Nov 04 11:00:50 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Tue Nov 04 11:32:33 2008 -0500
@@ -43,6 +43,11 @@ Constant* SharkRuntime::_throw_NullPoint
Constant* SharkRuntime::_throw_NullPointerException;
Constant* SharkRuntime::_trace_bytecode;
+Constant* SharkRuntime::_f2i;
+Constant* SharkRuntime::_f2l;
+Constant* SharkRuntime::_d2i;
+Constant* SharkRuntime::_d2l;
+
Constant* SharkRuntime::_dump;
Constant* SharkRuntime::_is_subtype_of;
Constant* SharkRuntime::_should_not_reach_here;
@@ -158,6 +163,29 @@ void SharkRuntime::initialize(SharkBuild
FunctionType::get(Type::VoidTy, params, false),
"SharkRuntime__trace_bytecode");
+ // Leaf calls
+ params.clear();
+ params.push_back(SharkType::jfloat_type());
+ _f2i = builder->make_function(
+ (intptr_t) SharedRuntime::f2i,
+ FunctionType::get(SharkType::jint_type(), params, false),
+ "SharedRuntime__f2i");
+ _f2l = builder->make_function(
+ (intptr_t) SharedRuntime::f2l,
+ FunctionType::get(SharkType::jlong_type(), params, false),
+ "SharedRuntime__f2l");
+
+ params.clear();
+ params.push_back(SharkType::jdouble_type());
+ _d2i = builder->make_function(
+ (intptr_t) SharedRuntime::d2i,
+ FunctionType::get(SharkType::jint_type(), params, false),
+ "SharedRuntime__d2i");
+ _d2l = builder->make_function(
+ (intptr_t) SharedRuntime::d2l,
+ FunctionType::get(SharkType::jlong_type(), params, false),
+ "SharedRuntime__d2l");
+
// Non-VM calls
params.clear();
params.push_back(SharkType::intptr_type());
diff -r f9592f3296d6 -r 74930fcb28d8 ports/hotspot/src/share/vm/shark/sharkRuntime.hpp
--- a/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Tue Nov 04 11:00:50 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Tue Nov 04 11:32:33 2008 -0500
@@ -162,6 +162,31 @@ class SharkRuntime : public AllStatic {
return *(thread->zero_stack()->sp() + offset);
}
+ // Leaf calls
+ private:
+ static llvm::Constant* _f2i;
+ static llvm::Constant* _f2l;
+ static llvm::Constant* _d2i;
+ static llvm::Constant* _d2l;
+
+ public:
+ static llvm::Constant* f2i()
+ {
+ return _f2i;
+ }
+ static llvm::Constant* f2l()
+ {
+ return _f2l;
+ }
+ static llvm::Constant* d2i()
+ {
+ return _d2i;
+ }
+ static llvm::Constant* d2l()
+ {
+ return _d2l;
+ }
+
// Non-VM calls
private:
static llvm::Constant* _dump;
More information about the distro-pkg-dev
mailing list