Address.hh (6372:f1a41ea3bbab) Address.hh (6712:b95abe00dd9d)
1
2/*
3 * Copyright (c) 1999 Mark D. Hill and David A. Wood
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 134 unchanged lines hidden (view full) ---

143{
144 return (obj1.getAddress() != obj2.getAddress());
145}
146
147inline
148physical_address_t Address::bitSelect(int small, int big) const // rips bits inclusive
149{
150 physical_address_t mask;
1
2/*
3 * Copyright (c) 1999 Mark D. Hill and David A. Wood
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 134 unchanged lines hidden (view full) ---

143{
144 return (obj1.getAddress() != obj2.getAddress());
145}
146
147inline
148physical_address_t Address::bitSelect(int small, int big) const // rips bits inclusive
149{
150 physical_address_t mask;
151 assert(big >= small);
151 assert((unsigned)big >= (unsigned)small);
152
153 if (big >= ADDRESS_WIDTH - 1) {
154 return (m_address >> small);
155 } else {
156 mask = ~((physical_address_t)~0 << (big + 1));
157 // FIXME - this is slow to manipulate a 64-bit number using 32-bits
158 physical_address_t partial = (m_address & mask);
159 return (partial >> small);

--- 85 unchanged lines hidden ---
152
153 if (big >= ADDRESS_WIDTH - 1) {
154 return (m_address >> small);
155 } else {
156 mask = ~((physical_address_t)~0 << (big + 1));
157 // FIXME - this is slow to manipulate a 64-bit number using 32-bits
158 physical_address_t partial = (m_address & mask);
159 return (partial >> small);

--- 85 unchanged lines hidden ---