src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkage.java
changeset 58299 6df94ce3ab2f
parent 58040 d99af76d7689
child 58679 9c3209ff7550
equal deleted inserted replaced
58298:0152ad7b38b8 58299:6df94ce3ab2f
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    22  */
    22  */
    23 
    23 
    24 
    24 
    25 package org.graalvm.compiler.hotspot;
    25 package org.graalvm.compiler.hotspot;
    26 
    26 
    27 import jdk.vm.ci.meta.InvokeTarget;
       
    28 
       
    29 import org.graalvm.compiler.core.common.spi.ForeignCallLinkage;
    27 import org.graalvm.compiler.core.common.spi.ForeignCallLinkage;
    30 import org.graalvm.compiler.core.target.Backend;
    28 import org.graalvm.compiler.core.target.Backend;
    31 import org.graalvm.compiler.hotspot.stubs.Stub;
    29 import org.graalvm.compiler.hotspot.stubs.Stub;
    32 import jdk.internal.vm.compiler.word.LocationIdentity;
    30 import jdk.internal.vm.compiler.word.LocationIdentity;
       
    31 
       
    32 import jdk.vm.ci.meta.InvokeTarget;
    33 
    33 
    34 /**
    34 /**
    35  * The details required to link a HotSpot runtime or stub call.
    35  * The details required to link a HotSpot runtime or stub call.
    36  */
    36  */
    37 public interface HotSpotForeignCallLinkage extends ForeignCallLinkage, InvokeTarget {
    37 public interface HotSpotForeignCallLinkage extends ForeignCallLinkage, InvokeTarget {
    40      * Constants for specifying whether a foreign call destroys or preserves registers. A foreign
    40      * Constants for specifying whether a foreign call destroys or preserves registers. A foreign
    41      * call will always destroy {@link HotSpotForeignCallLinkage#getOutgoingCallingConvention() its}
    41      * call will always destroy {@link HotSpotForeignCallLinkage#getOutgoingCallingConvention() its}
    42      * {@linkplain ForeignCallLinkage#getTemporaries() temporary} registers.
    42      * {@linkplain ForeignCallLinkage#getTemporaries() temporary} registers.
    43      */
    43      */
    44     enum RegisterEffect {
    44     enum RegisterEffect {
    45         DESTROYS_REGISTERS,
    45         DESTROYS_ALL_CALLER_SAVE_REGISTERS,
    46         PRESERVES_REGISTERS
    46         COMPUTES_REGISTERS_KILLED
    47     }
    47     }
    48 
    48 
    49     /**
    49     /**
    50      * Constants for specifying whether a call is a leaf or not and whether a
    50      * Constants for specifying whether a call is a leaf or not and whether a
    51      * {@code JavaFrameAnchor} prologue and epilogue is required around the call. A leaf function
    51      * {@code JavaFrameAnchor} prologue and epilogue is required around the call. A leaf function
   116 
   116 
   117     LocationIdentity[] getKilledLocations();
   117     LocationIdentity[] getKilledLocations();
   118 
   118 
   119     void setCompiledStub(Stub stub);
   119     void setCompiledStub(Stub stub);
   120 
   120 
       
   121     RegisterEffect getEffect();
       
   122 
   121     /**
   123     /**
   122      * Determines if this is a call to a compiled {@linkplain Stub stub}.
   124      * Determines if this is a call to a compiled {@linkplain Stub stub}.
   123      */
   125      */
   124     boolean isCompiledStub();
   126     boolean isCompiledStub();
   125 
   127