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


Java HotSpotCallingConventionType.NativeCall方法代碼示例

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


在下文中一共展示了HotSpotCallingConventionType.NativeCall方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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.JavaCall || type == HotSpotCallingConventionType.NativeCall) {
        return callingConvention(cpuCallerParameterRegisters, returnType, parameterTypes, hotspotType, valueKindFactory);
    }
    if (type == HotSpotCallingConventionType.JavaCallee) {
        return callingConvention(cpuCalleeParameterRegisters, returnType, parameterTypes, hotspotType, valueKindFactory);
    }
    throw JVMCIError.shouldNotReachHere();
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:12,代碼來源:SPARCHotSpotRegisterConfig.java

示例8: getCallingConvention

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

示例9: getCallingConvention

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入方法依賴的package包/類
@Override
public CallingConvention getCallingConvention(Type type, JavaType returnType, JavaType[] parameterTypes, TargetDescription target) {
    HotSpotCallingConventionType hotspotType = (HotSpotCallingConventionType) type;
    if (type == HotSpotCallingConventionType.JavaCall || type == HotSpotCallingConventionType.NativeCall) {
        return callingConvention(cpuCallerParameterRegisters, returnType, parameterTypes, hotspotType, target);
    }
    if (type == HotSpotCallingConventionType.JavaCallee) {
        return callingConvention(cpuCalleeParameterRegisters, returnType, parameterTypes, hotspotType, target);
    }
    throw JVMCIError.shouldNotReachHere();
}
 
開發者ID:campolake,項目名稱:openjdk9,代碼行數:12,代碼來源:SPARCHotSpotRegisterConfig.java

示例10: create

import jdk.vm.ci.hotspot.HotSpotCallingConventionType; //導入方法依賴的package包/類
/**
 * Creates a {@link HotSpotForeignCallLinkage}.
 *
 * @param descriptor the descriptor of the call
 * @param address the address of the code to call
 * @param effect specifies if the call destroys or preserves all registers (apart from
 *            temporaries which are always destroyed)
 * @param outgoingCcType outgoing (caller) calling convention type
 * @param incomingCcType incoming (callee) calling convention type (can be null)
 * @param transition specifies if this is a {@linkplain #needsDebugInfo() leaf} call
 * @param reexecutable specifies if the call can be re-executed without (meaningful) side
 *            effects. Deoptimization will not return to a point before a call that cannot be
 *            re-executed.
 * @param killedLocations the memory locations killed by the call
 */
public static HotSpotForeignCallLinkage create(MetaAccessProvider metaAccess, CodeCacheProvider codeCache, WordTypes wordTypes, HotSpotForeignCallsProvider foreignCalls,
                ForeignCallDescriptor descriptor, long address, RegisterEffect effect, Type outgoingCcType, Type incomingCcType, Transition transition, boolean reexecutable,
                LocationIdentity... killedLocations) {
    CallingConvention outgoingCc = createCallingConvention(metaAccess, codeCache, wordTypes, foreignCalls, descriptor, outgoingCcType);
    CallingConvention incomingCc = incomingCcType == null ? null : createCallingConvention(metaAccess, codeCache, wordTypes, foreignCalls, descriptor, incomingCcType);
    HotSpotForeignCallLinkageImpl linkage = new HotSpotForeignCallLinkageImpl(descriptor, address, effect, transition, outgoingCc, incomingCc, reexecutable, killedLocations);
    if (outgoingCcType == HotSpotCallingConventionType.NativeCall) {
        linkage.temporaries = foreignCalls.getNativeABICallerSaveRegisters();
    }
    return linkage;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:27,代碼來源:HotSpotForeignCallLinkageImpl.java


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