Fail* CPUState: set/getRegisterContent() uses "const Register*" as 1st param
The first parameter (Register* reg) is only used as input (const-correctness). Change-Id: I5a75a9f7378913e491a8a22872f51a385e910af6
This commit is contained in:
committed by
Gerrit Code Review
parent
72c9ba6363
commit
515eb9973b
@ -6,7 +6,7 @@ namespace fail {
|
||||
|
||||
static const uint64_t lower = 0x00000000ffffffff;
|
||||
|
||||
regdata_t T32ArmCPU::getRegisterContent(Register* reg) const
|
||||
regdata_t T32ArmCPU::getRegisterContent(const Register* reg) const
|
||||
{
|
||||
// T32_ReadRegister wants a mask of bits representig the registers to read:
|
||||
// e.g., reading R1 and R4 and R63
|
||||
@ -28,7 +28,7 @@ regdata_t T32ArmCPU::getRegisterContent(Register* reg) const
|
||||
return 0; // we should not come here.
|
||||
}
|
||||
|
||||
void T32ArmCPU::setRegisterContent(Register* reg, regdata_t value)
|
||||
void T32ArmCPU::setRegisterContent(const Register* reg, regdata_t value)
|
||||
{
|
||||
uint64_t mask = (1 << reg->getIndex());
|
||||
|
||||
|
||||
@ -29,13 +29,13 @@ public:
|
||||
* @param reg the destination register whose content should be retrieved
|
||||
* @return the content of register \c reg
|
||||
*/
|
||||
regdata_t getRegisterContent(Register* reg) const;
|
||||
regdata_t getRegisterContent(const Register* reg) const;
|
||||
/**
|
||||
* Sets the register content for the \a current CPU.
|
||||
* @param reg the (initialized) register object whose content should be set
|
||||
* @param value the new content of the register \c reg
|
||||
*/
|
||||
void setRegisterContent(Register* reg, regdata_t value);
|
||||
void setRegisterContent(const Register* reg, regdata_t value);
|
||||
/**
|
||||
* Retrieves the current instruction pointer (IP aka program counter, PC for short)
|
||||
* for the current CPU \c this.
|
||||
|
||||
Reference in New Issue
Block a user