bi_mode.cc (11429:cf5af0cc3be4) bi_mode.cc (11433:72b075cdc336)
1/*
2 * Copyright (c) 2014 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

231
232void
233BiModeBP::retireSquashed(void *bp_history)
234{
235 BPHistory *history = static_cast<BPHistory*>(bp_history);
236 delete history;
237}
238
1/*
2 * Copyright (c) 2014 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

231
232void
233BiModeBP::retireSquashed(void *bp_history)
234{
235 BPHistory *history = static_cast<BPHistory*>(bp_history);
236 delete history;
237}
238
239unsigned
240BiModeBP::getGHR(void *bp_history) const
241{
242 return static_cast<BPHistory*>(bp_history)->globalHistoryReg;
243}
244
239void
240BiModeBP::updateGlobalHistReg(bool taken)
241{
242 globalHistoryReg = taken ? (globalHistoryReg << 1) | 1 :
243 (globalHistoryReg << 1);
244 globalHistoryReg &= historyRegisterMask;
245}
246
247BiModeBP*
248BiModeBPParams::create()
249{
250 return new BiModeBP(this);
251}
245void
246BiModeBP::updateGlobalHistReg(bool taken)
247{
248 globalHistoryReg = taken ? (globalHistoryReg << 1) | 1 :
249 (globalHistoryReg << 1);
250 globalHistoryReg &= historyRegisterMask;
251}
252
253BiModeBP*
254BiModeBPParams::create()
255{
256 return new BiModeBP(this);
257}