diff src/share/vm/shark/sharkIntrinsics.cpp @ 7195:2cd5e15048e6

8003868: fix shark for latest HotSpot and LLVM Reviewed-by: twisti Contributed-by: Roman Kennke <rkennke@redhat.com>
author twisti
date Tue, 27 Nov 2012 12:48:52 -0800
parents 069ab3f976d3
children
line wrap: on
line diff
--- a/src/share/vm/shark/sharkIntrinsics.cpp	Mon Nov 26 17:25:11 2012 -0800
+++ b/src/share/vm/shark/sharkIntrinsics.cpp	Tue Nov 27 12:48:52 2012 -0800
@@ -171,7 +171,7 @@
   builder()->CreateBr(done);
 
   builder()->SetInsertPoint(done);
-  PHINode *phi = builder()->CreatePHI(a->getType(), "result");
+  PHINode *phi = builder()->CreatePHI(a->getType(), 0, "result");
   phi->addIncoming(a, return_a);
   phi->addIncoming(b, return_b);
 
@@ -210,7 +210,7 @@
   Value *klass = builder()->CreateValueOfStructEntry(
     state()->pop()->jobject_value(),
     in_ByteSize(oopDesc::klass_offset_in_bytes()),
-    SharkType::oop_type(),
+    SharkType::klass_type(),
     "klass");
 
   state()->push(
@@ -265,8 +265,7 @@
     "addr");
 
   // Perform the operation
-  Value *result = builder()->CreateCmpxchgInt(x, addr, e);
-
+  Value *result = builder()->CreateAtomicCmpXchg(addr, e, x, llvm::SequentiallyConsistent);
   // Push the result
   state()->push(
     SharkValue::create_jint(