}
}
- uint64_t interrupts = intstatus;
- if (interrupts) {
+ if (intstatus) {
for (uint64_t i = INTLEVEL_EXTERNAL_MIN;
i < INTLEVEL_EXTERNAL_MAX; i++) {
- if (interrupts & (ULL(1) << i)) {
+ if (intstatus & (ULL(1) << i)) {
// See table 4-19 of 21164 hardware reference
ipl = i;
summary |= (ULL(1) << i);
return;
}
- bool kernel = sys->kernelStart <= pc && pc <= sys->kernelEnd;
+ kernel = sys->kernelStart <= pc && pc <= sys->kernelEnd;
if (!kernel)
return;
// Get NAN behavior right. This varies between x86 and ARM.
if (std::isnan(dest)) {
- const bool single = (sizeof(fpType) == sizeof(float));
const uint64_t qnan =
single ? 0x7fc00000 : ULL(0x7ff8000000000000);
const bool nan1 = std::isnan(op1);
// Get NAN behavior right. This varies between x86 and ARM.
if (std::isnan(dest)) {
- const bool single = (sizeof(fpType) == sizeof(float));
const uint64_t qnan =
single ? 0x7fc00000 : ULL(0x7ff8000000000000);
const bool nan = std::isnan(op1);
}
case 0x6:
if (b == 0xc) {
- const IntRegIndex vd =
- (IntRegIndex)(2 * (bits(machInst, 15, 12) |
- (bits(machInst, 22) << 4)));
- const IntRegIndex vm =
- (IntRegIndex)(2 * (bits(machInst, 3, 0) |
- (bits(machInst, 5) << 4)));
- unsigned size = bits(machInst, 19, 18);
return decodeNeonSTwoShiftUSReg<NVshll>(
size, machInst, vd, vm, 8 << size);
} else {
case 0x3:
const bool up = (bits(machInst, 23) == 1);
const uint32_t imm = bits(machInst, 7, 0) << 2;
- RegIndex vd;
if (single) {
vd = (RegIndex)(uint32_t)((bits(machInst, 15, 12) << 1) |
(bits(machInst, 22)));
for (EntryTable::iterator ei = table.begin();
ei != table.end(); ++ei) {
const string &entryName = ei->first;
- Entry *entry = ei->second;
+ entry = ei->second;
if (entryName == "unref_section_ok" ||
entryName == "unref_entries_ok")
} else {
// assume 'name' is a directory
if (recursive) {
- DIR *dir = opendir(fname.c_str());
+ DIR *subdir = opendir(fname.c_str());
// silently ignore removal request for non-existent directory
- if ((!dir) && (errno == ENOENT))
+ if ((!subdir) && (errno == ENOENT))
return;
// fail on other errors
- if (!dir) {
+ if (!subdir) {
perror("opendir");
fatal("Error opening directory for recursive removal '%s'\n",
fname);
}
- struct dirent *de = readdir(dir);
+ struct dirent *de = readdir(subdir);
while (de != NULL) {
// ignore files starting with a '.'; user must delete those
// manually if they really want to
if (de->d_name[0] != '.')
remove(name + PATH_SEPARATOR + de->d_name, recursive);
- de = readdir(dir);
+ de = readdir(subdir);
}
}
data.underflow = underflow;
data.overflow = overflow;
- size_type buckets = params->buckets;
- data.cvec.resize(buckets);
- for (off_type i = 0; i < buckets; ++i)
+ data.cvec.resize(params->buckets);
+ for (off_type i = 0; i < params->buckets; ++i)
data.cvec[i] = cvec[i];
data.sum = sum;
size_type size = lvec.size();
assert(size > 0);
- Result vresult = 0.0;
+ Result result = 0.0;
Op op;
for (off_type i = 0; i < size; ++i)
- vresult = op(vresult, lvec[i]);
+ result = op(result, lvec[i]);
- return vresult;
+ return result;
}
size_type size() const { return 1; }
numFU++;
// Add the appropriate number of copies of this FU to the list
- ostringstream s;
-
- s << (*i)->name() << "(0)";
- fu->name = s.str();
+ fu->name = (*i)->name() + "(0)";
funcUnits.push_back(fu);
for (int c = 1; c < (*i)->number; ++c) {
void
ROB<Impl>::updateHead()
{
- DynInstPtr head_inst;
InstSeqNum lowest_num = 0;
bool first_valid = true;
cpuTarget[int_num+3] << 24) ;
}
} else {
- int ctx_id = pkt->req->contextId();
assert(ctx_id < sys->numRunningContexts());
pkt->set<uint32_t>(ctx_id);
}
case 'c': {
uint64_t mask = (*p == 'C') ? 0xffL : 0x7fL;
uint64_t num;
- int width;
+ int cwidth;
if (islong) {
num = (uint64_t)args;
- width = sizeof(uint64_t);
+ cwidth = sizeof(uint64_t);
} else {
num = (uint32_t)args;
- width = sizeof(uint32_t);
+ cwidth = sizeof(uint32_t);
}
- while (width-- > 0) {
+ while (cwidth-- > 0) {
char c = (char)(num & mask);
if (c)
out << c;
incMissCount(pkt);
return false;
}
- int id = pkt->req->masterId();
- tags->insertBlock(pkt->getAddr(), blk, id);
+ int master_id = pkt->req->masterId();
+ tags->insertBlock(pkt->getAddr(), blk, master_id);
blk->status = BlkValid | BlkReadable;
}
std::memcpy(blk->data, pkt->getPtr<uint8_t>(), blkSize);
if (blk) {
blk->status &= ~BlkReadable;
}
- MSHRQueue *mq = mshr->queue;
+ mq = mshr->queue;
mq->markPending(mshr);
requestMemSideBus((RequestCause)mq->index, curTick() +
pkt->busLastWordDelay);
FALRU::check()
{
FALRUBlk* blk = head;
- int size = 0;
+ int tot_size = 0;
int boundary = 1<<17;
int j = 0;
int flags = cacheMask;
while (blk) {
- size += blkSize;
+ tot_size += blkSize;
if (blk->inCache != flags) {
return false;
}
- if (size == boundary && blk != tail) {
+ if (tot_size == boundary && blk != tail) {
if (cacheBoundaries[j] != blk) {
return false;
}
//FIXME Wmemcellr and resize
double Wmemcellr = m_tech_param_ptr->get_Wmemcellr();
double nsize = Wmemcellr;
- double trans_cap = m_tech_param_ptr->calc_gatecap(nsize, 0);
+ trans_cap = m_tech_param_ptr->calc_gatecap(nsize, 0);
if (m_trans_type == NP_GATE)
{
double Wdecinvn = m_tech_param_ptr->get_Wdecinvn();
uint32_t m_num_out_port;
uint32_t m_flit_width;
uint32_t m_num_vclass;
- uint32_t num_vc_per_vclass_;
+ uint32_t num_vc_per_vclass;
uint32_t m_total_num_vc;
uint32_t* m_num_vc_per_vclass_ary;
uint32_t* m_in_buf_num_set_ary;
std::vector<int64> m_touched_weighted_vec;
m_touched_vec.resize(num_of_sequencers+1);
m_touched_weighted_vec.resize(num_of_sequencers+1);
- for (int i = 0; i < m_touched_vec.size(); i++) {
- m_touched_vec[i] = 0;
- m_touched_weighted_vec[i] = 0;
+ for (int j = 0; j < m_touched_vec.size(); j++) {
+ m_touched_vec[j] = 0;
+ m_touched_weighted_vec[j] = 0;
}
int counter = 0;
DPRINTF(RubySystem, "reading from %s block %s\n",
m_abs_cntrl_vec[i]->name(), block);
- for (unsigned i = 0; i < size_in_bytes; ++i) {
- data[i] = block.getByte(i + startByte);
+ for (unsigned j = 0; j < size_in_bytes; ++j) {
+ data[j] = block.getByte(j + startByte);
}
return true;
}
DPRINTF(RubySystem, "reading from %s block %s\n",
m_abs_cntrl_vec[i]->name(), block);
- for (unsigned i = 0; i < size_in_bytes; ++i) {
- data[i] = block.getByte(i + startByte);
+ for (unsigned j = 0; j < size_in_bytes; ++j) {
+ data[j] = block.getByte(j + startByte);
}
return true;
}
DataBlock& block = m_abs_cntrl_vec[i]->getDataBlock(line_addr);
DPRINTF(RubySystem, "%s\n",block);
- for (unsigned i = 0; i < size_in_bytes; ++i) {
- block.setByte(i + startByte, data[i]);
+ for (unsigned j = 0; j < size_in_bytes; ++j) {
+ block.setByte(j + startByte, data[j]);
}
DPRINTF(RubySystem, "%s\n",block);
}
template <class T>
operator T() {
assert(sizeof(T) <= sizeof(uint64_t));
- T data = static_cast<T>(getArg(sizeof(T)));
- return data;
+ T d = static_cast<T>(getArg(sizeof(T)));
+ return d;
}
template <class T>
inline Tick clockPeriod() const { return clock; }
- inline Cycles ticksToCycles(Tick tick) const
- { return Cycles(tick / clock); }
+ inline Cycles ticksToCycles(Tick t) const
+ { return Cycles(t / clock); }
};
// mark remaining fds as free
for (int i = 3; i <= MAX_FD; ++i) {
- Process::FdMap *fdo = &fd_map[i];
+ fdo = &fd_map[i];
fdo->fd = -1;
}