2bit_local.cc (6226:f1076450ab2b) | 2bit_local.cc (6227:a17798f2a52c) |
---|---|
1/* 2 * Copyright (c) 2004-2006 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; --- 44 unchanged lines hidden (view full) --- 53 // Setup the index mask. 54 indexMask = localPredictorSets - 1; 55 56 DPRINTF(Fetch, "Branch predictor: index mask: %#x\n", indexMask); 57 58 // Setup the array of counters for the local predictor. 59 localCtrs.resize(localPredictorSets); 60 | 1/* 2 * Copyright (c) 2004-2006 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; --- 44 unchanged lines hidden (view full) --- 53 // Setup the index mask. 54 indexMask = localPredictorSets - 1; 55 56 DPRINTF(Fetch, "Branch predictor: index mask: %#x\n", indexMask); 57 58 // Setup the array of counters for the local predictor. 59 localCtrs.resize(localPredictorSets); 60 |
61 for (int i = 0; i < localPredictorSets; ++i) | 61 for (unsigned i = 0; i < localPredictorSets; ++i) |
62 localCtrs[i].setBits(_localCtrBits); 63 64 DPRINTF(Fetch, "Branch predictor: local predictor size: %i\n", 65 localPredictorSize); 66 67 DPRINTF(Fetch, "Branch predictor: local counter bits: %i\n", localCtrBits); 68 69 DPRINTF(Fetch, "Branch predictor: instruction shift amount: %i\n", 70 instShiftAmt); 71} 72 73void 74LocalBP::reset() 75{ | 62 localCtrs[i].setBits(_localCtrBits); 63 64 DPRINTF(Fetch, "Branch predictor: local predictor size: %i\n", 65 localPredictorSize); 66 67 DPRINTF(Fetch, "Branch predictor: local counter bits: %i\n", localCtrBits); 68 69 DPRINTF(Fetch, "Branch predictor: instruction shift amount: %i\n", 70 instShiftAmt); 71} 72 73void 74LocalBP::reset() 75{ |
76 for (int i = 0; i < localPredictorSets; ++i) { | 76 for (unsigned i = 0; i < localPredictorSets; ++i) { |
77 localCtrs[i].reset(); 78 } 79} 80 81bool 82LocalBP::lookup(Addr &branch_addr, void * &bp_history) 83{ 84 bool taken; --- 62 unchanged lines hidden --- | 77 localCtrs[i].reset(); 78 } 79} 80 81bool 82LocalBP::lookup(Addr &branch_addr, void * &bp_history) 83{ 84 bool taken; --- 62 unchanged lines hidden --- |