本文整理汇总了Java中jdk.vm.ci.amd64.AMD64Kind.QWORD属性的典型用法代码示例。如果您正苦于以下问题:Java AMD64Kind.QWORD属性的具体用法?Java AMD64Kind.QWORD怎么用?Java AMD64Kind.QWORD使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类jdk.vm.ci.amd64.AMD64Kind
的用法示例。
在下文中一共展示了AMD64Kind.QWORD属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: emitIntegerTest
private void emitIntegerTest(Value a, Value b) {
assert ((AMD64Kind) a.getPlatformKind()).isInteger();
OperandSize size = a.getPlatformKind() == AMD64Kind.QWORD ? QWORD : DWORD;
if (isJavaConstant(b) && NumUtil.is32bit(asJavaConstant(b).asLong())) {
append(new AMD64BinaryConsumer.ConstOp(AMD64MIOp.TEST, size, asAllocatable(a), (int) asJavaConstant(b).asLong()));
} else if (isJavaConstant(a) && NumUtil.is32bit(asJavaConstant(a).asLong())) {
append(new AMD64BinaryConsumer.ConstOp(AMD64MIOp.TEST, size, asAllocatable(b), (int) asJavaConstant(a).asLong()));
} else if (isAllocatableValue(b)) {
append(new AMD64BinaryConsumer.Op(AMD64RMOp.TEST, size, asAllocatable(b), asAllocatable(a)));
} else {
append(new AMD64BinaryConsumer.Op(AMD64RMOp.TEST, size, asAllocatable(a), asAllocatable(b)));
}
}
示例2: emitNarrow
@Override
public Value emitNarrow(Value inputVal, int bits) {
if (inputVal.getPlatformKind() == AMD64Kind.QWORD && bits <= 32) {
// TODO make it possible to reinterpret Long as Int in LIR without move
return emitConvertOp(LIRKind.combine(inputVal).changeType(AMD64Kind.DWORD), AMD64RMOp.MOV, DWORD, inputVal);
} else {
return inputVal;
}
}
示例3: emitBitCount
@Override
public Variable emitBitCount(Value value) {
Variable result = getLIRGen().newVariable(LIRKind.combine(value).changeType(AMD64Kind.DWORD));
assert ((AMD64Kind) value.getPlatformKind()).isInteger();
if (value.getPlatformKind() == AMD64Kind.QWORD) {
getLIRGen().append(new AMD64Unary.RMOp(POPCNT, QWORD, result, getLIRGen().asAllocatable(value)));
} else {
getLIRGen().append(new AMD64Unary.RMOp(POPCNT, DWORD, result, getLIRGen().asAllocatable(value)));
}
return result;
}
示例4: emitBitScanReverse
@Override
public Variable emitBitScanReverse(Value value) {
Variable result = getLIRGen().newVariable(LIRKind.combine(value).changeType(AMD64Kind.DWORD));
assert ((AMD64Kind) value.getPlatformKind()).isInteger();
if (value.getPlatformKind() == AMD64Kind.QWORD) {
getLIRGen().append(new AMD64Unary.RMOp(BSR, QWORD, result, getLIRGen().asAllocatable(value)));
} else {
getLIRGen().append(new AMD64Unary.RMOp(BSR, DWORD, result, getLIRGen().asAllocatable(value)));
}
return result;
}
示例5: emitCountLeadingZeros
@Override
public Value emitCountLeadingZeros(Value value) {
Variable result = getLIRGen().newVariable(LIRKind.combine(value).changeType(AMD64Kind.DWORD));
assert ((AMD64Kind) value.getPlatformKind()).isInteger();
if (value.getPlatformKind() == AMD64Kind.QWORD) {
getLIRGen().append(new AMD64Unary.RMOp(LZCNT, QWORD, result, getLIRGen().asAllocatable(value)));
} else {
getLIRGen().append(new AMD64Unary.RMOp(LZCNT, DWORD, result, getLIRGen().asAllocatable(value)));
}
return result;
}
示例6: emitCountTrailingZeros
@Override
public Value emitCountTrailingZeros(Value value) {
Variable result = getLIRGen().newVariable(LIRKind.combine(value).changeType(AMD64Kind.DWORD));
assert ((AMD64Kind) value.getPlatformKind()).isInteger();
if (value.getPlatformKind() == AMD64Kind.QWORD) {
getLIRGen().append(new AMD64Unary.RMOp(TZCNT, QWORD, result, getLIRGen().asAllocatable(value)));
} else {
getLIRGen().append(new AMD64Unary.RMOp(TZCNT, DWORD, result, getLIRGen().asAllocatable(value)));
}
return result;
}