From 6b6445eeb92e9ef40e08348691c47aa3153c088d Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Sat, 4 Jun 2005 14:16:04 -0400 Subject: more portable arch/alpha/alpha_tru64_process.cc: Sort #includes Make code more portable. g++ doesn't seem to always like struct ::stat (and others). So, we typedef stat outside of the namespace as something else and use the typedef base/hostinfo.cc: use snprintf to quell warning base/inifile.cc: use strncpy to quell warning base/stats/events.cc: don't use strcpy cpu/beta_cpu/btb.cc: use FloorLog2 instead of log2 cpu/beta_cpu/comm.hh: cpu/beta_cpu/inst_queue.hh: cpu/beta_cpu/sat_counter.hh: use sim/host.hh instead of stdint.h --HG-- extra : convert_revision : 59bd9235dda74e72a8b6a70b3f3a981840384f3f --- cpu/beta_cpu/btb.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cpu/beta_cpu/btb.cc') diff --git a/cpu/beta_cpu/btb.cc b/cpu/beta_cpu/btb.cc index 65b7fffa4..92864dbaa 100644 --- a/cpu/beta_cpu/btb.cc +++ b/cpu/beta_cpu/btb.cc @@ -26,8 +26,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include - +#include "base/intmath.hh" #include "base/trace.hh" #include "cpu/beta_cpu/btb.hh" @@ -53,7 +52,7 @@ DefaultBTB::DefaultBTB(unsigned _numEntries, tagMask = (1 << tagBits) - 1; - tagShiftAmt = instShiftAmt + (int)log2(numEntries); + tagShiftAmt = instShiftAmt + FloorLog2(numEntries); } inline -- cgit v1.2.3