當前位置: 首頁>>代碼示例>>Java>>正文


Java HotSpotCallingConventionType類代碼示例

本文整理匯總了Java中jdk.vm.ci.hotspot.HotSpotCallingConventionType的典型用法代碼示例。如果您正苦於以下問題:Java HotSpotCallingConventionType類的具體用法?Java HotSpotCallingConventionType怎麽用?Java HotSpotCallingConventionType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


HotSpotCallingConventionType類屬於jdk.vm.ci.hotspot包,在下文中一共展示了HotSpotCallingConventionType類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getCallingConventionRegisters

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public RegisterArray getCallingConventionRegisters(Type type, JavaKind kind) {
    HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
    switch (kind) {
        case Boolean:
        case Byte:
        case Short:
        case Char:
        case Int:
        case Long:
        case Object:
            return hotspotType == HotSpotCallingConventionType.NativeCall ? nativeGeneralParameterRegisters : javaGeneralParameterRegisters;
        case Float:
        case Double:
            return simdParameterRegisters;
        default:
            throw JVMCIError.shouldNotReachHere();
    }
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:20,代碼來源:AArch64HotSpotRegisterConfig.java

示例2: getCallingConventionRegisters

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public RegisterArray getCallingConventionRegisters(Type type, JavaKind kind) {
    HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
    switch (kind) {
        case Boolean:
        case Byte:
        case Short:
        case Char:
        case Int:
        case Long:
        case Object:
            return hotspotType == HotSpotCallingConventionType.NativeCall ? nativeGeneralParameterRegisters : javaGeneralParameterRegisters;
        case Float:
        case Double:
            return hotspotType == HotSpotCallingConventionType.NativeCall ? nativeXMMParameterRegisters : javaXMMParameterRegisters;
        default:
            throw JVMCIError.shouldNotReachHere();
    }
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:20,代碼來源:AMD64HotSpotRegisterConfig.java

示例3: getCallingConventionRegisters

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public RegisterArray getCallingConventionRegisters(Type type, JavaKind kind) {
    HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
    switch (kind) {
        case Boolean:
        case Byte:
        case Short:
        case Char:
        case Int:
        case Long:
        case Object:
            return hotspotType == HotSpotCallingConventionType.JavaCallee ? cpuCalleeParameterRegisters : cpuCallerParameterRegisters;
        case Double:
        case Float:
            return fpuFloatJavaParameterRegisters;
        default:
            throw JVMCIError.shouldNotReachHere("Unknown JavaKind " + kind);
    }
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:20,代碼來源:SPARCHotSpotRegisterConfig.java

示例4: getReturnRegister

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
private static Register getReturnRegister(JavaKind kind, HotSpotCallingConventionType type) {
    switch (kind) {
        case Boolean:
        case Byte:
        case Char:
        case Short:
        case Int:
        case Long:
        case Object:
            return type == HotSpotCallingConventionType.JavaCallee ? i0 : o0;
        case Float:
            return f0;
        case Double:
            return d0;
        case Void:
        case Illegal:
            return null;
        default:
            throw new UnsupportedOperationException("no return register for type " + kind);
    }
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:22,代碼來源:SPARCHotSpotRegisterConfig.java

示例5: getCallingConventionRegisters

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public Register[] getCallingConventionRegisters(Type type, JavaKind kind) {
    HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
    switch (kind) {
        case Boolean:
        case Byte:
        case Short:
        case Char:
        case Int:
        case Long:
        case Object:
            return hotspotType == HotSpotCallingConventionType.NativeCall ? nativeGeneralParameterRegisters : javaGeneralParameterRegisters;
        case Float:
        case Double:
            return simdParameterRegisters;
        default:
            throw JVMCIError.shouldNotReachHere();
    }
}
 
開發者ID:campolake,項目名稱:openjdk9,代碼行數:20,代碼來源:AArch64HotSpotRegisterConfig.java

示例6: getCallingConventionRegisters

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public Register[] getCallingConventionRegisters(Type type, JavaKind kind) {
    HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
    switch (kind) {
        case Boolean:
        case Byte:
        case Short:
        case Char:
        case Int:
        case Long:
        case Object:
            return hotspotType == HotSpotCallingConventionType.NativeCall ? nativeGeneralParameterRegisters : javaGeneralParameterRegisters;
        case Float:
        case Double:
            return xmmParameterRegisters;
        default:
            throw JVMCIError.shouldNotReachHere();
    }
}
 
開發者ID:campolake,項目名稱:openjdk9,代碼行數:20,代碼來源:AMD64HotSpotRegisterConfig.java

示例7: getCallingConventionRegisters

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public Register[] getCallingConventionRegisters(Type type, JavaKind kind) {
    HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
    switch (kind) {
        case Boolean:
        case Byte:
        case Short:
        case Char:
        case Int:
        case Long:
        case Object:
            return hotspotType == HotSpotCallingConventionType.JavaCallee ? cpuCalleeParameterRegisters : cpuCallerParameterRegisters;
        case Double:
        case Float:
            return fpuFloatParameterRegisters;
        default:
            throw JVMCIError.shouldNotReachHere("Unknown JavaKind " + kind);
    }
}
 
開發者ID:campolake,項目名稱:openjdk9,代碼行數:20,代碼來源:SPARCHotSpotRegisterConfig.java

示例8: generate

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public void generate(NodeLIRBuilderTool generator) {
    AMD64NodeLIRBuilder gen = (AMD64NodeLIRBuilder) generator;
    Value[] parameter = new Value[args.count()];
    JavaType[] parameterTypes = new JavaType[args.count()];
    for (int i = 0; i < args.count(); i++) {
        parameter[i] = generator.operand(args.get(i));
        parameterTypes[i] = toJavaType(args.get(i).stamp(), gen.getLIRGeneratorTool().getMetaAccess());
    }
    JavaType returnType = toJavaType(stamp(), gen.getLIRGeneratorTool().getMetaAccess());
    CallingConvention cc = generator.getLIRGeneratorTool().getCodeCache().getRegisterConfig().getCallingConvention(HotSpotCallingConventionType.NativeCall, returnType, parameterTypes,
                    generator.getLIRGeneratorTool());
    gen.getLIRGeneratorTool().emitCCall(functionPointer.asLong(), cc, parameter, countFloatingTypeArguments(args));
    if (this.getStackKind() != JavaKind.Void) {
        generator.setResult(this, gen.getLIRGeneratorTool().emitMove(cc.getReturn()));
    }
}
 
開發者ID:graalvm,項目名稱:graal-core,代碼行數:18,代碼來源:AMD64RawNativeCallNode.java

示例9: generate

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public void generate(NodeLIRBuilderTool generator) {
    AArch64NodeLIRBuilder gen = (AArch64NodeLIRBuilder) generator;
    Value[] parameter = new Value[args.count()];
    JavaType[] parameterTypes = new JavaType[args.count()];
    for (int i = 0; i < args.count(); i++) {
        parameter[i] = generator.operand(args.get(i));
        parameterTypes[i] = toJavaType(args.get(i).stamp(), gen.getLIRGeneratorTool().getMetaAccess());
    }
    JavaType returnType = toJavaType(stamp(), gen.getLIRGeneratorTool().getMetaAccess());
    CallingConvention cc = generator.getLIRGeneratorTool().getCodeCache().getRegisterConfig().getCallingConvention(HotSpotCallingConventionType.NativeCall, returnType, parameterTypes,
                    generator.getLIRGeneratorTool());
    gen.getLIRGeneratorTool().emitCCall(functionPointer.asLong(), cc, parameter);
    if (this.getStackKind() != JavaKind.Void) {
        generator.setResult(this, gen.getLIRGeneratorTool().emitMove(cc.getReturn()));
    }
}
 
開發者ID:graalvm,項目名稱:graal-core,代碼行數:18,代碼來源:AArch64RawNativeCallNode.java

示例10: visitBreakpointNode

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public void visitBreakpointNode(BreakpointNode node) {
    JavaType[] sig = new JavaType[node.arguments().size()];
    for (int i = 0; i < sig.length; i++) {
        sig[i] = node.arguments().get(i).stamp().javaType(gen.getMetaAccess());
    }

    Value[] parameters = visitInvokeArguments(gen.getResult().getFrameMapBuilder().getRegisterConfig().getCallingConvention(HotSpotCallingConventionType.JavaCall, null, sig, gen),
                    node.arguments());
    append(new AMD64BreakpointOp(parameters));
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:12,代碼來源:AMD64HotSpotNodeLIRBuilder.java

示例11: visitBreakpointNode

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public void visitBreakpointNode(BreakpointNode node) {
    JavaType[] sig = new JavaType[node.arguments().size()];
    for (int i = 0; i < sig.length; i++) {
        sig[i] = node.arguments().get(i).stamp().javaType(gen.getMetaAccess());
    }

    Value[] parameters = visitInvokeArguments(gen.getResult().getFrameMapBuilder().getRegisterConfig().getCallingConvention(HotSpotCallingConventionType.JavaCall, null, sig, gen),
                    node.arguments());
    append(new SPARCBreakpointOp(parameters));
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:12,代碼來源:SPARCHotSpotNodeLIRBuilder.java

示例12: visitBreakpointNode

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public void visitBreakpointNode(BreakpointNode node) {
    JavaType[] sig = new JavaType[node.arguments().size()];
    for (int i = 0; i < sig.length; i++) {
        sig[i] = node.arguments().get(i).stamp().javaType(gen.getMetaAccess());
    }

    Value[] parameters = visitInvokeArguments(gen.getResult().getFrameMapBuilder().getRegisterConfig().getCallingConvention(HotSpotCallingConventionType.JavaCall, null, sig, gen),
                    node.arguments());
    append(new AArch64BreakpointOp(parameters));
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:12,代碼來源:AArch64HotSpotNodeLIRBuilder.java

示例13: emitCodePrefix

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
private void emitCodePrefix(CompilationResultBuilder crb, ResolvedJavaMethod installedCodeOwner, AArch64MacroAssembler masm, RegisterConfig regConfig, Label verifiedStub) {
    HotSpotProviders providers = getProviders();
    if (installedCodeOwner != null && !isStatic(installedCodeOwner.getModifiers())) {
        crb.recordMark(config.MARKID_UNVERIFIED_ENTRY);
        CallingConvention cc = regConfig.getCallingConvention(HotSpotCallingConventionType.JavaCallee, null, new JavaType[]{providers.getMetaAccess().lookupJavaType(Object.class)}, this);
        // See definition of IC_Klass in c1_LIRAssembler_aarch64.cpp
        // equal to scratch(1) careful!
        Register inlineCacheKlass = AArch64HotSpotRegisterConfig.inlineCacheRegister;
        Register receiver = asRegister(cc.getArgument(0));
        int transferSize = config.useCompressedClassPointers ? 4 : 8;
        AArch64Address klassAddress = masm.makeAddress(receiver, config.hubOffset, transferSize);

        // Are r10 and r11 available scratch registers here? One would hope so.
        Register klass = r10;
        if (config.useCompressedClassPointers) {
            masm.ldr(32, klass, klassAddress);
            AArch64HotSpotMove.decodeKlassPointer(masm, klass, klass, providers.getRegisters().getHeapBaseRegister(), config.getKlassEncoding());
        } else {
            masm.ldr(64, klass, klassAddress);
        }
        masm.cmp(64, inlineCacheKlass, klass);
        /*
         * Conditional jumps have a much lower range than unconditional ones, which can be a
         * problem because the miss handler could be out of range.
         */
        masm.branchConditionally(AArch64Assembler.ConditionFlag.EQ, verifiedStub);
        AArch64Call.directJmp(crb, masm, getForeignCalls().lookupForeignCall(IC_MISS_HANDLER));
    }
    masm.align(config.codeEntryAlignment);
    crb.recordMark(config.MARKID_OSR_ENTRY);
    masm.bind(verifiedStub);
    crb.recordMark(config.MARKID_VERIFIED_ENTRY);
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:34,代碼來源:AArch64HotSpotBackend.java

示例14: getCallingConvention

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public CallingConvention getCallingConvention(Type type, JavaType returnType, JavaType[] parameterTypes, ValueKindFactory<?> valueKindFactory) {
    HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
    if (type == HotSpotCallingConventionType.NativeCall) {
        return callingConvention(nativeGeneralParameterRegisters, returnType, parameterTypes, hotspotType, valueKindFactory);
    }
    // On x64, parameter locations are the same whether viewed
    // from the caller or callee perspective
    return callingConvention(javaGeneralParameterRegisters, returnType, parameterTypes, hotspotType, valueKindFactory);
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:11,代碼來源:AArch64HotSpotRegisterConfig.java

示例15: getCallingConvention

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入依賴的package包/類
@Override
public CallingConvention getCallingConvention(Type type, JavaType returnType, JavaType[] parameterTypes, ValueKindFactory<?> valueKindFactory) {
    HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
    if (type == HotSpotCallingConventionType.NativeCall) {
        return callingConvention(nativeGeneralParameterRegisters, nativeXMMParameterRegisters, windowsOS, returnType, parameterTypes, hotspotType, valueKindFactory);
    }
    // On x64, parameter locations are the same whether viewed
    // from the caller or callee perspective
    return callingConvention(javaGeneralParameterRegisters, javaXMMParameterRegisters, false, returnType, parameterTypes, hotspotType, valueKindFactory);
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:11,代碼來源:AMD64HotSpotRegisterConfig.java


注:本文中的jdk.vm.ci.hotspot.HotSpotCallingConventionType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。