Class RegisterBankService
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterBankService
The register bank service is a global registry maintaining processors' register banks, used by
native code objects.
Typically, register banks are added to this service in a code plugin
static initializer block.
-
Method Summary
Modifier and TypeMethodDescriptionadd
(ProcessorType proctype, IRegisterBank bank) Register a register bank for a given processor.get
(ProcessorType proctype) Retrieve the register bank associated with the given processor type, if any.static RegisterBankService
Retrieve the list of processor types having a register bank, managed by this service.boolean
remove
(ProcessorType proctype) Unregister a register bank.
-
Method Details
-
getInstance
-
add
Register a register bank for a given processor. Only a single bank can be associated with a given processor.- Parameters:
proctype
- processor typebank
- register bank- Returns:
- the previous bank associated with the given processor type, null if there was none
-
remove
Unregister a register bank.- Parameters:
proctype
- processor type- Returns:
- success indicator: true if the bank was removed, false otherwise (e.g. it was not registered)
-
get
Retrieve the register bank associated with the given processor type, if any.- Parameters:
proctype
- processor type- Returns:
- a bank or null
-
getSupportedProcessors
Retrieve the list of processor types having a register bank, managed by this service.- Returns:
- a collection of unique processor types
-