tournament.hh (6226:f1076450ab2b) | tournament.hh (8842:a02932e2e73d) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2011 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated 11 * unmodified and in its entirety in all distributions of the software, 12 * modified or unmodified, in source code or in binary form. 13 * |
|
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; 9 * redistributions in binary form must reproduce the above copyright --- 64 unchanged lines hidden (view full) --- 74 75 /** 76 * Records that there was an unconditional branch, and modifies 77 * the bp history to point to an object that has the previous 78 * global history stored in it. 79 * @param bp_history Pointer that will be set to the BPHistory object. 80 */ 81 void uncondBr(void * &bp_history); | 14 * Copyright (c) 2004-2006 The Regents of The University of Michigan 15 * All rights reserved. 16 * 17 * Redistribution and use in source and binary forms, with or without 18 * modification, are permitted provided that the following conditions are 19 * met: redistributions of source code must retain the above copyright 20 * notice, this list of conditions and the following disclaimer; 21 * redistributions in binary form must reproduce the above copyright --- 64 unchanged lines hidden (view full) --- 86 87 /** 88 * Records that there was an unconditional branch, and modifies 89 * the bp history to point to an object that has the previous 90 * global history stored in it. 91 * @param bp_history Pointer that will be set to the BPHistory object. 92 */ 93 void uncondBr(void * &bp_history); |
82 | |
83 /** | 94 /** |
95 * Updates the branch predictor to Not Taken if a BTB entry is 96 * invalid or not found. 97 * @param branch_addr The address of the branch to look up. 98 * @param bp_history Pointer to any bp history state. 99 * @return Whether or not the branch is taken. 100 */ 101 void BTBUpdate(Addr &branch_addr, void * &bp_history); 102 /** |
|
84 * Updates the branch predictor with the actual result of a branch. 85 * @param branch_addr The address of the branch to update. 86 * @param taken Whether or not the branch was taken. 87 * @param bp_history Pointer to the BPHistory object that was created 88 * when the branch was predicted. | 103 * Updates the branch predictor with the actual result of a branch. 104 * @param branch_addr The address of the branch to update. 105 * @param taken Whether or not the branch was taken. 106 * @param bp_history Pointer to the BPHistory object that was created 107 * when the branch was predicted. |
108 * @param squashed is set when this function is called during a squash 109 * operation. |
|
89 */ | 110 */ |
90 void update(Addr &branch_addr, bool taken, void *bp_history); | 111 void update(Addr &branch_addr, bool taken, void *bp_history, bool squashed); |
91 92 /** 93 * Restores the global branch history on a squash. 94 * @param bp_history Pointer to the BPHistory object that has the 95 * previous global branch history in it. 96 */ 97 void squash(void *bp_history); 98 --- 45 unchanged lines hidden (view full) --- 144 BPHistory() 145 { newCount++; } 146 ~BPHistory() 147 { newCount--; } 148 149 static int newCount; 150#endif 151 unsigned globalHistory; | 112 113 /** 114 * Restores the global branch history on a squash. 115 * @param bp_history Pointer to the BPHistory object that has the 116 * previous global branch history in it. 117 */ 118 void squash(void *bp_history); 119 --- 45 unchanged lines hidden (view full) --- 165 BPHistory() 166 { newCount++; } 167 ~BPHistory() 168 { newCount--; } 169 170 static int newCount; 171#endif 172 unsigned globalHistory; |
173 unsigned localHistory; |
|
152 bool localPredTaken; 153 bool globalPredTaken; 154 bool globalUsed; 155 }; 156 | 174 bool localPredTaken; 175 bool globalPredTaken; 176 bool globalUsed; 177 }; 178 |
179 /** Flag for invalid predictor index */ 180 static const int invalidPredictorIndex = -1; |
|
157 /** Local counters. */ 158 std::vector<SatCounter> localCtrs; 159 160 /** Size of the local predictor. */ 161 unsigned localPredictorSize; 162 163 /** Mask to get the proper index bits into the predictor. */ 164 unsigned localPredictorMask; --- 57 unchanged lines hidden --- | 181 /** Local counters. */ 182 std::vector<SatCounter> localCtrs; 183 184 /** Size of the local predictor. */ 185 unsigned localPredictorSize; 186 187 /** Mask to get the proper index bits into the predictor. */ 188 unsigned localPredictorMask; --- 57 unchanged lines hidden --- |