APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.internal.foreign.abi.ppc64

public abstract Class CallArranger

extends Object
Class Inheritance
Known Direct Subclasses
jdk.internal.foreign.abi.ppc64.aix.AixCallArranger, jdk.internal.foreign.abi.ppc64.linux.ABIv1CallArranger, jdk.internal.foreign.abi.ppc64.linux.ABIv2CallArranger
Imports
jdk.internal.foreign.Utils, jdk.internal.foreign.abi.ABIDescriptor, .AbstractLinker.UpcallStubFactory, .Binding, .CallingSequence, .CallingSequenceBuilder, .DowncallLinker, .LinkerOptions, .SharedUtils, .VMStorage, jdk.internal.foreign.abi.ppc64.aix.AixCallArranger, jdk.internal.foreign.abi.ppc64.linux.ABIv1CallArranger, .ABIv2CallArranger, java.lang.foreign.AddressLayout, .FunctionDescriptor, .GroupLayout, .MemoryLayout, .MemorySegment, .ValueLayout, java.lang.invoke.MethodHandle, .MethodType, java.util.List, .Optional

For the PPC64 C ABI specifically, this class uses CallingSequenceBuilder to translate a C FunctionDescriptor into a CallingSequence, which can then be turned into a MethodHandle. This includes taking care of synthetic arguments like pointers to return buffers for 'in-memory' returns. There are minor differences between the ABIs implemented on Linux and AIX which are handled in sub-classes. Clients should access these through the provided public constants CallArranger.ABIv1/2.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract class
public static record
pack-priv class
private static record
pack-priv class
pack-priv class

Field Summary

Modifier and TypeField and Description
public static final CallArranger
public static final CallArranger
public static final CallArranger
private final ABIDescriptor
C

pack-priv final boolean
private static final int
public static final int
public static final int
private static final int
pack-priv final boolean

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public MethodHandle
public AbstractLinker.UpcallStubFactory
public CallArranger.Bindings
getBindings(MethodType mt, FunctionDescriptor cDesc, boolean forUpcall)

public CallArranger.Bindings
getBindings(MethodType mt, FunctionDescriptor cDesc, boolean forUpcall, LinkerOptions options)

protected abstract boolean
private boolean
protected abstract boolean
useABIv2()

Select ABI version

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ABIv1back to summary
public static final CallArranger ABIv1
ABIv2back to summary
public static final CallArranger ABIv2
AIXback to summary
public static final CallArranger AIX
Cback to summary
private final ABIDescriptor C
isAIXback to summary
pack-priv final boolean isAIX
MAX_COPY_SIZEback to summary
private static final int MAX_COPY_SIZE
MAX_FLOAT_REGISTER_ARGUMENTSback to summary
public static final int MAX_FLOAT_REGISTER_ARGUMENTS
MAX_REGISTER_ARGUMENTSback to summary
public static final int MAX_REGISTER_ARGUMENTS
STACK_SLOT_SIZEback to summary
private static final int STACK_SLOT_SIZE
useABIv2back to summary
pack-priv final boolean useABIv2

Constructor Detail

CallArrangerback to summary
protected CallArranger()

Method Detail

arrangeDowncallback to summary
public MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDesc, LinkerOptions options)
arrangeUpcallback to summary
public AbstractLinker.UpcallStubFactory arrangeUpcall(MethodType mt, FunctionDescriptor cDesc, LinkerOptions options)
getBindingsback to summary
public CallArranger.Bindings getBindings(MethodType mt, FunctionDescriptor cDesc, boolean forUpcall)
getBindingsback to summary
public CallArranger.Bindings getBindings(MethodType mt, FunctionDescriptor cDesc, boolean forUpcall, LinkerOptions options)
isAIXback to summary
protected abstract boolean isAIX()
isInMemoryReturnback to summary
private boolean isInMemoryReturn(Optional<MemoryLayout> returnLayout)
useABIv2back to summary
protected abstract boolean useABIv2()

Select ABI version

jdk.internal.foreign.abi.ppc64 back to summary

pack-priv abstract Class CallArranger.BindingCalculator

extends Object
Class Inheritance
  • java.lang.Object
  • jdk.internal.foreign.abi.ppc64.CallArranger.BindingCalculator
Known Direct Subclasses
jdk.internal.foreign.abi.ppc64.CallArranger.UnboxBindingCalculator, jdk.internal.foreign.abi.ppc64.CallArranger.BoxBindingCalculator

Field Summary

Modifier and TypeField and Description
protected final CallArranger.StorageCalculator

Constructor Summary

AccessConstructor and Description
protected
BindingCalculator(boolean forArguments)

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract List<Binding>
getBindings(Class<?> carrier, MemoryLayout layout)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

storageCalculatorback to summary
protected final CallArranger.StorageCalculator storageCalculator

Constructor Detail

BindingCalculatorback to summary
protected BindingCalculator(boolean forArguments)

Method Detail

getBindingsback to summary
pack-priv abstract List<Binding> getBindings(Class<?> carrier, MemoryLayout layout)
jdk.internal.foreign.abi.ppc64 back to summary

public final Record CallArranger.Bindings

extends Record
Class Inheritance
Record Components
callingSequence:CallingSequence 
isInMemoryReturn:boolean 

Field Summary

Modifier and TypeField and Description
private final CallingSequence
callingSequence

Record Component accessed by callingSequence().

private final boolean
isInMemoryReturn

Record Component accessed by isInMemoryReturn().

Constructor Summary

AccessConstructor and Description
public
Bindings(CallingSequence callingSequence, boolean isInMemoryReturn)

Method Summary

Modifier and TypeMethod and Description
public CallingSequence
callingSequence()

Record Component getter of callingSequence.

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public boolean
isInMemoryReturn()

Record Component getter of isInMemoryReturn.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

callingSequenceback to summary
private final CallingSequence callingSequence

Record Component accessed by callingSequence().

isInMemoryReturnback to summary
private final boolean isInMemoryReturn

Record Component accessed by isInMemoryReturn().

Constructor Detail

Bindingsback to summary
public Bindings(CallingSequence callingSequence, boolean isInMemoryReturn)

Method Detail

callingSequenceback to summary
public CallingSequence callingSequence()

Record Component getter of callingSequence.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

isInMemoryReturnback to summary
public boolean isInMemoryReturn()

Record Component getter of isInMemoryReturn.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

jdk.internal.foreign.abi.ppc64 back to summary

pack-priv Class CallArranger.BoxBindingCalculator

extends BindingCalculator
Class Inheritance

Field Summary

Inherited from jdk.internal.foreign.abi.ppc64.CallArranger.BindingCalculator:
storageCalculator

Constructor Summary

AccessConstructor and Description
pack-priv
BoxBindingCalculator(boolean forArguments)

Method Summary

Modifier and TypeMethod and Description
pack-priv List<Binding>

Constructor Detail

BoxBindingCalculatorback to summary
pack-priv BoxBindingCalculator(boolean forArguments)

Method Detail

getBindingsback to summary
pack-priv List<Binding> getBindings(Class<?> carrier, MemoryLayout layout)

Implements abstract jdk.internal.foreign.abi.ppc64.CallArranger.BindingCalculator.getBindings.

Annotations
@Override
jdk.internal.foreign.abi.ppc64 back to summary

private final Record CallArranger.HfaRegs

extends Record
Class Inheritance
Record Components
first:VMStorage[] 
second:VMStorage[] 

Field Summary

Modifier and TypeField and Description
private final VMStorage[]
first

Record Component accessed by first().

private final VMStorage[]
second

Record Component accessed by second().

Constructor Summary

AccessConstructor and Description
private
HfaRegs(VMStorage[] first, VMStorage[] second)

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public VMStorage[]
first()

Record Component getter of first.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public VMStorage[]
second()

Record Component getter of second.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

firstback to summary
private final VMStorage[] first

Record Component accessed by first().

secondback to summary
private final VMStorage[] second

Record Component accessed by second().

Constructor Detail

HfaRegsback to summary
private HfaRegs(VMStorage[] first, VMStorage[] second)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
firstback to summary
public VMStorage[] first()

Record Component getter of first.

hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

secondback to summary
public VMStorage[] second()

Record Component getter of second.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

jdk.internal.foreign.abi.ppc64 back to summary

pack-priv Class CallArranger.StorageCalculator

extends Object
Class Inheritance
  • java.lang.Object
  • jdk.internal.foreign.abi.ppc64.CallArranger.StorageCalculator

Field Summary

Modifier and TypeField and Description
private final boolean
private final int[]
private long

Constructor Summary

AccessConstructor and Description
public
StorageCalculator(boolean forArguments)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv CallArranger.HfaRegs
hfaAlloc(List<MemoryLayout> scalarLayouts)

pack-priv VMStorage
nextStorage(int type, boolean is32Bit)

pack-priv VMStorage
regAlloc(int type)

pack-priv VMStorage
stackAlloc(long size, long alignment)

pack-priv VMStorage[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

forArgumentsback to summary
private final boolean forArguments
nRegsback to summary
private final int[] nRegs
stackOffsetback to summary
private long stackOffset

Constructor Detail

StorageCalculatorback to summary
public StorageCalculator(boolean forArguments)

Method Detail

adjustForVarArgsback to summary
pack-priv void adjustForVarArgs()
hfaAllocback to summary
pack-priv CallArranger.HfaRegs hfaAlloc(List<MemoryLayout> scalarLayouts)
nextStorageback to summary
pack-priv VMStorage nextStorage(int type, boolean is32Bit)
regAllocback to summary
pack-priv VMStorage regAlloc(int type)
stackAllocback to summary
pack-priv VMStorage stackAlloc(long size, long alignment)
structAllocback to summary
pack-priv VMStorage[] structAlloc(MemoryLayout layout)
jdk.internal.foreign.abi.ppc64 back to summary

pack-priv Class CallArranger.UnboxBindingCalculator

extends BindingCalculator
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final boolean
Inherited from jdk.internal.foreign.abi.ppc64.CallArranger.BindingCalculator:
storageCalculator

Constructor Summary

AccessConstructor and Description
pack-priv
UnboxBindingCalculator(boolean forArguments, boolean useAddressPairs)

Method Summary

Modifier and TypeMethod and Description
pack-priv List<Binding>

Field Detail

useAddressPairsback to summary
private final boolean useAddressPairs

Constructor Detail

UnboxBindingCalculatorback to summary
pack-priv UnboxBindingCalculator(boolean forArguments, boolean useAddressPairs)

Method Detail

getBindingsback to summary
pack-priv List<Binding> getBindings(Class<?> carrier, MemoryLayout layout)

Implements abstract jdk.internal.foreign.abi.ppc64.CallArranger.BindingCalculator.getBindings.

Annotations
@Override