Commit f00f409f authored by Maeva Ramarjiaona's avatar Maeva Ramarjiaona

Displaying only the 'UNSAFE' accesses, still in the style of ocache. No...

Displaying only the 'UNSAFE' accesses, still in the style of ocache. No annotations made to the CFG yet
parent ec418314
......@@ -96,28 +96,30 @@ protected:
void processAccess(WorkSpace* ws, CFG*, const icache::Access* access, BasicBlock* bb)
{
SecurityCategory cat = SECURITY_CATEGORY(access);
if(cat == SecurityCategory::UNSAFE){
_out << access->address() << "\t";
switch(access->kind()){
case icache::NONE: _out << "NONE\t"; break;
case icache::FETCH: _out << "FETCH\t"; break;
case icache::PREFETCH: _out << "PREFETCH\t"; break;
}
SecurityCategory cat = SECURITY_CATEGORY(access);
int set = icat3::LBLOCKS(ws)->cache()->set(access->address());
if(cat == SecurityCategory::UNSAFE){
_out << "UNSAFE ";
if (bb->hasProp(EXIST_HIT_PREV_IN)) {
Bag<icache::Access> prev = (*EXIST_HIT_PREV_IN(bb))[set]._prev;
for (int i = 0; i < prev.size(); ++i)
_out << prev[i].address();
}
}
else
_out << "\t\t";
_out << "BB " << bb->index() << "\t\t";
printLine(ws, bb->address(), bb->topAddress().offset());
_out << io::endl;
_out << io::endl;}
}
void printLine(WorkSpace* ws, Address begin, Address::offset_t offset)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment