src/share/vm/shark/sharkIntrinsics.cpp
Print this page
rev 3850 : [mq]: shark.patch
@@ -169,11 +169,11 @@
builder()->SetInsertPoint(return_b);
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);
// Push the result
state()->push(
@@ -208,11 +208,11 @@
void SharkIntrinsics::do_Object_getClass() {
Value *klass = builder()->CreateValueOfStructEntry(
state()->pop()->jobject_value(),
in_ByteSize(oopDesc::klass_offset_in_bytes()),
- SharkType::oop_type(),
+ SharkType::klass_type(),
"klass");
state()->push(
SharkValue::create_jobject(
builder()->CreateValueOfStructEntry(
@@ -263,12 +263,11 @@
builder()->CreateIntCast(offset, SharkType::intptr_type(), true)),
PointerType::getUnqual(SharkType::jint_type()),
"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(
builder()->CreateIntCast(
builder()->CreateICmpEQ(result, e), SharkType::jint_type(), true),