Compare commits

..

No commits in common. "b360fc2c756ef35d43ab013eca0ef495acb48cce" and "8ee3ac90f72176d0bbdfe10e43ab251f629c7d37" have entirely different histories.

5 changed files with 2336 additions and 2378 deletions

View File

@ -15,51 +15,59 @@ RV32I:
- JAL:
encoding: 0b00000000000000000000000001101111
mask: 0b00000000000000000000000001111111
attributes: [[name:no_cont]]
size: 32
branch: true
delay: 1
- JALR:
encoding: 0b00000000000000000000000001100111
mask: 0b00000000000000000111000001111111
attributes: [[name:no_cont]]
size: 32
branch: true
delay: 1
- BEQ:
encoding: 0b00000000000000000000000001100011
mask: 0b00000000000000000111000001111111
attributes: [[name:no_cont], [name:cond]]
size: 32
branch: true
delay: 1
delay: [1,1]
- BNE:
encoding: 0b00000000000000000001000001100011
mask: 0b00000000000000000111000001111111
attributes: [[name:no_cont], [name:cond]]
size: 32
branch: true
delay: 1
delay: [1,1]
- BLT:
encoding: 0b00000000000000000100000001100011
mask: 0b00000000000000000111000001111111
attributes: [[name:no_cont], [name:cond]]
size: 32
branch: true
delay: 1
delay: [1,1]
- BGE:
encoding: 0b00000000000000000101000001100011
mask: 0b00000000000000000111000001111111
attributes: [[name:no_cont], [name:cond]]
size: 32
branch: true
delay: 1
delay: [1,1]
- BLTU:
encoding: 0b00000000000000000110000001100011
mask: 0b00000000000000000111000001111111
attributes: [[name:no_cont], [name:cond]]
size: 32
branch: true
delay: 1
delay: [1,1]
- BGEU:
encoding: 0b00000000000000000111000001100011
mask: 0b00000000000000000111000001111111
attributes: [[name:no_cont], [name:cond]]
size: 32
branch: true
delay: 1
delay: [1,1]
- LB:
encoding: 0b00000000000000000000000000000011
mask: 0b00000000000000000111000001111111
@ -231,12 +239,14 @@ RV32I:
- ECALL:
encoding: 0b00000000000000000000000001110011
mask: 0b11111111111111111111111111111111
attributes: [[name:no_cont]]
size: 32
branch: false
delay: 1
- EBREAK:
encoding: 0b00000000000100000000000001110011
mask: 0b11111111111111111111111111111111
attributes: [[name:no_cont]]
size: 32
branch: false
delay: 1
@ -381,6 +391,7 @@ RV32IC:
- CJAL:
encoding: 0b0010000000000001
mask: 0b1110000000000011
attributes: [[name:no_cont]]
size: 16
branch: true
delay: 1
@ -447,21 +458,24 @@ RV32IC:
- CJ:
encoding: 0b1010000000000001
mask: 0b1110000000000011
attributes: [[name:no_cont]]
size: 16
branch: true
delay: 1
- CBEQZ:
encoding: 0b1100000000000001
mask: 0b1110000000000011
attributes: [[name:no_cont], [name:cond]]
size: 16
branch: true
delay: 1
delay: [1,1]
- CBNEZ:
encoding: 0b1110000000000001
mask: 0b1110000000000011
attributes: [[name:no_cont], [name:cond]]
size: 16
branch: true
delay: 1
delay: [1,1]
- CSLLI:
encoding: 0b0000000000000010
mask: 0b1111000000000011
@ -483,6 +497,7 @@ RV32IC:
- CJR:
encoding: 0b1000000000000010
mask: 0b1111000001111111
attributes: [[name:no_cont]]
size: 16
branch: true
delay: 1
@ -495,12 +510,14 @@ RV32IC:
- CJALR:
encoding: 0b1001000000000010
mask: 0b1111000001111111
attributes: [[name:no_cont]]
size: 16
branch: true
delay: 1
- CEBREAK:
encoding: 0b1001000000000010
mask: 0b1111111111111111
attributes: [[name:no_cont]]
size: 16
branch: false
delay: 1
@ -513,6 +530,7 @@ RV32IC:
- DII:
encoding: 0b0000000000000000
mask: 0b1111111111111111
attributes: [[name:no_cont]]
size: 16
branch: false
delay: 1

View File

@ -43,7 +43,6 @@ def nativeTypeSize(int size){
#include <sstream>
#include <boost/coroutine2/all.hpp>
#include <functional>
#include <exception>
#ifndef FMT_HEADER_ONLY
#define FMT_HEADER_ONLY
@ -60,10 +59,6 @@ using namespace iss::arch;
using namespace iss::debugger;
using namespace std::placeholders;
struct memory_access_exception : public std::exception{
memory_access_exception(){}
};
template <typename ARCH> class vm_impl : public iss::interp::vm_base<ARCH> {
public:
using traits = arch::traits<ARCH>;
@ -96,9 +91,30 @@ protected:
inline const char *name(size_t index){return index<traits::reg_aliases.size()?traits::reg_aliases[index]:"illegal";}
typename arch::traits<ARCH>::opcode_e decode_inst_id(code_word_t instr);
virt_addr_t execute_inst(finish_cond_e cond, virt_addr_t start, uint64_t icount_limit) override;
// some compile time constants
// enum { MASK16 = 0b1111110001100011, MASK32 = 0b11111111111100000111000001111111 };
enum { MASK16 = 0b1111111111111111, MASK32 = 0b11111111111100000111000001111111 };
enum { EXTR_MASK16 = MASK16 >> 2, EXTR_MASK32 = MASK32 >> 2 };
enum {
LUT_SIZE = 1 << util::bit_count(static_cast<uint32_t>(EXTR_MASK32)),
LUT_SIZE_C = 1 << util::bit_count(static_cast<uint32_t>(EXTR_MASK16))
};
std::array<compile_func, LUT_SIZE> lut;
std::array<compile_func, LUT_SIZE_C> lut_00, lut_01, lut_10;
std::array<compile_func, LUT_SIZE> lut_11;
struct instruction_pattern {
uint32_t value;
uint32_t mask;
typename arch::traits<ARCH>::opcode_e id;
};
std::array<std::vector<instruction_pattern>, 4> qlut;
inline void raise(uint16_t trap_id, uint16_t cause){
auto trap_val = 0x80ULL << 24 | (cause << 16) | trap_id;
@ -298,30 +314,28 @@ typename vm_base<ARCH>::virt_addr_t vm_impl<ARCH>::execute_inst(finish_cond_e co
// pre execution stuff
this->core.reg.last_branch = 0;
if(this->sync_exec && PRE_SYNC) this->do_sync(PRE_SYNC, static_cast<unsigned>(inst_id));
try{
switch(inst_id){<%instructions.eachWithIndex{instr, idx -> %>
case arch::traits<ARCH>::opcode_e::${instr.name}: {
<%instr.fields.eachLine{%>${it}
<%}%>if(this->disass_enabled){
/* generate console output when executing the command */<%instr.disass.eachLine{%>
${it}<%}%>
}
// used registers<%instr.usedVariables.each{ k,v->
if(v.isArray) {%>
auto* ${k} = reinterpret_cast<uint${nativeTypeSize(v.type.size)}_t*>(this->regs_base_ptr+arch::traits<ARCH>::reg_byte_offsets[arch::traits<ARCH>::${k}0]);<% }else{ %>
auto* ${k} = reinterpret_cast<uint${nativeTypeSize(v.type.size)}_t*>(this->regs_base_ptr+arch::traits<ARCH>::reg_byte_offsets[arch::traits<ARCH>::${k}]);
<%}}%>// calculate next pc value
*NEXT_PC = *PC + ${instr.length/8};
// execute instruction<%instr.behavior.eachLine{%>
switch(inst_id){<%instructions.eachWithIndex{instr, idx -> %>
case arch::traits<ARCH>::opcode_e::${instr.name}: {
<%instr.fields.eachLine{%>${it}
<%}%>if(this->disass_enabled){
/* generate console output when executing the command */<%instr.disass.eachLine{%>
${it}<%}%>
break;
}// @suppress("No break at end of case")<%}%>
default: {
*NEXT_PC = *PC + ((instr & 3) == 3 ? 4 : 2);
raise(0, 2);
}
}
}catch(memory_access_exception& e){}
// used registers<%instr.usedVariables.each{ k,v->
if(v.isArray) {%>
auto* ${k} = reinterpret_cast<uint${nativeTypeSize(v.type.size)}_t*>(this->regs_base_ptr+arch::traits<ARCH>::reg_byte_offsets[arch::traits<ARCH>::${k}0]);<% }else{ %>
auto* ${k} = reinterpret_cast<uint${nativeTypeSize(v.type.size)}_t*>(this->regs_base_ptr+arch::traits<ARCH>::reg_byte_offsets[arch::traits<ARCH>::${k}]);
<%}}%>// calculate next pc value
*NEXT_PC = *PC + ${instr.length/8};
// execute instruction<%instr.behavior.eachLine{%>
${it}<%}%>
TRAP_${instr.name}:break;
}// @suppress("No break at end of case")<%}%>
default: {
*NEXT_PC = *PC + ((instr & 3) == 3 ? 4 : 2);
raise(0, 2);
}
}
// post execution stuff
process_spawn_blocks();
if(this->sync_exec && POST_SYNC) this->do_sync(POST_SYNC, static_cast<unsigned>(inst_id));

View File

@ -167,9 +167,8 @@ private:
auto cur_pc_val = tu.constant(pc.val, traits::reg_bit_widths[traits::PC]);
pc=pc+ ${instr.length/8};
gen_set_pc(tu, pc, traits::NEXT_PC);
tu.open_scope();
<%instr.behavior.eachLine{%>${it}
<%}%>
tu.open_scope();<%instr.behavior.eachLine{%>
${it}<%}%>
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,${idx});
gen_trap_check(tu);

File diff suppressed because it is too large Load Diff

View File

@ -353,7 +353,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,0);
gen_trap_check(tu);
@ -386,7 +385,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,1);
gen_trap_check(tu);
@ -426,7 +424,6 @@ private:
}
}
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,2);
gen_trap_check(tu);
@ -468,7 +465,6 @@ private:
tu.close_scope();
}
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,3);
gen_trap_check(tu);
@ -508,7 +504,6 @@ private:
tu.close_scope();
}
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,4);
gen_trap_check(tu);
@ -548,7 +543,6 @@ private:
tu.close_scope();
}
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,5);
gen_trap_check(tu);
@ -588,7 +582,6 @@ private:
tu.close_scope();
}
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,6);
gen_trap_check(tu);
@ -628,7 +621,6 @@ private:
tu.close_scope();
}
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,7);
gen_trap_check(tu);
@ -668,7 +660,6 @@ private:
tu.close_scope();
}
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,8);
gen_trap_check(tu);
@ -708,7 +699,6 @@ private:
tu.close_scope();
}
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,9);
gen_trap_check(tu);
@ -744,7 +734,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,10);
gen_trap_check(tu);
@ -780,7 +769,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,11);
gen_trap_check(tu);
@ -816,7 +804,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,12);
gen_trap_check(tu);
@ -852,7 +839,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,13);
gen_trap_check(tu);
@ -888,7 +874,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,14);
gen_trap_check(tu);
@ -921,7 +906,6 @@ private:
tu.write_mem(traits::MEM, store_address, tu.ext(tu.load(rs2+ traits::X0, 0),8,true));
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,15);
gen_trap_check(tu);
@ -954,7 +938,6 @@ private:
tu.write_mem(traits::MEM, store_address, tu.ext(tu.load(rs2+ traits::X0, 0),16,true));
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,16);
gen_trap_check(tu);
@ -987,7 +970,6 @@ private:
tu.write_mem(traits::MEM, store_address, tu.ext(tu.load(rs2+ traits::X0, 0),32,true));
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,17);
gen_trap_check(tu);
@ -1021,7 +1003,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,18);
gen_trap_check(tu);
@ -1055,7 +1036,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,19);
gen_trap_check(tu);
@ -1089,7 +1069,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,20);
gen_trap_check(tu);
@ -1123,7 +1102,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,21);
gen_trap_check(tu);
@ -1157,7 +1135,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,22);
gen_trap_check(tu);
@ -1191,7 +1168,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,23);
gen_trap_check(tu);
@ -1225,7 +1201,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,24);
gen_trap_check(tu);
@ -1259,7 +1234,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,25);
gen_trap_check(tu);
@ -1293,7 +1267,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,26);
gen_trap_check(tu);
@ -1327,7 +1300,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,27);
gen_trap_check(tu);
@ -1361,7 +1333,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,28);
gen_trap_check(tu);
@ -1395,7 +1366,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,29);
gen_trap_check(tu);
@ -1429,7 +1399,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,30);
gen_trap_check(tu);
@ -1463,7 +1432,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,31);
gen_trap_check(tu);
@ -1497,7 +1465,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,32);
gen_trap_check(tu);
@ -1531,7 +1498,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,33);
gen_trap_check(tu);
@ -1565,7 +1531,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,34);
gen_trap_check(tu);
@ -1599,7 +1564,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,35);
gen_trap_check(tu);
@ -1633,7 +1597,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,36);
gen_trap_check(tu);
@ -1662,7 +1625,6 @@ private:
tu.open_scope();
tu.write_mem(traits::FENCE, static_cast<uint32_t>(traits:: fence), tu.constant((uint8_t)pred<< 4|succ,8));
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,37);
gen_trap_check(tu);
@ -1683,7 +1645,6 @@ private:
tu.open_scope();
this->gen_raise_trap(tu, 0, 11);
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,38);
gen_trap_check(tu);
@ -1704,7 +1665,6 @@ private:
tu.open_scope();
this->gen_raise_trap(tu, 0, 3);
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,39);
gen_trap_check(tu);
@ -1725,7 +1685,6 @@ private:
tu.open_scope();
this->gen_leave_trap(tu, 3);
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,40);
gen_trap_check(tu);
@ -1746,7 +1705,6 @@ private:
tu.open_scope();
this->gen_wait(tu, 1);
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,41);
gen_trap_check(tu);
@ -1785,7 +1743,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,42);
gen_trap_check(tu);
@ -1824,7 +1781,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,43);
gen_trap_check(tu);
@ -1863,7 +1819,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,44);
gen_trap_check(tu);
@ -1899,7 +1854,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,45);
gen_trap_check(tu);
@ -1937,7 +1891,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,46);
gen_trap_check(tu);
@ -1975,7 +1928,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,47);
gen_trap_check(tu);
@ -2002,7 +1954,6 @@ private:
tu.open_scope();
tu.write_mem(traits::FENCE, static_cast<uint32_t>(traits:: fencei), tu.constant(imm,16));
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,48);
gen_trap_check(tu);
@ -2037,7 +1988,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,49);
gen_trap_check(tu);
@ -2072,7 +2022,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,50);
gen_trap_check(tu);
@ -2107,7 +2056,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,51);
gen_trap_check(tu);
@ -2142,7 +2090,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,52);
gen_trap_check(tu);
@ -2186,7 +2133,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,53);
gen_trap_check(tu);
@ -2226,7 +2172,6 @@ private:
tu.close_scope();
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,54);
gen_trap_check(tu);
@ -2273,7 +2218,6 @@ private:
tu.close_scope();
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,55);
gen_trap_check(tu);
@ -2313,7 +2257,6 @@ private:
tu.close_scope();
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,56);
gen_trap_check(tu);
@ -2344,7 +2287,6 @@ private:
this->gen_raise_trap(tu, 0, 2);
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,57);
gen_trap_check(tu);
@ -2372,7 +2314,6 @@ private:
auto offs = tu.assignment(tu.ext((tu.add(tu.load(rs1+ 8+ traits::X0, 0),tu.constant(uimm,8))),32,true),32);
tu.store(rd+ 8 + traits::X0,tu.ext(tu.ext(tu.read_mem(traits::MEM, offs, 32),32,false),32,true));
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,58);
gen_trap_check(tu);
@ -2400,7 +2341,6 @@ private:
auto offs = tu.assignment(tu.ext((tu.add(tu.load(rs1+ 8+ traits::X0, 0),tu.constant(uimm,8))),32,true),32);
tu.write_mem(traits::MEM, offs, tu.ext(tu.load(rs2+ 8+ traits::X0, 0),32,true));
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,59);
gen_trap_check(tu);
@ -2433,7 +2373,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,60);
gen_trap_check(tu);
@ -2454,7 +2393,6 @@ private:
gen_set_pc(tu, pc, traits::NEXT_PC);
tu.open_scope();
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,61);
gen_trap_check(tu);
@ -2482,7 +2420,6 @@ private:
tu.store(traits::NEXT_PC, PC_val_v);
tu.store(traits::LAST_BRANCH, tu.constant(2U, 2));
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,62);
gen_trap_check(tu);
@ -2515,7 +2452,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,63);
gen_trap_check(tu);
@ -2546,7 +2482,6 @@ private:
tu.store(rd + traits::X0,tu.constant((uint32_t)((int32_t)sext<18>(imm)),32));
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,64);
gen_trap_check(tu);
@ -2576,7 +2511,6 @@ private:
this->gen_raise_trap(tu, 0, 2);
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,65);
gen_trap_check(tu);
@ -2598,7 +2532,6 @@ private:
tu.open_scope();
this->gen_raise_trap(tu, 0, 2);
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,66);
gen_trap_check(tu);
@ -2624,7 +2557,6 @@ private:
tu.open_scope();
tu.store(rs1+ 8 + traits::X0,tu.lshr(tu.load(rs1+ 8+ traits::X0, 0),tu.constant(shamt,8)));
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,67);
gen_trap_check(tu);
@ -2655,7 +2587,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,68);
gen_trap_check(tu);
@ -2681,7 +2612,6 @@ private:
tu.open_scope();
tu.store(rs1+ 8 + traits::X0,tu.ext((tu.bitwise_and(tu.load(rs1+ 8+ traits::X0, 0),tu.constant((int8_t)sext<6>(imm),8))),32,true));
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,69);
gen_trap_check(tu);
@ -2707,7 +2637,6 @@ private:
tu.open_scope();
tu.store(rd+ 8 + traits::X0,tu.ext((tu.sub(tu.load(rd+ 8+ traits::X0, 0),tu.load(rs2+ 8+ traits::X0, 0))),32,true));
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,70);
gen_trap_check(tu);
@ -2733,7 +2662,6 @@ private:
tu.open_scope();
tu.store(rd+ 8 + traits::X0,tu.bitwise_xor(tu.load(rd+ 8+ traits::X0, 0),tu.load(rs2+ 8+ traits::X0, 0)));
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,71);
gen_trap_check(tu);
@ -2759,7 +2687,6 @@ private:
tu.open_scope();
tu.store(rd+ 8 + traits::X0,tu.bitwise_or(tu.load(rd+ 8+ traits::X0, 0),tu.load(rs2+ 8+ traits::X0, 0)));
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,72);
gen_trap_check(tu);
@ -2785,7 +2712,6 @@ private:
tu.open_scope();
tu.store(rd+ 8 + traits::X0,tu.bitwise_and(tu.load(rd+ 8+ traits::X0, 0),tu.load(rs2+ 8+ traits::X0, 0)));
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,73);
gen_trap_check(tu);
@ -2812,7 +2738,6 @@ private:
tu.store(traits::NEXT_PC, PC_val_v);
tu.store(traits::LAST_BRANCH, tu.constant(2U, 2));
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,74);
gen_trap_check(tu);
@ -2842,7 +2767,6 @@ private:
tu.store(traits::LAST_BRANCH, tu.constant(2U, 2));
tu.close_scope();
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,75);
gen_trap_check(tu);
@ -2872,7 +2796,6 @@ private:
tu.store(traits::LAST_BRANCH, tu.constant(2U, 2));
tu.close_scope();
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,76);
gen_trap_check(tu);
@ -2905,7 +2828,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,77);
gen_trap_check(tu);
@ -2937,7 +2859,6 @@ private:
tu.store(rd + traits::X0,tu.ext(tu.ext(tu.read_mem(traits::MEM, offs, 32),32,false),32,true));
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,78);
gen_trap_check(tu);
@ -2970,7 +2891,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,79);
gen_trap_check(tu);
@ -3002,7 +2922,6 @@ private:
this->gen_raise_trap(tu, 0, 2);
}
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,80);
gen_trap_check(tu);
@ -3023,7 +2942,6 @@ private:
tu.open_scope();
this->gen_raise_trap(tu, 0, 2);
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,81);
gen_trap_check(tu);
@ -3056,7 +2974,6 @@ private:
}
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,82);
gen_trap_check(tu);
@ -3090,7 +3007,6 @@ private:
tu.store(traits::LAST_BRANCH, tu.constant(2U, 2));
}
auto returnValue = std::make_tuple(BRANCH);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,83);
gen_trap_check(tu);
@ -3111,7 +3027,6 @@ private:
tu.open_scope();
this->gen_raise_trap(tu, 0, 3);
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,84);
gen_trap_check(tu);
@ -3143,7 +3058,6 @@ private:
tu.write_mem(traits::MEM, offs, tu.ext(tu.load(rs2+ traits::X0, 0),32,true));
}
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,85);
gen_trap_check(tu);
@ -3164,7 +3078,6 @@ private:
tu.open_scope();
this->gen_raise_trap(tu, 0, 2);
auto returnValue = std::make_tuple(CONT);
tu.close_scope();
vm_base<ARCH>::gen_sync(tu, POST_SYNC,86);
gen_trap_check(tu);