#include <instruction.h>
Public Member Functions | |
| RegisterState () | |
| void | merge (const RegisterState &state) |
| void | reset () |
| uchar | definiteZeros () const |
| uchar | definiteOnes () const |
| uchar | unknown () const |
| uchar | maxValue () const |
| uchar | minValue () const |
| bool | operator== (const RegisterState &state) const |
| bool | operator!= (const RegisterState &state) const |
| void | print () |
Public Attributes | |
| uchar | known |
| Whether or not the value is known (for each bit). | |
| uchar | value |
| The value of the register. | |
Note that all the "uchar" values in this class should be considered as the 8 bits of a register. So for example, if known=0x2, then only the second bit of the register is known, and its value is given in the second bit of value.
Definition at line 241 of file instruction.h.
| void RegisterState::merge | ( | const RegisterState & | state | ) |
Merges the known and values together, (possibly) reducing what is known.
Definition at line 505 of file instruction.cpp.
Referenced by ProcessorState::merge().
| void RegisterState::reset | ( | ) |
Sets known to unknown and value to zero.
Definition at line 498 of file instruction.cpp.
Referenced by RegisterState(), and ProcessorState::reset().
| uchar RegisterState::definiteZeros | ( | ) | const [inline] |
Returns the bits that are definitely zero.
Definition at line 258 of file instruction.h.
Referenced by Instr_andwf::generateLinksAndStates().
| uchar RegisterState::definiteOnes | ( | ) | const [inline] |
Returns the bits that are definitely one.
Definition at line 262 of file instruction.h.
Referenced by Instr_andwf::generateLinksAndStates(), and Optimizer::optimizeInstructions().
| uchar RegisterState::unknown | ( | ) | const [inline] |
Returns the bits that are unknown.
Definition at line 266 of file instruction.h.
References known.
Referenced by Optimizer::canRemove().
| uchar RegisterState::maxValue | ( | ) | const [inline] |
Definition at line 271 of file instruction.h.
Referenced by Instr_sublw::generateLinksAndStates(), Instr_subwf::generateLinksAndStates(), and Instr_addwf::generateLinksAndStates().
| uchar RegisterState::minValue | ( | ) | const [inline] |
Definition at line 276 of file instruction.h.
Referenced by Instr_sublw::generateLinksAndStates(), and Instr_subwf::generateLinksAndStates().
| bool RegisterState::operator== | ( | const RegisterState & | state | ) | const |
Definition at line 512 of file instruction.cpp.
| bool RegisterState::operator!= | ( | const RegisterState & | state | ) | const [inline] |
Definition at line 284 of file instruction.h.
| void RegisterState::print | ( | ) |
Prints known and value.
Definition at line 518 of file instruction.cpp.
Referenced by ProcessorState::print().
1.5.1