Package ghidra.program.model.lang
Class RegisterBuilder
java.lang.Object
ghidra.program.model.lang.RegisterBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Add an alias to a previously defined register.boolean
addLaneSize
(String registerName, int laneSizeInBytes) Add a vector lane size to the specified register.void
addRegister
(Register register) void
addRegister
(String name, String description, Address address, int numBytes, boolean bigEndian, int typeFlags) void
addRegister
(String name, String description, Address address, int numBytes, int leastSignificantBit, int bitLength, boolean bigEndian, int typeFlags) Returns the processor context address of the first context register added to this builder.getRegister
(String name) Returns the register with the given name;Compute current register collection and instantiate aRegisterManager
boolean
renameRegister
(String oldName, String newName) Rename a register.boolean
Set a register flag for the specified registerboolean
Set the group name for the specified register
-
Constructor Details
-
RegisterBuilder
public RegisterBuilder()
-
-
Method Details
-
addRegister
-
addRegister
-
addRegister
-
getProcessContextAddress
Returns the processor context address of the first context register added to this builder.- Returns:
- context address
-
getRegisterManager
Compute current register collection and instantiate aRegisterManager
- Returns:
- new register manager instance
-
getRegister
Returns the register with the given name;- Parameters:
name
- the name of the register to retrieve- Returns:
- register or null if not found
-
renameRegister
Rename a register. This allows generic register names declared within the language specification (*.slaspec) to be renamed for a processor variant specification (*.pspec).- Parameters:
oldName
- original register namenewName
- new register name- Returns:
- true if rename was successful, else false
-
addAlias
Add an alias to a previously defined register.- Parameters:
registerName
- defined registeralias
- alias to be added to defined register- Returns:
- true if alias addition was successful, else false
-
setGroup
Set the group name for the specified register- Parameters:
registerName
- register namegroupName
- group name- Returns:
- true if register was found, else false
-
setFlag
Set a register flag for the specified register- Parameters:
registerName
- register nameregisterFlag
- Register defined flag bit(s)- Returns:
- true if register was found, else false
-
addLaneSize
Add a vector lane size to the specified register.- Parameters:
registerName
- register namelaneSizeInBytes
- the size of the lane to add in bytes- Returns:
- true if register was found, else false
- Throws:
UnsupportedOperationException
- if register is unable to support the definition of lanes.IllegalArgumentException
- iflaneSizeInBytes
is invalid
-