gpt4 book ai didi

org.graalvm.compiler.nodes.calc.ZeroExtendNode.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 00:24:31 26 4
gpt4 key购买 nike

本文整理了Java中org.graalvm.compiler.nodes.calc.ZeroExtendNode.<init>()方法的一些代码示例,展示了ZeroExtendNode.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZeroExtendNode.<init>()方法的具体详情如下:
包路径:org.graalvm.compiler.nodes.calc.ZeroExtendNode
类名称:ZeroExtendNode
方法名:<init>

ZeroExtendNode.<init>介绍

暂无

代码示例

代码示例来源:origin: org.graalvm.compiler/compiler

/**
 * @param compressible whether the convert should be compressible
 */
protected ValueNode implicitLoadConvert(JavaKind kind, ValueNode value, boolean compressible) {
  if (useCompressedOops(kind, compressible)) {
    return newCompressionNode(CompressionOp.Uncompress, value);
  }
  switch (kind) {
    case Byte:
    case Short:
      return new SignExtendNode(value, 32);
    case Boolean:
    case Char:
      return new ZeroExtendNode(value, 32);
  }
  return value;
}

代码示例来源:origin: org.graalvm.compiler/compiler

public ValueNode convert(GraphBuilderContext b, ValueNode value, JavaKind toKind, boolean unsigned) {
  if (value.getStackKind() == toKind) {
    return value;
  }
  if (toKind == JavaKind.Int) {
    assert value.getStackKind() == JavaKind.Long;
    return b.add(new NarrowNode(value, 32));
  } else {
    assert toKind == JavaKind.Long;
    assert value.getStackKind() == JavaKind.Int;
    if (unsigned) {
      return b.add(new ZeroExtendNode(value, 64));
    } else {
      return b.add(new SignExtendNode(value, 64));
    }
  }
}

代码示例来源:origin: org.graalvm.compiler/compiler

return new ZeroExtendNode(other.getValue(), other.getInputBits(), resultBits, other.isInputAlwaysPositive());
self = new ZeroExtendNode(forValue, inputBits, resultBits, alwaysPositive);

代码示例来源:origin: org.graalvm.compiler/compiler

@Override
  public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode value) {
    // return (char) (Integer.reverse(i) >> 16);
    ReverseBytesNode reverse = b.add(new ReverseBytesNode(value));
    RightShiftNode rightShift = b.add(new RightShiftNode(reverse, b.add(ConstantNode.forInt(16))));
    ZeroExtendNode charCast = b.add(new ZeroExtendNode(b.add(new NarrowNode(rightShift, 16)), 32));
    b.push(JavaKind.Char, b.append(charCast.canonical(null)));
    return true;
  }
});

代码示例来源:origin: org.graalvm.compiler/compiler

long shortestTrip = (extremum - init) / stride + 1;
  if (countedLoopInfo.constantMaxTripCount().equals(shortestTrip)) {
    return graph.unique(new ZeroExtendNode(input, INT_BITS, ADDRESS_BITS, true));
      inductionVariable.direction() == InductionVariable.Direction.Up &&
      (countedLoopInfo.getOverFlowGuard() != null || countedLoopInfo.counterNeverOverflows())) {
return graph.unique(new ZeroExtendNode(input, INT_BITS, ADDRESS_BITS, true));

代码示例来源:origin: com.oracle.substratevm/svm

return graph.unique(new NarrowNode(value, toBits));
} else if (isUnsigned) {
  return graph.unique(new ZeroExtendNode(value, toBits));
} else {
  return graph.unique(new SignExtendNode(value, toBits));

代码示例来源:origin: org.graalvm.compiler/compiler

SignExtendNode ext = (SignExtendNode) forX;
if (rawY == ((1L << ext.getInputBits()) - 1)) {
  return new ZeroExtendNode(ext.getValue(), ext.getResultBits());

代码示例来源:origin: com.oracle.substratevm/library-support

assert stackKind.getBitCount() > readKind.getBitCount() : "read kind must be narrower than stack kind";
if (readKind.isUnsigned()) { // needed or another op may illegally sign-extend
  value = kit.unique(new ZeroExtendNode(value, stackKind.getBitCount()));
} else {
  value = kit.unique(new SignExtendNode(value, stackKind.getBitCount()));

代码示例来源:origin: org.graalvm.compiler/compiler

return new ZeroExtendNode(other.getValue(), other.getInputBits(), getResultBits(), ((ZeroExtendNode) other).isInputAlwaysPositive());

代码示例来源:origin: com.oracle.substratevm/svm

returnValue = kit.unique(new FloatConvertNode(FloatConvert.F2D, returnValue));
} else if (fromKind.isUnsigned() && returnKind.isNumericInteger() && returnKind.getBitCount() > fromKind.getBitCount()) {
  returnValue = kit.unique(new ZeroExtendNode(returnValue, returnKind.getBitCount()));
} else if (fromKind.isNumericInteger() && returnKind.isNumericInteger() && returnKind.getBitCount() > fromKind.getBitCount()) {
  returnValue = kit.unique(new SignExtendNode(returnValue, returnKind.getBitCount()));

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com