Class CallingConventionBuilder
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.type.CallingConventionBuilder
Builder of
CallingConvention objects.-
Constructor Summary
ConstructorsConstructorDescriptionCallingConventionBuilder(CallingConventionName name, ProcessorType proctype) Create a builder.Create a builder.CallingConventionBuilder(String name, ProcessorType proctype) Create a builder. -
Method Summary
Modifier and TypeMethodDescriptionaddAlignementRequirement(int reqSlotcount, int wantedSlotcountAlignment) Add a slot-count alignment requirement.addAlternateName(String name) Add an alternate name.addAlternateNames(Collection<String> names) Add alternate names.addCompilerType(CompilerType comptype) Add a compiler type.addFlags(int additionalFlags) Add convention flags.addInputFpSlot(StorageEntry entry) Add an input floating-point slot.addInputFpSlots(Collection<StorageEntry> entries) Add input floating-point slots.addInputRegisterPair(StorageEntry registerPair) Add an input register pair.addInputRegisterPairs(Collection<StorageEntry> registerPairs) Add input register pairs.addInputSlot(StorageEntry entry) Add an input slot.addInputSlots(Collection<StorageEntry> entries) Add input slots.addOutputRegisterPair(StorageEntry registerPair) Add an output register pair.addOutputRegisterPairs(Collection<StorageEntry> registerPairs) Add output register pairs.addOutputSlot(StorageEntry entry) Add an output slot.addOutputSlots(Collection<StorageEntry> entries) Add output slots.addProcessorType(ProcessorType proctype) Add a processor type.addSpoiledRegister(long reg) Add a spoiled register.addSpoiledRegisters(long... regs) Add spoiled registers.addSpoiledRegisters(Collection<StorageEntry> entries) Add spoiled registers from storage entries.addSubsystemType(SubsystemType sstype) Add a subsystem type.build()Build the calling convention.Duplicate this builder.setAlternateNames(Collection<String> names) Set alternate names.setFlags(int flags) Set convention flags.setIPRD(int slotcnt, StorageEntry inputPtrEntry, StorageEntry outputPtrEntry) Set information for Implicit Pointer to Return Data special conventions.Set the principal name.Set the principal name.voidSet implementation notes.setOutputFpSlot(StorageEntry outFpSlot) Set the output floating-point slot.setProcessorTypes(Collection<ProcessorType> processorTypes) Set processor types.setReturnAddressSlot(StorageEntry entry) Set the return-address slot.
-
Constructor Details
-
CallingConventionBuilder
Create a builder.- Parameters:
name- calling convention name
-
CallingConventionBuilder
Create a builder.- Parameters:
name- calling convention nameproctype- processor type
-
CallingConventionBuilder
Create a builder.- Parameters:
name- calling convention nameproctype- processor type
-
-
Method Details
-
duplicate
Duplicate this builder.- Returns:
- duplicated builder
-
setNotes
Set implementation notes.- Parameters:
notes- notes
-
setFlags
Set convention flags.- Parameters:
flags- flags- Returns:
- this builder
-
addFlags
Add convention flags.- Parameters:
additionalFlags- flags to add- Returns:
- this builder
-
setName
Set the principal name.- Parameters:
name- calling convention name- Returns:
- this builder
-
setName
Set the principal name.- Parameters:
name- calling convention nameclearAlternateNames- if true, clear alternate names- Returns:
- this builder
-
setAlternateNames
Set alternate names.- Parameters:
names- alternate names- Returns:
- this builder
-
addAlternateName
Add an alternate name.- Parameters:
name- alternate name- Returns:
- this builder
-
addAlternateNames
Add alternate names.- Parameters:
names- alternate names- Returns:
- this builder
-
setProcessorTypes
Set processor types.- Parameters:
processorTypes- processor types- Returns:
- this builder
-
addProcessorType
Add a processor type.- Parameters:
proctype- processor type- Returns:
- this builder
-
addSubsystemType
Add a subsystem type.- Parameters:
sstype- subsystem type- Returns:
- this builder
-
addCompilerType
Add a compiler type.- Parameters:
comptype- compiler type- Returns:
- this builder
-
addSpoiledRegister
Add a spoiled register.- Parameters:
reg- register id- Returns:
- this builder
-
addSpoiledRegisters
Add spoiled registers.- Parameters:
regs- register ids- Returns:
- this builder
-
addSpoiledRegisters
Add spoiled registers from storage entries.- Parameters:
entries- storage entries- Returns:
- this builder
-
setReturnAddressSlot
Set the return-address slot.- Parameters:
entry- storage entry- Returns:
- this builder
-
addOutputSlot
Add an output slot.- Parameters:
entry- storage entry- Returns:
- this builder
-
addOutputSlots
Add output slots.- Parameters:
entries- storage entries- Returns:
- this builder
-
addInputSlot
Add an input slot.- Parameters:
entry- storage entry- Returns:
- this builder
-
addInputSlots
Add input slots.- Parameters:
entries- storage entries- Returns:
- this builder
-
addInputFpSlot
Add an input floating-point slot.- Parameters:
entry- storage entry- Returns:
- this builder
-
addInputFpSlots
Add input floating-point slots.- Parameters:
entries- storage entries- Returns:
- this builder
-
addOutputRegisterPair
Add an output register pair.- Parameters:
registerPair- must be of REGISTER_PAIR type- Returns:
- this builder
-
addOutputRegisterPairs
Add output register pairs.- Parameters:
registerPairs- register-pair entries- Returns:
- this builder
-
addInputRegisterPair
Add an input register pair.- Parameters:
registerPair- must be of REGISTER_PAIR type- Returns:
- this builder
-
addInputRegisterPairs
Add input register pairs.- Parameters:
registerPairs- register-pair entries- Returns:
- this builder
-
setOutputFpSlot
Set the output floating-point slot.- Parameters:
outFpSlot- output floating-point slot- Returns:
- this builder
-
setIPRD
public CallingConventionBuilder setIPRD(int slotcnt, StorageEntry inputPtrEntry, StorageEntry outputPtrEntry) Set information for Implicit Pointer to Return Data special conventions.- Parameters:
slotcnt- minimum slot count for which a composite return type must be treated via an IPRDinputPtrEntry- null if the implicit input entry can be discovered as a normal input entryoutputPtrEntry- null if the output entry can be discovered as a normal output entry- Returns:
- this builder
-
addAlignementRequirement
public CallingConventionBuilder addAlignementRequirement(int reqSlotcount, int wantedSlotcountAlignment) Add a slot-count alignment requirement.- Parameters:
reqSlotcount- required slot countwantedSlotcountAlignment- wanted slot-count alignment- Returns:
- this builder
-
build
Build the calling convention.- Returns:
- calling convention
-