#include <bit_address.h>
Public Member Functions | |
| virtual | ~bit_address () |
| bit_address () | |
| bit_address (unsigned word_addr, unsigned bitnum) | |
| bit_address (unsigned word_addr) | |
| bit_address (const bit_address &) | |
| bit_address & | operator= (const bit_address &) |
| bool | valid () const |
| unsigned | get_word_addr () const |
| bool | have_space_for (unsigned bit_width) const |
| void | advance_to_word_boundary () |
| void | advance_by_bits (unsigned bit_width) |
| void | advance_by_words (unsigned word_width) |
| bool | empty () const |
| unsigned | get_size_in_words () const |
| bool | on_word_boundary () const |
| unsigned | get_bit_number () const |
| bool | operator== (const bit_address &rhs) const |
| bool | operator!= (const bit_address &rhs) const |
| bool | operator< (const bit_address &rhs) const |
| bool | operator<= (const bit_address &rhs) const |
| bool | operator> (const bit_address &rhs) const |
| bool | operator>= (const bit_address &rhs) const |
Private Attributes | |
| unsigned | word_addr |
| unsigned | bitnum |
Definition at line 28 of file bit_address.h.
| virtual bit_address::~bit_address | ( | ) | [virtual] |
The destructor.
| bit_address::bit_address | ( | ) |
The default constructor.
| bit_address::bit_address | ( | unsigned | word_addr, | |
| unsigned | bitnum | |||
| ) |
The constructor.
| bit_address::bit_address | ( | unsigned | word_addr | ) |
The constructor.
| bit_address::bit_address | ( | const bit_address & | ) |
The copy constructor.
| bit_address& bit_address::operator= | ( | const bit_address & | ) |
The assignment operator.
| bool bit_address::valid | ( | ) | const |
The valid method is used to check that this bit_address is value. This is used for debugging.
| unsigned bit_address::get_word_addr | ( | ) | const [inline] |
The get_word_addr method is used to obtain the word offset of the bit address.
Definition at line 71 of file bit_address.h.
Referenced by scope::get_param_size_in_bytes().
| bool bit_address::have_space_for | ( | unsigned | bit_width | ) | const |
The have_space_for method is used to determine whether or not there is space for the given number of bits without advancing to the next 16-bit word boundary.
| void bit_address::advance_to_word_boundary | ( | ) |
The advance_to_word_boundary method is used to move this bit_address to the next bitnum==0 boundary. Nothing happens if we are already at such a point.
| void bit_address::advance_by_bits | ( | unsigned | bit_width | ) |
The advance_by_bits method is used to move this bit addressed pointer forward by the given number of bits.
| bit_width | The number of bits to advance. |
| void bit_address::advance_by_words | ( | unsigned | word_width | ) |
The advance_by_words method is used to move this bit addressed pointer forward by the given number of words. It will be rounded up to the nearest word boundary first, if necessary.
| word_width | The number of words to advance. |
| bool bit_address::empty | ( | ) | const [inline] |
The empty method is used to determine whether or not this bit address is zero or not.
Definition at line 110 of file bit_address.h.
| unsigned bit_address::get_size_in_words | ( | ) | const |
The get_size_in_words method is used to obtain the number of whole words from the origin (0, 0, 0) to the present location, rounded up.
Referenced by scope::get_data_size_in_bytes().
| bool bit_address::on_word_boundary | ( | ) | const [inline] |
Definition at line 119 of file bit_address.h.
| unsigned bit_address::get_bit_number | ( | ) | const [inline] |
Definition at line 121 of file bit_address.h.
| bool bit_address::operator== | ( | const bit_address & | rhs | ) | const |
| bool bit_address::operator!= | ( | const bit_address & | rhs | ) | const [inline] |
Definition at line 124 of file bit_address.h.
| bool bit_address::operator< | ( | const bit_address & | rhs | ) | const |
| bool bit_address::operator<= | ( | const bit_address & | rhs | ) | const [inline] |
Definition at line 126 of file bit_address.h.
| bool bit_address::operator> | ( | const bit_address & | rhs | ) | const |
| bool bit_address::operator>= | ( | const bit_address & | rhs | ) | const [inline] |
Definition at line 128 of file bit_address.h.
unsigned bit_address::word_addr [private] |
The word_addr instance variable is used to remember the 16-bit word offset (within the local or global scope) of the value. This is twice the byte address. It is remembered this way because it most closely resembles the p-code opcodes generated from it.
Definition at line 138 of file bit_address.h.
unsigned bit_address::bitnum [private] |
The bitnum instance variable is used to remember the bit offset (from 0 to 15) within the word addressed.
Definition at line 144 of file bit_address.h.
1.5.1