Deleted Added
sdiff udiff text old ( 13775:36b71cff789e ) new ( 13827:2764e4b4de5d )
full compact
1/**
2 * Copyright (c) 2018 Metempsy Technology Consulting
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;

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

103
104 // if this is a read, read the data from the cache and assume
105 // it is an index (this is only possible if the data is already
106 // in the cache), also, only indexes up to 8 bytes are
107 // considered
108
109 if (!miss && !pfi.isWrite() && pfi.getSize() <= 8) {
110 int64_t index = 0;
111 switch(pfi.getSize()) {
112 case sizeof(uint8_t):
113 index = pfi.get<uint8_t>(byteOrder);
114 break;
115 case sizeof(uint16_t):
116 index = pfi.get<uint16_t>(byteOrder);
117 break;
118 case sizeof(uint32_t):
119 index = pfi.get<uint32_t>(byteOrder);
120 break;
121 case sizeof(uint64_t):
122 index = pfi.get<uint64_t>(byteOrder);
123 break;
124 default:
125 panic("Invalid access size\n");
126 }
127 if (!pt_entry->enabled) {
128 // Not enabled (no pattern detected in this stream),
129 // add or update an entry in the pattern detector and
130 // start tracking misses
131 allocateOrUpdateIPDEntry(pt_entry, index);
132 } else {
133 // Enabled entry, update the index
134 pt_entry->index = index;
135 if (!pt_entry->increasedIndirectCounter) {
136 if (pt_entry->indirectCounter > 0) {
137 pt_entry->indirectCounter -= 1;
138 }
139 } else {
140 // Set this to false, to see if the new index

--- 130 unchanged lines hidden ---