本文整理汇总了Java中jdk.vm.ci.sparc.SPARC.CPUFeature类的典型用法代码示例。如果您正苦于以下问题:Java CPUFeature类的具体用法?Java CPUFeature怎么用?Java CPUFeature使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CPUFeature类属于jdk.vm.ci.sparc.SPARC包,在下文中一共展示了CPUFeature类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: canUseShortBranch
import jdk.vm.ci.sparc.SPARC.CPUFeature; //导入依赖的package包/类
private boolean canUseShortBranch(CompilationResultBuilder crb, SPARCAssembler asm, int position) {
if (!asm.hasFeature(CPUFeature.CBCOND)) {
return false;
}
if (!((SPARCKind) x.getPlatformKind()).isInteger()) {
return false;
}
// Do not use short branch, if the y value is a constant and does not fit into simm5 but
// fits into simm13; this means the code with CBcond would be longer as the code without
// CBcond.
if (isJavaConstant(y) && !isSimm5(asJavaConstant(y)) && isSimm13(asJavaConstant(y))) {
return false;
}
boolean hasShortJumpTarget = false;
if (!crb.isSuccessorEdge(trueDestination)) {
hasShortJumpTarget |= isShortBranch(asm, position, trueDestinationHint, trueDestination.label());
}
if (!crb.isSuccessorEdge(falseDestination)) {
hasShortJumpTarget |= isShortBranch(asm, position, falseDestinationHint, falseDestination.label());
}
return hasShortJumpTarget;
}
示例2: moveBetweenFpGp
import jdk.vm.ci.sparc.SPARC.CPUFeature; //导入依赖的package包/类
private void moveBetweenFpGp(AllocatableValue dst, AllocatableValue src) {
AllocatableValue tempSlot;
PlatformKind dstKind = dst.getPlatformKind();
PlatformKind srcKind = src.getPlatformKind();
if (getLIRGen().getArchitecture().getFeatures().contains(CPUFeature.VIS3) && !(srcKind == WORD && dstKind == SINGLE) && !(srcKind == SINGLE && dstKind == WORD)) {
tempSlot = AllocatableValue.ILLEGAL;
} else {
tempSlot = getTempSlot(LIRKind.value(XWORD));
}
getLIRGen().append(new MoveFpGp(dst, src, tempSlot));
}
示例3: conditionalJump
import jdk.vm.ci.sparc.SPARC.CPUFeature; //导入依赖的package包/类
@Override
protected void conditionalJump(int index, Condition condition, Label target) {
if (keyConstants[index] instanceof HotSpotMetaspaceConstant) {
HotSpotMetaspaceConstant constant = (HotSpotMetaspaceConstant) keyConstants[index];
CC conditionCode = constant.isCompressed() ? CC.Icc : CC.Xcc;
ConditionFlag conditionFlag = SPARCControlFlow.fromCondition(true, condition, false);
LabelHint hint = requestHint(masm, target);
// Load constant takes one instruction
int cbCondPosition = masm.position() + INSTRUCTION_SIZE;
boolean canUseShortBranch = masm.hasFeature(CPUFeature.CBCOND) && SPARCControlFlow.isShortBranch(masm, cbCondPosition, hint, target);
Register scratchRegister = asRegister(scratch);
final int byteCount = constant.isCompressed() ? 4 : 8;
loadFromConstantTable(crb, masm, byteCount, asRegister(constantTableBase), constant, scratchRegister, SPARCDelayedControlTransfer.DUMMY);
if (canUseShortBranch) {
CBCOND.emit(masm, conditionFlag, conditionCode == CC.Xcc, keyRegister, scratchRegister, target);
} else {
masm.cmp(keyRegister, scratchRegister);
BPCC.emit(masm, conditionCode, conditionFlag, ANNUL, PREDICT_TAKEN, target);
masm.nop(); // delay slot
}
} else {
super.conditionalJump(index, condition, target);
}
}
示例4: hasFeature
import jdk.vm.ci.sparc.SPARC.CPUFeature; //导入依赖的package包/类
public boolean hasFeature(CPUFeature feature) {
return ((SPARC) this.target.arch).features.contains(feature);
}
示例5: computeFeatures
import jdk.vm.ci.sparc.SPARC.CPUFeature; //导入依赖的package包/类
protected EnumSet<CPUFeature> computeFeatures(HotSpotVMConfig config) {
EnumSet<CPUFeature> features = EnumSet.noneOf(CPUFeature.class);
if ((config.vmVersionFeatures & config.sparcVis1Instructions) != 0) {
features.add(CPUFeature.VIS1);
}
if ((config.vmVersionFeatures & config.sparcVis2Instructions) != 0) {
features.add(CPUFeature.VIS2);
}
if ((config.vmVersionFeatures & config.sparcVis3Instructions) != 0) {
features.add(CPUFeature.VIS3);
}
if ((config.vmVersionFeatures & config.sparcCbcondInstructions) != 0) {
features.add(CPUFeature.CBCOND);
}
if ((config.vmVersionFeatures & config.sparcV8Instructions) != 0) {
features.add(CPUFeature.V8);
}
if ((config.vmVersionFeatures & config.sparcHardwareMul32) != 0) {
features.add(CPUFeature.HARDWARE_MUL32);
}
if ((config.vmVersionFeatures & config.sparcHardwareDiv32) != 0) {
features.add(CPUFeature.HARDWARE_DIV32);
}
if ((config.vmVersionFeatures & config.sparcHardwareFsmuld) != 0) {
features.add(CPUFeature.HARDWARE_FSMULD);
}
if ((config.vmVersionFeatures & config.sparcHardwarePopc) != 0) {
features.add(CPUFeature.HARDWARE_POPC);
}
if ((config.vmVersionFeatures & config.sparcV9Instructions) != 0) {
features.add(CPUFeature.V9);
}
if ((config.vmVersionFeatures & config.sparcSun4v) != 0) {
features.add(CPUFeature.SUN4V);
}
if ((config.vmVersionFeatures & config.sparcBlkInitInstructions) != 0) {
features.add(CPUFeature.BLK_INIT_INSTRUCTIONS);
}
if ((config.vmVersionFeatures & config.sparcFmafInstructions) != 0) {
features.add(CPUFeature.FMAF);
}
if ((config.vmVersionFeatures & config.sparcFmauInstructions) != 0) {
features.add(CPUFeature.FMAU);
}
if ((config.vmVersionFeatures & config.sparcSparc64Family) != 0) {
features.add(CPUFeature.SPARC64_FAMILY);
}
if ((config.vmVersionFeatures & config.sparcMFamily) != 0) {
features.add(CPUFeature.M_FAMILY);
}
if ((config.vmVersionFeatures & config.sparcTFamily) != 0) {
features.add(CPUFeature.T_FAMILY);
}
if ((config.vmVersionFeatures & config.sparcT1Model) != 0) {
features.add(CPUFeature.T1_MODEL);
}
if ((config.vmVersionFeatures & config.sparcSparc5Instructions) != 0) {
features.add(CPUFeature.SPARC5);
}
if ((config.vmVersionFeatures & config.sparcAesInstructions) != 0) {
features.add(CPUFeature.SPARC64_FAMILY);
}
if ((config.vmVersionFeatures & config.sparcSha1Instruction) != 0) {
features.add(CPUFeature.SHA1);
}
if ((config.vmVersionFeatures & config.sparcSha256Instruction) != 0) {
features.add(CPUFeature.SHA256);
}
if ((config.vmVersionFeatures & config.sparcSha512Instruction) != 0) {
features.add(CPUFeature.SHA512);
}
return features;
}