use of com.oracle.svm.core.graal.nodes.FloatingWordCastNode in project graal by oracle.
the class AddressOfVMThreadLocalNode method lower.
@Override
public void lower(LoweringTool tool) {
assert threadLocalInfo.offset >= 0;
ValueNode base = holder;
if (base.getStackKind() == JavaKind.Object) {
base = graph().unique(new FloatingWordCastNode(FrameAccess.getWordStamp(), base));
}
assert base.getStackKind() == FrameAccess.getWordKind();
ConstantNode offset = ConstantNode.forIntegerKind(FrameAccess.getWordKind(), threadLocalInfo.offset, graph());
ValueNode address = graph().unique(new AddNode(base, offset));
replaceAtUsagesAndDelete(address);
}
use of com.oracle.svm.core.graal.nodes.FloatingWordCastNode in project graal by oracle.
the class SubstrateBasicLoweringProvider method createReadHub.
@Override
protected ValueNode createReadHub(StructuredGraph graph, ValueNode object, LoweringTool tool) {
if (tool.getLoweringStage() != LoweringTool.StandardLoweringStage.LOW_TIER) {
return graph.unique(new LoadHubNode(tool.getStampProvider(), object));
}
assert !object.isConstant() || object.asJavaConstant().isNull();
ValueNode memoryRead = createReadBaseWithOffset(graph, object, getObjectLayout().getHubOffset(), FrameAccess.getWordStamp());
ValueNode masked = graph.unique(new AndNode(memoryRead, ConstantNode.forIntegerKind(FrameAccess.getWordKind(), ObjectHeader.BITS_CLEAR.rawValue(), graph)));
return uncompress(graph.unique(new FloatingWordCastNode(dynamicHubStamp, masked)));
}
Aggregations