rework cycle estimation

This commit is contained in:
Eyck Jentzsch 2022-02-01 19:03:45 +01:00
parent ef2a4df925
commit 059bd0d371
4 changed files with 161 additions and 131 deletions

View File

@ -3,6 +3,9 @@
{
"name" : "${instr.name}",
"size" : ${instr.length},
"encoding": ${instr.encoding},
"mask": ${instr.mask},
"branch": ${instr.modifiesPC},
"delay" : ${instr.isConditional?"[1,1]":"1"}
}<%}%>
]

View File

@ -37,7 +37,6 @@
#include "iss/instrumentation_if.h"
#include "iss/vm_plugin.h"
#include <json/json.h>
#include <string>
#include <unordered_map>
@ -64,7 +63,7 @@ public:
cycle_estimate(const cycle_estimate &&) = delete;
cycle_estimate(std::string config_file_name);
cycle_estimate(std::string const& config_file_name);
virtual ~cycle_estimate();
@ -88,7 +87,7 @@ private:
}
};
std::unordered_map<std::pair<uint64_t, uint64_t>, uint64_t, pair_hash> blocks;
Json::Value root;
std::string config_file_name;
};
}
}

View File

@ -36,23 +36,20 @@
#include <iss/arch_if.h>
#include <util/logging.h>
#include <rapidjson/document.h>
#include <rapidjson/istreamwrapper.h>
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
#include <rapidjson/ostreamwrapper.h>
#include <fstream>
iss::plugin::cycle_estimate::cycle_estimate(std::string config_file_name)
using namespace rapidjson;
using namespace std;
iss::plugin::cycle_estimate::cycle_estimate(string const& config_file_name)
: arch_instr(nullptr)
, config_file_name(config_file_name)
{
if (config_file_name.length() > 0) {
std::ifstream is(config_file_name);
if (is.is_open()) {
try {
is >> root;
} catch (Json::RuntimeError &e) {
LOG(ERR) << "Could not parse input file " << config_file_name << ", reason: " << e.what();
}
} else {
LOG(ERR) << "Could not open input file " << config_file_name;
}
}
}
iss::plugin::cycle_estimate::~cycle_estimate() {
@ -61,23 +58,45 @@ iss::plugin::cycle_estimate::~cycle_estimate() {
bool iss::plugin::cycle_estimate::registration(const char* const version, vm_if& vm) {
arch_instr = vm.get_arch()->get_instrumentation_if();
if(!arch_instr) return false;
const std::string core_name = arch_instr->core_type_name();
Json::Value &val = root[core_name];
if(!val.isNull() && val.isArray()){
delays.reserve(val.size());
for(auto it:val){
const string core_name = arch_instr->core_type_name();
if (config_file_name.length() > 0) {
ifstream is(config_file_name);
if (is.is_open()) {
try {
IStreamWrapper isw(is);
Document d;
ParseResult ok = d.ParseStream(isw);
if(ok) {
Value& val = d[core_name];
if(val.IsArray()){
delays.reserve(val.Size());
for(auto it:val.GetArray()){
auto name = it["name"];
auto size = it["size"];
auto delay = it["delay"];
if(!name.isString() || !size.isUInt() || !(delay.isUInt() || delay.isArray())) throw std::runtime_error("JSON parse error");
if(delay.isUInt()){
delays.push_back(instr_desc{size.asUInt(), delay.asUInt(), 0});
} else {
delays.push_back(instr_desc{size.asUInt(), delay[0].asUInt(), delay[1].asUInt()});
}
if(delay.IsArray()) {
delays.push_back(instr_desc{size.Get<unsigned>(), delay[0].Get<unsigned>(), delay[1].Get<unsigned>()});
} else if(delay.Is<unsigned>()) {
delays.push_back(instr_desc{size.Get<unsigned>(), delay.Get<unsigned>(), 0});
} else
throw runtime_error("JSON parse error");
}
} else {
LOG(ERR)<<"plugin cycle_estimate: could not find an entry for "<<core_name<<" in JSON file"<<std::endl;
LOG(ERR)<<"plugin cycle_estimate: could not find an entry for "<<core_name<<" in JSON file"<<endl;
return false;
}
} else {
LOG(ERR)<<"plugin cycle_estimate: could not parse in JSON file"<<endl;
return false;
}
} catch (runtime_error &e) {
LOG(ERR) << "Could not parse input file " << config_file_name << ", reason: " << e.what();
return false;
}
} else {
LOG(ERR) << "Could not open input file " << config_file_name;
return false;
}
}
return true;

View File

@ -176,6 +176,15 @@ protected:
return (from & mask) | ((from & sign_mask) ? ~mask : 0);
}
inline void process_spawn_blocks() {
for(auto it = std::begin(spawn_blocks); it!=std::end(spawn_blocks);)
if(*it){
(*it)();
++it;
} else
spawn_blocks.erase(it);
}
private:
/****************************************************************************
* start opcode definitions
@ -397,7 +406,7 @@ private:
if(rd != 0) *(X+rd) = (int32_t)imm;
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 0);
// trap check
if(*trap_state!=0){
@ -436,7 +445,7 @@ private:
if(rd != 0) *(X+rd) = *PC + (int32_t)imm;
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 1);
// trap check
if(*trap_state!=0){
@ -483,7 +492,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 2);
// trap check
if(*trap_state!=0){
@ -532,7 +541,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 3);
// trap check
if(*trap_state!=0){
@ -579,7 +588,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 4);
// trap check
if(*trap_state!=0){
@ -626,7 +635,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 5);
// trap check
if(*trap_state!=0){
@ -673,7 +682,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 6);
// trap check
if(*trap_state!=0){
@ -720,7 +729,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 7);
// trap check
if(*trap_state!=0){
@ -767,7 +776,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 8);
// trap check
if(*trap_state!=0){
@ -814,7 +823,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 9);
// trap check
if(*trap_state!=0){
@ -857,7 +866,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 10);
// trap check
if(*trap_state!=0){
@ -901,7 +910,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 11);
// trap check
if(*trap_state!=0){
@ -945,7 +954,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 12);
// trap check
if(*trap_state!=0){
@ -988,7 +997,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 13);
// trap check
if(*trap_state!=0){
@ -1032,7 +1041,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 14);
// trap check
if(*trap_state!=0){
@ -1072,7 +1081,7 @@ private:
writeSpace1(traits::MEM, *(X+rs1) + (int16_t)sext<12>(imm), (int8_t)*(X+rs2));
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 15);
// trap check
if(*trap_state!=0){
@ -1115,7 +1124,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 16);
// trap check
if(*trap_state!=0){
@ -1158,7 +1167,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 17);
// trap check
if(*trap_state!=0){
@ -1198,7 +1207,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rs1) + (int16_t)sext<12>(imm);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 18);
// trap check
if(*trap_state!=0){
@ -1238,7 +1247,7 @@ private:
if(rd != 0) *(X+rd) = (int32_t)*(X+rs1) < (int16_t)sext<12>(imm)? 1 : 0;
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 19);
// trap check
if(*trap_state!=0){
@ -1278,7 +1287,7 @@ private:
if(rd != 0) *(X+rd) = (*(X+rs1) < (uint32_t)((int16_t)sext<12>(imm)))? 1 : 0;
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 20);
// trap check
if(*trap_state!=0){
@ -1318,7 +1327,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rs1) ^ (int16_t)sext<12>(imm);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 21);
// trap check
if(*trap_state!=0){
@ -1358,7 +1367,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rs1) | (int16_t)sext<12>(imm);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 22);
// trap check
if(*trap_state!=0){
@ -1398,7 +1407,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rs1) & (int16_t)sext<12>(imm);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 23);
// trap check
if(*trap_state!=0){
@ -1443,7 +1452,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 24);
// trap check
if(*trap_state!=0){
@ -1488,7 +1497,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 25);
// trap check
if(*trap_state!=0){
@ -1533,7 +1542,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 26);
// trap check
if(*trap_state!=0){
@ -1573,7 +1582,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rs1) + *(X+rs2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 27);
// trap check
if(*trap_state!=0){
@ -1613,7 +1622,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rs1) - *(X+rs2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 28);
// trap check
if(*trap_state!=0){
@ -1653,7 +1662,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rs1) << (*(X+rs2) & (traits::XLEN - 1));
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 29);
// trap check
if(*trap_state!=0){
@ -1693,7 +1702,7 @@ private:
if(rd != 0) *(X+rd) = (int32_t)*(X+rs1) < (int32_t)*(X+rs2)? 1 : 0;
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 30);
// trap check
if(*trap_state!=0){
@ -1733,7 +1742,7 @@ private:
if(rd != 0) *(X+rd) = (uint32_t)*(X+rs1) < (uint32_t)*(X+rs2)? 1 : 0;
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 31);
// trap check
if(*trap_state!=0){
@ -1773,7 +1782,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rs1) ^ *(X+rs2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 32);
// trap check
if(*trap_state!=0){
@ -1813,7 +1822,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rs1) >> (*(X+rs2) & (traits::XLEN - 1));
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 33);
// trap check
if(*trap_state!=0){
@ -1853,7 +1862,7 @@ private:
if(rd != 0) *(X+rd) = (int32_t)*(X+rs1) >> (*(X+rs2) & (traits::XLEN - 1));
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 34);
// trap check
if(*trap_state!=0){
@ -1893,7 +1902,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rs1) | *(X+rs2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 35);
// trap check
if(*trap_state!=0){
@ -1933,7 +1942,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rs1) & *(X+rs2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 36);
// trap check
if(*trap_state!=0){
@ -1974,7 +1983,7 @@ private:
writeSpace1(traits::FENCE, traits::fence, pred << 4 | succ);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 37);
// trap check
if(*trap_state!=0){
@ -2007,7 +2016,7 @@ private:
raise(0, 11);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 38);
// trap check
if(*trap_state!=0){
@ -2040,7 +2049,7 @@ private:
raise(0, 3);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 39);
// trap check
if(*trap_state!=0){
@ -2073,7 +2082,7 @@ private:
leave(0);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 40);
// trap check
if(*trap_state!=0){
@ -2106,7 +2115,7 @@ private:
leave(1);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 41);
// trap check
if(*trap_state!=0){
@ -2139,7 +2148,7 @@ private:
leave(3);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 42);
// trap check
if(*trap_state!=0){
@ -2172,7 +2181,7 @@ private:
wait(1);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 43);
// trap check
if(*trap_state!=0){
@ -2215,7 +2224,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 44);
// trap check
if(*trap_state!=0){
@ -2265,7 +2274,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 45);
// trap check
if(*trap_state!=0){
@ -2310,7 +2319,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 46);
// trap check
if(*trap_state!=0){
@ -2355,7 +2364,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 47);
// trap check
if(*trap_state!=0){
@ -2399,7 +2408,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 48);
// trap check
if(*trap_state!=0){
@ -2443,7 +2452,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 49);
// trap check
if(*trap_state!=0){
@ -2487,7 +2496,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 50);
// trap check
if(*trap_state!=0){
@ -2526,7 +2535,7 @@ private:
writeSpace2(traits::FENCE, traits::fencei, imm);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 51);
// trap check
if(*trap_state!=0){
@ -2571,7 +2580,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 52);
// trap check
if(*trap_state!=0){
@ -2616,7 +2625,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 53);
// trap check
if(*trap_state!=0){
@ -2661,7 +2670,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 54);
// trap check
if(*trap_state!=0){
@ -2706,7 +2715,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 55);
// trap check
if(*trap_state!=0){
@ -2755,7 +2764,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 56);
// trap check
if(*trap_state!=0){
@ -2800,7 +2809,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 57);
// trap check
if(*trap_state!=0){
@ -2849,7 +2858,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 58);
// trap check
if(*trap_state!=0){
@ -2894,7 +2903,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 59);
// trap check
if(*trap_state!=0){
@ -2934,7 +2943,7 @@ private:
else raise(0, 2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 60);
// trap check
if(*trap_state!=0){
@ -2977,7 +2986,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 61);
// trap check
if(*trap_state!=0){
@ -3020,7 +3029,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 62);
// trap check
if(*trap_state!=0){
@ -3059,7 +3068,7 @@ private:
*(X+rs1) = *(X+rs1) + (int8_t)sext<6>(imm);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 63);
// trap check
if(*trap_state!=0){
@ -3094,7 +3103,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 64);
// trap check
if(*trap_state!=0){
@ -3135,7 +3144,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 65);
// trap check
if(*trap_state!=0){
@ -3176,7 +3185,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 66);
// trap check
if(*trap_state!=0){
@ -3218,7 +3227,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 67);
// trap check
if(*trap_state!=0){
@ -3257,7 +3266,7 @@ private:
else raise(0, 2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 68);
// trap check
if(*trap_state!=0){
@ -3291,7 +3300,7 @@ private:
raise(0, 2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 69);
// trap check
if(*trap_state!=0){
@ -3333,7 +3342,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 70);
// trap check
if(*trap_state!=0){
@ -3379,7 +3388,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 71);
// trap check
if(*trap_state!=0){
@ -3421,7 +3430,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 72);
// trap check
if(*trap_state!=0){
@ -3463,7 +3472,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 73);
// trap check
if(*trap_state!=0){
@ -3505,7 +3514,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 74);
// trap check
if(*trap_state!=0){
@ -3547,7 +3556,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 75);
// trap check
if(*trap_state!=0){
@ -3589,7 +3598,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 76);
// trap check
if(*trap_state!=0){
@ -3626,7 +3635,7 @@ private:
pc_assign(*NEXT_PC) = *PC + (int16_t)sext<12>(imm);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 77);
// trap check
if(*trap_state!=0){
@ -3665,7 +3674,7 @@ private:
if(*(X+(rs1 + 8)) == 0) pc_assign(*NEXT_PC) = *PC + (int16_t)sext<9>(imm);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 78);
// trap check
if(*trap_state!=0){
@ -3704,7 +3713,7 @@ private:
if(*(X+(rs1 + 8)) != 0) pc_assign(*NEXT_PC) = *PC + (int16_t)sext<9>(imm);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 79);
// trap check
if(*trap_state!=0){
@ -3743,7 +3752,7 @@ private:
if(nzuimm) *(X+rs1) = *(X+rs1) << nzuimm;
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 80);
// trap check
if(*trap_state!=0){
@ -3786,7 +3795,7 @@ private:
else raise(0, 2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 81);
// trap check
if(*trap_state!=0){
@ -3825,7 +3834,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rs2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 82);
// trap check
if(*trap_state!=0){
@ -3864,7 +3873,7 @@ private:
else raise(0, 2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 83);
// trap check
if(*trap_state!=0){
@ -3897,7 +3906,7 @@ private:
raise(0, 2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 84);
// trap check
if(*trap_state!=0){
@ -3936,7 +3945,7 @@ private:
if(rd != 0) *(X+rd) = *(X+rd) + *(X+rs2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 85);
// trap check
if(*trap_state!=0){
@ -3978,7 +3987,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 86);
// trap check
if(*trap_state!=0){
@ -4011,7 +4020,7 @@ private:
raise(0, 3);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 87);
// trap check
if(*trap_state!=0){
@ -4053,7 +4062,7 @@ private:
}
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 88);
// trap check
if(*trap_state!=0){
@ -4086,7 +4095,7 @@ private:
raise(0, 2);
} catch(...){}
// post execution stuff
for(auto& spawn_block:spawn_blocks) spawn_block();
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, 89);
// trap check
if(*trap_state!=0){