Lines Matching refs:mode
63 // Returns the first mode number that represents one of the NEAR modes.
64 // The number of NEAR modes is near_cache_size. Each NEAR mode refers to
72 // Returns the first mode number that represents one of the SAME modes.
73 // The number of SAME modes is same_cache_size. Each SAME mode refers to
82 // Returns the maximum valid mode number, which happens to be
83 // the last SAME mode.
96 // each address mode type (SELF, HERE, NEAR, and SAME).
97 static bool IsSelfMode(unsigned char mode) {
98 return mode == VCD_SELF_MODE;
101 static bool IsHereMode(unsigned char mode) {
102 return mode == VCD_HERE_MODE;
105 bool IsNearMode(unsigned char mode) const {
106 return (mode >= FirstNearMode()) && (mode < FirstSameMode());
109 bool IsSameMode(unsigned char mode) const {
110 return (mode >= FirstSameMode()) && (mode <= LastMode());
122 VCDAddress DecodeNearAddress(unsigned char mode,
124 return NearAddress(mode - FirstNearMode()) + encoded_address;
127 VCDAddress DecodeSameAddress(unsigned char mode,
129 return SameAddress(((mode - FirstSameMode()) * 256) + encoded_address);
132 // Returns true if, when using the given mode, an encoded address
136 bool WriteAddressAsVarintForMode(unsigned char mode) const {
137 return !IsSameMode(mode);
164 // Determines the address mode that yields the most compact encoding
168 // and returns the mode used.
179 // Interprets the next value in the address_stream using the provided mode,
194 unsigned char mode,