当前位置: 首页>>代码示例>>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;未经允许,请勿转载。