public class

CallingConvention

extends Object
implements ICallingConvention
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.asm.type.CallingConvention

Class Overview

Standard implementation. Can be sub-classed to generate custom input/output layout.

Summary

Nested Classes
class CallingConvention.ArgLocationGenerator Storage-location generator for routine arguments (inputs). 
[Expand]
Inherited Constants
From interface com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention
Public Constructors
CallingConvention()
Reserved.
Public Methods
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.
CallingConvention.ArgLocationGenerator getArgLocationGenerator()
Create a storage-location generator for the inputs provided to a routine using this calling convention.
List<CompilerType> getCompilerTypes()
Get the list of compiler types this calling convention may work with.
int getFlags()
long getIdentifierKey()
Get an internally-generated identifier for this calling convention object.
RoutineIOSlot getInput(RoutineIOSlot previousStorageEntry, TypeLayoutInfo ti)
Determine the storage item assigned to a method invocation parameter.
int getInputSlotCountHint()
Return the number of slots that are reserved for parameters.
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()
RoutineIOSlot getOutput(int index, int requestedSlotCount, boolean isFloat, Integer inputStackSlotCount)
Determine the storage item assigned to a method return value.
RoutineIOSlot getOutputDualSlot()
RoutineIOSlot getOutputFpSlot(int fpBitsize)
RoutineIOSlot getOutputSlot()
RoutineIOSlot getOutputSlotByIndex(int index)
int getOutputSlotCountHint()
Return the number of slots that are reserved for return values.
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.
RoutineIOSlot getReturnAddressSlot(Integer inputStackSlotCount)
RoutineIOSlot 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 isUnknown()
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.units.code.asm.type.ICallingConvention

Public Constructors

public CallingConvention ()

Reserved.

Public Methods

public int determineSlotcountAlignment (int requestedSlotcount)

Determine the slotcount alignment requirement of a non-composite type.

public String format (int type)

public String formatParseable ()

public String formatUser ()

public List<String> getAlternateNames ()

Get a list of alternate names for this calling convention.

public CallingConvention.ArgLocationGenerator getArgLocationGenerator ()

Create a storage-location generator for the inputs provided to a routine using this calling convention.

Returns
  • a generator

public List<CompilerType> getCompilerTypes ()

Get the list of compiler types this calling convention may work with.

public int getFlags ()

public long getIdentifierKey ()

Get an internally-generated identifier for this calling convention object. Two calling conventions using:
- the same names
- same flags
- same processor targets
- same subsystem targets
- same compiler targets
will have the same UUID.

public RoutineIOSlot getInput (RoutineIOSlot previousStorageEntry, TypeLayoutInfo ti)

Determine the storage item assigned to a method invocation parameter.

Parameters
previousStorageEntry the previous entry, null if this input entry is the first one
ti type information of the input parameter
Returns
  • the input entry

public int getInputSlotCountHint ()

Return the number of slots that are reserved for parameters. Note that this is just a hint on how many parameters are used.

public String getName ()

Get the common name of this calling convention.

public List<String> getNames ()

Retrieve all names for this calling convention (principal and alternates).

public String getNotes ()

public RoutineIOSlot getOutput (int index, int requestedSlotCount, boolean isFloat, Integer inputStackSlotCount)

Determine the storage item assigned to a method return value.

Parameters
index first slot index (not an output value index) for the output value
requestedSlotCount number of slots required to accommodate the output value
isFloat the output value is an ieee754 float
inputStackSlotCount for calling conventions marked isOutputAfterInput(), this value is mandatory in order to calculate an accurate output slot
Returns
  • the output entry

public RoutineIOSlot getOutputDualSlot ()

public RoutineIOSlot getOutputFpSlot (int fpBitsize)

public RoutineIOSlot getOutputSlot ()

public RoutineIOSlot getOutputSlotByIndex (int index)

public int getOutputSlotCountHint ()

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.

public ProcessorType getPrimaryProcessorType ()

public List<ProcessorType> getProcessorTypes ()

Get the list of processor types this calling convention may work with.

public Collection<Long> getPureSpoiledRegisters ()

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.

public RoutineIOSlot getReturnAddressSlot (Integer inputStackSlotCount)

public RoutineIOSlot getReturnAddressSlot ()

public Map<Integer, Integer> getSlotcountAlignmentMap ()

Alignment specifications for non-composite types.

public Collection<Long> getSpoiledRegisters ()

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.

public List<SubsystemType> getSubsystemTypes ()

Get the list of subsystem types this calling convention may work with.

public boolean isUnknown ()

public String toString ()