java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.units.code.asm.type.CallingConvention |
Standard implementation of a calling convention object. It can be sub-classed to generate custom input/output layout.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | CallingConvention.ArgLocationGenerator | Storage-location generator for routine arguments (inputs). | |||||||||
class | CallingConvention.RetLocationGenerator | Storage-location generator for routine return values (outputs). |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CallingConvention()
Reserved.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CallingConvention | clone() | ||||||||||
int |
determineSlotcountAlignment(int requestedSlotcount)
Determine the slotcount alignment requirement of a non-
composite type. | ||||||||||
String | format(int type) | ||||||||||
String | formatParseable() | ||||||||||
String | formatUser() | ||||||||||
List<String> |
getAlternateNames()
Get a list of alternate names for this calling convention.
| ||||||||||
List<CompilerType> |
getCompilerTypes()
Get the list of compiler types this calling convention may work with.
| ||||||||||
int | getFlags() | ||||||||||
ICallingConvention |
getIPRDConvention()
Retrieve the optional calling convention, derived from this convention, used to return large
composite prototypes.
| ||||||||||
StorageEntry | getIPRDInputPtrEntry() | ||||||||||
int | getIPRDMinimumSlotCount() | ||||||||||
StorageEntry | getIPRDOutputPtrEntry() | ||||||||||
long |
getIdentifierKey()
Get an internally-generated identifier for this calling convention object.
| ||||||||||
int |
getInputSlotCountHint()
Return the number of slots that are reserved for parameters.
| ||||||||||
CallingConvention.ArgLocationGenerator |
getInputsGenerator()
Create a storage-location generator for the inputs provided to a routine using this calling
convention.
| ||||||||||
String |
getName()
Get the common name of this calling convention.
| ||||||||||
List<String> |
getNames()
Retrieve all names for this calling convention (principal and alternates).
| ||||||||||
String | getNotes() | ||||||||||
StorageEntry |
getOutput(TypeLayoutInfo ti, int inputStackSlotCount)
Convenience method to retrieve the storage location of the single return value for this
calling convention.
| ||||||||||
int |
getOutputSlotCountHint()
Return the number of slots that are reserved for return values.
| ||||||||||
CallingConvention.RetLocationGenerator |
getOutputsGenerator(int inputStackSlotCount)
Create a storage-location generator for the outputs provided to a routine using this calling
convention.
| ||||||||||
ProcessorType | getPrimaryProcessorType() | ||||||||||
List<ProcessorType> |
getProcessorTypes()
Get the list of processor types this calling convention may work with.
| ||||||||||
Collection<Long> |
getPureSpoiledRegisters()
Get the list of registers that are spoiled by a callee, in the strictest sense, i.e.
| ||||||||||
StorageEntry | getReturnAddressSlot(Integer inputStackSlotCount) | ||||||||||
StorageEntry | getReturnAddressSlot() | ||||||||||
Map<Integer, Integer> |
getSlotcountAlignmentMap()
Alignment specifications for non-
composite types. | ||||||||||
Collection<Long> |
getSpoiledRegisters()
Get the list of all registers that may be modified and/or spoiled by a callee, in the most
general sense.
| ||||||||||
List<SubsystemType> |
getSubsystemTypes()
Get the list of subsystem types this calling convention may work with.
| ||||||||||
boolean | hasFlag(int f) | ||||||||||
boolean |
isCompatibleWith(ProcessorType wantedProcessor, SubsystemType wantedSubsystem, CompilerType wantedCompiler)
Determine whether this calling convention is compatible with the provided triple (processor, subsystem, compiler).
| ||||||||||
boolean | isUnknown() | ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention
|
Reserved.
Determine the slotcount alignment requirement of a non-composite
type.
Get a list of alternate names for this calling convention.
Get the list of compiler types this calling convention may work with.
Retrieve the optional calling convention, derived from this convention, used to return large
composite prototypes. This only applies if the flag FLAG_IPRD
was set.
Get an internally-generated identifier for this calling convention object. The id is generated using:
Return the number of slots that are reserved for parameters. Note that this is just a hint on how many parameters are used.
Create a storage-location generator for the inputs provided to a routine using this calling convention. convention.
Get the common name of this calling convention.
Retrieve all names for this calling convention (principal and alternates).
Convenience method to retrieve the storage location of the single return value for this calling convention. Most calling conventions allow the return of a single value.
ti | storage type |
---|---|
inputStackSlotCount | the number of stack slots used to provide input parameters (some calling conventions require that to calculate proper positioning for output values) |
Return the number of slots that are reserved for return values. Note that this is just a hint on how many return values are defined.
Create a storage-location generator for the outputs provided to a routine using this calling convention.
inputStackSlotCount | optional value indicating how many stack slots were used to
provide parameters (this value is the calling convention has the flags
FLAG_OUTPUT_AFTER_INPUT or FLAG_OUTPUT_PUSHED ) |
---|
Get the list of processor types this calling convention may work with.
Get the list of registers that are spoiled by a callee, in the strictest sense, i.e. their value may or may not be modified, but it is meaningless and should not be interpreted by the caller upon return. That set would NOT include return registers.
Alignment specifications for non-composite
types.
Get the list of all registers that may be modified and/or spoiled by a callee, in the most general sense. That set would include any type of return registers.
Get the list of subsystem types this calling convention may work with.
Determine whether this calling convention is compatible with the provided triple (processor, subsystem, compiler).
wantedProcessor | mandatory (pass UNKNOWN if not known) |
---|---|
wantedSubsystem | mandatory (pass UNKNOWN if not known) |
wantedCompiler | mandatory (pass UNKNOWN if not known) |