Compare commits
	
		
			3 Commits
		
	
	
		
			212fb1c8ff
			...
			417076f8e6
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 417076f8e6 | |||
| 70839bbbf2 | |||
| 8db0cc5d05 | 
| @@ -1,86 +0,0 @@ | |||||||
| #include "${coreDef.name.toLowerCase()}.h" |  | ||||||
| #include <vector> |  | ||||||
| #include <array> |  | ||||||
| #include <cstdlib> |  | ||||||
| #include <algorithm> |  | ||||||
|  |  | ||||||
| namespace iss { |  | ||||||
| namespace arch { |  | ||||||
| namespace { |  | ||||||
| // according to |  | ||||||
| // https://stackoverflow.com/questions/8871204/count-number-of-1s-in-binary-representation |  | ||||||
| #ifdef __GCC__ |  | ||||||
| constexpr size_t bit_count(uint32_t u) { return __builtin_popcount(u); } |  | ||||||
| #elif __cplusplus < 201402L |  | ||||||
| constexpr size_t uCount(uint32_t u) { return u - ((u >> 1) & 033333333333) - ((u >> 2) & 011111111111); } |  | ||||||
| constexpr size_t bit_count(uint32_t u) { return ((uCount(u) + (uCount(u) >> 3)) & 030707070707) % 63; } |  | ||||||
| #else |  | ||||||
| constexpr size_t bit_count(uint32_t u) { |  | ||||||
|     size_t uCount = u - ((u >> 1) & 033333333333) - ((u >> 2) & 011111111111); |  | ||||||
|     return ((uCount + (uCount >> 3)) & 030707070707) % 63; |  | ||||||
| } |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| using opcode_e = traits<${coreDef.name.toLowerCase()}>::opcode_e; |  | ||||||
|  |  | ||||||
| /**************************************************************************** |  | ||||||
|  * start opcode definitions |  | ||||||
|  ****************************************************************************/ |  | ||||||
| struct instruction_desriptor { |  | ||||||
|     size_t length; |  | ||||||
|     uint32_t value; |  | ||||||
|     uint32_t mask; |  | ||||||
|     opcode_e op; |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| const std::array<instruction_desriptor, ${instructions.size}> instr_descr = {{ |  | ||||||
|      /* entries are: size, valid value, valid mask, function ptr */<%instructions.each{instr -> %> |  | ||||||
|     {${instr.length}, ${instr.encoding}, ${instr.mask}, opcode_e::${instr.instruction.name}},<%}%> |  | ||||||
| }}; |  | ||||||
|  |  | ||||||
| } |  | ||||||
|  |  | ||||||
| template<> |  | ||||||
| struct instruction_decoder<${coreDef.name.toLowerCase()}> { |  | ||||||
|     using opcode_e = traits<${coreDef.name.toLowerCase()}>::opcode_e; |  | ||||||
|     using code_word_t=traits<${coreDef.name.toLowerCase()}>::code_word_t; |  | ||||||
|  |  | ||||||
|     struct instruction_pattern { |  | ||||||
|         uint32_t value; |  | ||||||
|         uint32_t mask; |  | ||||||
|         opcode_e id; |  | ||||||
|     }; |  | ||||||
|  |  | ||||||
|     std::array<std::vector<instruction_pattern>, 4> qlut; |  | ||||||
|  |  | ||||||
|     template<typename T> |  | ||||||
|     unsigned decode_instruction(T); |  | ||||||
|  |  | ||||||
|     instruction_decoder() { |  | ||||||
|         for (auto instr : instr_descr) { |  | ||||||
|             auto quadrant = instr.value & 0x3; |  | ||||||
|             qlut[quadrant].push_back(instruction_pattern{instr.value, instr.mask, instr.op}); |  | ||||||
|         } |  | ||||||
|         for(auto& lut: qlut){ |  | ||||||
|             std::sort(std::begin(lut), std::end(lut), [](instruction_pattern const& a, instruction_pattern const& b){ |  | ||||||
|                 return bit_count(a.mask) < bit_count(b.mask); |  | ||||||
|             }); |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| template<> |  | ||||||
| unsigned instruction_decoder<${coreDef.name.toLowerCase()}>::decode_instruction<traits<${coreDef.name.toLowerCase()}>::code_word_t>(traits<${coreDef.name.toLowerCase()}>::code_word_t instr){ |  | ||||||
|     auto res = std::find_if(std::begin(qlut[instr&0x3]), std::end(qlut[instr&0x3]), [instr](instruction_pattern const& e){ |  | ||||||
|         return !((instr&e.mask) ^ e.value ); |  | ||||||
|     }); |  | ||||||
|     return static_cast<unsigned>(res!=std::end(qlut[instr&0x3])? res->id : opcode_e::MAX_OPCODE); |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  |  | ||||||
| std::unique_ptr<instruction_decoder<${coreDef.name.toLowerCase()}>> traits<${coreDef.name.toLowerCase()}>::get_decoder(){ |  | ||||||
|     return std::make_unique<instruction_decoder<${coreDef.name.toLowerCase()}>>(); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| } |  | ||||||
| } |  | ||||||
| @@ -172,8 +172,8 @@ private: | |||||||
|         <%instr.behavior.eachLine{%>${it} |         <%instr.behavior.eachLine{%>${it} | ||||||
|         <%}%> |         <%}%> | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,${idx}); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,${idx}); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|     <%}%> |     <%}%> | ||||||
| @@ -306,6 +306,7 @@ template <typename ARCH> void vm_impl<ARCH>::gen_wait(tu_builder& tu, unsigned t | |||||||
|  |  | ||||||
| template <typename ARCH> void vm_impl<ARCH>::gen_trap_behavior(tu_builder& tu) { | template <typename ARCH> void vm_impl<ARCH>::gen_trap_behavior(tu_builder& tu) { | ||||||
|     tu("trap_entry:"); |     tu("trap_entry:"); | ||||||
|  |     this->gen_sync(tu, POST_SYNC, -1);     | ||||||
|     tu("enter_trap(core_ptr, *trap_state, *pc, 0);"); |     tu("enter_trap(core_ptr, *trap_state, *pc, 0);"); | ||||||
|     tu.store(traits::LAST_BRANCH, tu.constant(std::numeric_limits<uint32_t>::max(),32)); |     tu.store(traits::LAST_BRANCH, tu.constant(std::numeric_limits<uint32_t>::max(),32)); | ||||||
|     tu("return *next_pc;"); |     tu("return *next_pc;"); | ||||||
|   | |||||||
| @@ -1,175 +0,0 @@ | |||||||
| #include "tgc_c.h" |  | ||||||
| #include <vector> |  | ||||||
| #include <array> |  | ||||||
| #include <cstdlib> |  | ||||||
| #include <algorithm> |  | ||||||
|  |  | ||||||
| namespace iss { |  | ||||||
| namespace arch { |  | ||||||
| namespace { |  | ||||||
| // according to |  | ||||||
| // https://stackoverflow.com/questions/8871204/count-number-of-1s-in-binary-representation |  | ||||||
| #ifdef __GCC__ |  | ||||||
| constexpr size_t bit_count(uint32_t u) { return __builtin_popcount(u); } |  | ||||||
| #elif __cplusplus < 201402L |  | ||||||
| constexpr size_t uCount(uint32_t u) { return u - ((u >> 1) & 033333333333) - ((u >> 2) & 011111111111); } |  | ||||||
| constexpr size_t bit_count(uint32_t u) { return ((uCount(u) + (uCount(u) >> 3)) & 030707070707) % 63; } |  | ||||||
| #else |  | ||||||
| constexpr size_t bit_count(uint32_t u) { |  | ||||||
|     size_t uCount = u - ((u >> 1) & 033333333333) - ((u >> 2) & 011111111111); |  | ||||||
|     return ((uCount + (uCount >> 3)) & 030707070707) % 63; |  | ||||||
| } |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| using opcode_e = traits<tgc_c>::opcode_e; |  | ||||||
|  |  | ||||||
| /**************************************************************************** |  | ||||||
|  * start opcode definitions |  | ||||||
|  ****************************************************************************/ |  | ||||||
| struct instruction_desriptor { |  | ||||||
|     size_t length; |  | ||||||
|     uint32_t value; |  | ||||||
|     uint32_t mask; |  | ||||||
|     opcode_e op; |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| const std::array<instruction_desriptor, 90> instr_descr = {{ |  | ||||||
|      /* entries are: size, valid value, valid mask, function ptr */ |  | ||||||
|     {32, 0b00000000000000000000000000110111, 0b00000000000000000000000001111111, opcode_e::LUI}, |  | ||||||
|     {32, 0b00000000000000000000000000010111, 0b00000000000000000000000001111111, opcode_e::AUIPC}, |  | ||||||
|     {32, 0b00000000000000000000000001101111, 0b00000000000000000000000001111111, opcode_e::JAL}, |  | ||||||
|     {32, 0b00000000000000000000000001100111, 0b00000000000000000111000001111111, opcode_e::JALR}, |  | ||||||
|     {32, 0b00000000000000000000000001100011, 0b00000000000000000111000001111111, opcode_e::BEQ}, |  | ||||||
|     {32, 0b00000000000000000001000001100011, 0b00000000000000000111000001111111, opcode_e::BNE}, |  | ||||||
|     {32, 0b00000000000000000100000001100011, 0b00000000000000000111000001111111, opcode_e::BLT}, |  | ||||||
|     {32, 0b00000000000000000101000001100011, 0b00000000000000000111000001111111, opcode_e::BGE}, |  | ||||||
|     {32, 0b00000000000000000110000001100011, 0b00000000000000000111000001111111, opcode_e::BLTU}, |  | ||||||
|     {32, 0b00000000000000000111000001100011, 0b00000000000000000111000001111111, opcode_e::BGEU}, |  | ||||||
|     {32, 0b00000000000000000000000000000011, 0b00000000000000000111000001111111, opcode_e::LB}, |  | ||||||
|     {32, 0b00000000000000000001000000000011, 0b00000000000000000111000001111111, opcode_e::LH}, |  | ||||||
|     {32, 0b00000000000000000010000000000011, 0b00000000000000000111000001111111, opcode_e::LW}, |  | ||||||
|     {32, 0b00000000000000000100000000000011, 0b00000000000000000111000001111111, opcode_e::LBU}, |  | ||||||
|     {32, 0b00000000000000000101000000000011, 0b00000000000000000111000001111111, opcode_e::LHU}, |  | ||||||
|     {32, 0b00000000000000000000000000100011, 0b00000000000000000111000001111111, opcode_e::SB}, |  | ||||||
|     {32, 0b00000000000000000001000000100011, 0b00000000000000000111000001111111, opcode_e::SH}, |  | ||||||
|     {32, 0b00000000000000000010000000100011, 0b00000000000000000111000001111111, opcode_e::SW}, |  | ||||||
|     {32, 0b00000000000000000000000000010011, 0b00000000000000000111000001111111, opcode_e::ADDI}, |  | ||||||
|     {32, 0b00000000000000000010000000010011, 0b00000000000000000111000001111111, opcode_e::SLTI}, |  | ||||||
|     {32, 0b00000000000000000011000000010011, 0b00000000000000000111000001111111, opcode_e::SLTIU}, |  | ||||||
|     {32, 0b00000000000000000100000000010011, 0b00000000000000000111000001111111, opcode_e::XORI}, |  | ||||||
|     {32, 0b00000000000000000110000000010011, 0b00000000000000000111000001111111, opcode_e::ORI}, |  | ||||||
|     {32, 0b00000000000000000111000000010011, 0b00000000000000000111000001111111, opcode_e::ANDI}, |  | ||||||
|     {32, 0b00000000000000000001000000010011, 0b11111110000000000111000001111111, opcode_e::SLLI}, |  | ||||||
|     {32, 0b00000000000000000101000000010011, 0b11111110000000000111000001111111, opcode_e::SRLI}, |  | ||||||
|     {32, 0b01000000000000000101000000010011, 0b11111110000000000111000001111111, opcode_e::SRAI}, |  | ||||||
|     {32, 0b00000000000000000000000000110011, 0b11111110000000000111000001111111, opcode_e::ADD}, |  | ||||||
|     {32, 0b01000000000000000000000000110011, 0b11111110000000000111000001111111, opcode_e::SUB}, |  | ||||||
|     {32, 0b00000000000000000001000000110011, 0b11111110000000000111000001111111, opcode_e::SLL}, |  | ||||||
|     {32, 0b00000000000000000010000000110011, 0b11111110000000000111000001111111, opcode_e::SLT}, |  | ||||||
|     {32, 0b00000000000000000011000000110011, 0b11111110000000000111000001111111, opcode_e::SLTU}, |  | ||||||
|     {32, 0b00000000000000000100000000110011, 0b11111110000000000111000001111111, opcode_e::XOR}, |  | ||||||
|     {32, 0b00000000000000000101000000110011, 0b11111110000000000111000001111111, opcode_e::SRL}, |  | ||||||
|     {32, 0b01000000000000000101000000110011, 0b11111110000000000111000001111111, opcode_e::SRA}, |  | ||||||
|     {32, 0b00000000000000000110000000110011, 0b11111110000000000111000001111111, opcode_e::OR}, |  | ||||||
|     {32, 0b00000000000000000111000000110011, 0b11111110000000000111000001111111, opcode_e::AND}, |  | ||||||
|     {32, 0b00000000000000000000000000001111, 0b00000000000000000111000001111111, opcode_e::FENCE}, |  | ||||||
|     {32, 0b00000000000000000000000001110011, 0b11111111111111111111111111111111, opcode_e::ECALL}, |  | ||||||
|     {32, 0b00000000000100000000000001110011, 0b11111111111111111111111111111111, opcode_e::EBREAK}, |  | ||||||
|     {32, 0b00000000001000000000000001110011, 0b11111111111111111111111111111111, opcode_e::URET}, |  | ||||||
|     {32, 0b00010000001000000000000001110011, 0b11111111111111111111111111111111, opcode_e::SRET}, |  | ||||||
|     {32, 0b00110000001000000000000001110011, 0b11111111111111111111111111111111, opcode_e::MRET}, |  | ||||||
|     {32, 0b00010000010100000000000001110011, 0b11111111111111111111111111111111, opcode_e::WFI}, |  | ||||||
|     {32, 0b01111011001000000000000001110011, 0b11111111111111111111111111111111, opcode_e::DRET}, |  | ||||||
|     {32, 0b00000000000000000001000001110011, 0b00000000000000000111000001111111, opcode_e::CSRRW}, |  | ||||||
|     {32, 0b00000000000000000010000001110011, 0b00000000000000000111000001111111, opcode_e::CSRRS}, |  | ||||||
|     {32, 0b00000000000000000011000001110011, 0b00000000000000000111000001111111, opcode_e::CSRRC}, |  | ||||||
|     {32, 0b00000000000000000101000001110011, 0b00000000000000000111000001111111, opcode_e::CSRRWI}, |  | ||||||
|     {32, 0b00000000000000000110000001110011, 0b00000000000000000111000001111111, opcode_e::CSRRSI}, |  | ||||||
|     {32, 0b00000000000000000111000001110011, 0b00000000000000000111000001111111, opcode_e::CSRRCI}, |  | ||||||
|     {32, 0b00000000000000000001000000001111, 0b00000000000000000111000001111111, opcode_e::FENCE_I}, |  | ||||||
|     {32, 0b00000010000000000000000000110011, 0b11111110000000000111000001111111, opcode_e::MUL}, |  | ||||||
|     {32, 0b00000010000000000001000000110011, 0b11111110000000000111000001111111, opcode_e::MULH}, |  | ||||||
|     {32, 0b00000010000000000010000000110011, 0b11111110000000000111000001111111, opcode_e::MULHSU}, |  | ||||||
|     {32, 0b00000010000000000011000000110011, 0b11111110000000000111000001111111, opcode_e::MULHU}, |  | ||||||
|     {32, 0b00000010000000000100000000110011, 0b11111110000000000111000001111111, opcode_e::DIV}, |  | ||||||
|     {32, 0b00000010000000000101000000110011, 0b11111110000000000111000001111111, opcode_e::DIVU}, |  | ||||||
|     {32, 0b00000010000000000110000000110011, 0b11111110000000000111000001111111, opcode_e::REM}, |  | ||||||
|     {32, 0b00000010000000000111000000110011, 0b11111110000000000111000001111111, opcode_e::REMU}, |  | ||||||
|     {16, 0b0000000000000000, 0b1110000000000011, opcode_e::CADDI4SPN}, |  | ||||||
|     {16, 0b0100000000000000, 0b1110000000000011, opcode_e::CLW}, |  | ||||||
|     {16, 0b1100000000000000, 0b1110000000000011, opcode_e::CSW}, |  | ||||||
|     {16, 0b0000000000000001, 0b1110000000000011, opcode_e::CADDI}, |  | ||||||
|     {16, 0b0000000000000001, 0b1110111110000011, opcode_e::CNOP}, |  | ||||||
|     {16, 0b0010000000000001, 0b1110000000000011, opcode_e::CJAL}, |  | ||||||
|     {16, 0b0100000000000001, 0b1110000000000011, opcode_e::CLI}, |  | ||||||
|     {16, 0b0110000000000001, 0b1110000000000011, opcode_e::CLUI}, |  | ||||||
|     {16, 0b0110000100000001, 0b1110111110000011, opcode_e::CADDI16SP}, |  | ||||||
|     {16, 0b0110000000000001, 0b1111000001111111, opcode_e::__reserved_clui}, |  | ||||||
|     {16, 0b1000000000000001, 0b1111110000000011, opcode_e::CSRLI}, |  | ||||||
|     {16, 0b1000010000000001, 0b1111110000000011, opcode_e::CSRAI}, |  | ||||||
|     {16, 0b1000100000000001, 0b1110110000000011, opcode_e::CANDI}, |  | ||||||
|     {16, 0b1000110000000001, 0b1111110001100011, opcode_e::CSUB}, |  | ||||||
|     {16, 0b1000110000100001, 0b1111110001100011, opcode_e::CXOR}, |  | ||||||
|     {16, 0b1000110001000001, 0b1111110001100011, opcode_e::COR}, |  | ||||||
|     {16, 0b1000110001100001, 0b1111110001100011, opcode_e::CAND}, |  | ||||||
|     {16, 0b1010000000000001, 0b1110000000000011, opcode_e::CJ}, |  | ||||||
|     {16, 0b1100000000000001, 0b1110000000000011, opcode_e::CBEQZ}, |  | ||||||
|     {16, 0b1110000000000001, 0b1110000000000011, opcode_e::CBNEZ}, |  | ||||||
|     {16, 0b0000000000000010, 0b1111000000000011, opcode_e::CSLLI}, |  | ||||||
|     {16, 0b0100000000000010, 0b1110000000000011, opcode_e::CLWSP}, |  | ||||||
|     {16, 0b1000000000000010, 0b1111000000000011, opcode_e::CMV}, |  | ||||||
|     {16, 0b1000000000000010, 0b1111000001111111, opcode_e::CJR}, |  | ||||||
|     {16, 0b1000000000000010, 0b1111111111111111, opcode_e::__reserved_cmv}, |  | ||||||
|     {16, 0b1001000000000010, 0b1111000000000011, opcode_e::CADD}, |  | ||||||
|     {16, 0b1001000000000010, 0b1111000001111111, opcode_e::CJALR}, |  | ||||||
|     {16, 0b1001000000000010, 0b1111111111111111, opcode_e::CEBREAK}, |  | ||||||
|     {16, 0b1100000000000010, 0b1110000000000011, opcode_e::CSWSP}, |  | ||||||
|     {16, 0b0000000000000000, 0b1111111111111111, opcode_e::DII}, |  | ||||||
| }}; |  | ||||||
|  |  | ||||||
| } |  | ||||||
|  |  | ||||||
| template<> |  | ||||||
| struct instruction_decoder<tgc_c> { |  | ||||||
|     using opcode_e = traits<tgc_c>::opcode_e; |  | ||||||
|     using code_word_t=traits<tgc_c>::code_word_t; |  | ||||||
|  |  | ||||||
|     struct instruction_pattern { |  | ||||||
|         uint32_t value; |  | ||||||
|         uint32_t mask; |  | ||||||
|         opcode_e id; |  | ||||||
|     }; |  | ||||||
|  |  | ||||||
|     std::array<std::vector<instruction_pattern>, 4> qlut; |  | ||||||
|  |  | ||||||
|     template<typename T> |  | ||||||
|     unsigned decode_instruction(T); |  | ||||||
|  |  | ||||||
|     instruction_decoder() { |  | ||||||
|         for (auto instr : instr_descr) { |  | ||||||
|             auto quadrant = instr.value & 0x3; |  | ||||||
|             qlut[quadrant].push_back(instruction_pattern{instr.value, instr.mask, instr.op}); |  | ||||||
|         } |  | ||||||
|         for(auto& lut: qlut){ |  | ||||||
|             std::sort(std::begin(lut), std::end(lut), [](instruction_pattern const& a, instruction_pattern const& b){ |  | ||||||
|                 return bit_count(a.mask) > bit_count(b.mask); |  | ||||||
|             }); |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| template<> |  | ||||||
| unsigned instruction_decoder<tgc_c>::decode_instruction<traits<tgc_c>::code_word_t>(traits<tgc_c>::code_word_t instr){ |  | ||||||
|     auto res = std::find_if(std::begin(qlut[instr&0x3]), std::end(qlut[instr&0x3]), [instr](instruction_pattern const& e){ |  | ||||||
|         return !((instr&e.mask) ^ e.value ); |  | ||||||
|     }); |  | ||||||
|     return static_cast<unsigned>(res!=std::end(qlut[instr&0x3])? res->id : opcode_e::MAX_OPCODE); |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  |  | ||||||
| std::unique_ptr<instruction_decoder<tgc_c>> traits<tgc_c>::get_decoder(){ |  | ||||||
|     return std::make_unique<instruction_decoder<tgc_c>>(); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| } |  | ||||||
| } |  | ||||||
| @@ -2218,8 +2218,8 @@ private: | |||||||
|         pc=pc+ 4; |         pc=pc+ 4; | ||||||
|         this->gen_set_pc(pc, traits::NEXT_PC); |         this->gen_set_pc(pc, traits::NEXT_PC); | ||||||
|         this->gen_raise_trap(0,  11); |         this->gen_raise_trap(0,  11); | ||||||
|         bb = BasicBlock::Create(this->mod->getContext(), "entry", this->func, this->leave_blk); |         bb = this->leave_blk; | ||||||
|         auto returnValue = std::make_tuple(CONT,bb); |         auto returnValue = std::make_tuple(TRAP,nullptr); | ||||||
|          |          | ||||||
|         this->gen_trap_check(bb); |         this->gen_trap_check(bb); | ||||||
|     	this->gen_sync(POST_SYNC, 38); |     	this->gen_sync(POST_SYNC, 38); | ||||||
| @@ -2240,8 +2240,8 @@ private: | |||||||
|         pc=pc+ 4; |         pc=pc+ 4; | ||||||
|         this->gen_set_pc(pc, traits::NEXT_PC); |         this->gen_set_pc(pc, traits::NEXT_PC); | ||||||
|         this->gen_raise_trap(0,  3); |         this->gen_raise_trap(0,  3); | ||||||
|         bb = BasicBlock::Create(this->mod->getContext(), "entry", this->func, this->leave_blk); |         bb = this->leave_blk; | ||||||
|         auto returnValue = std::make_tuple(CONT,bb); |         auto returnValue = std::make_tuple(TRAP,nullptr); | ||||||
|          |          | ||||||
|         this->gen_trap_check(bb); |         this->gen_trap_check(bb); | ||||||
|     	this->gen_sync(POST_SYNC, 39); |     	this->gen_sync(POST_SYNC, 39); | ||||||
| @@ -2262,8 +2262,8 @@ private: | |||||||
|         pc=pc+ 4; |         pc=pc+ 4; | ||||||
|         this->gen_set_pc(pc, traits::NEXT_PC); |         this->gen_set_pc(pc, traits::NEXT_PC); | ||||||
|         this->gen_leave_trap(3); |         this->gen_leave_trap(3); | ||||||
|         bb = BasicBlock::Create(this->mod->getContext(), "entry", this->func, this->leave_blk); |         bb = this->leave_blk; | ||||||
|         auto returnValue = std::make_tuple(CONT,bb); |         auto returnValue = std::make_tuple(TRAP,nullptr); | ||||||
|          |          | ||||||
|         this->gen_trap_check(bb); |         this->gen_trap_check(bb); | ||||||
|     	this->gen_sync(POST_SYNC, 40); |     	this->gen_sync(POST_SYNC, 40); | ||||||
| @@ -4282,8 +4282,8 @@ private: | |||||||
|         pc=pc+ 2; |         pc=pc+ 2; | ||||||
|         this->gen_set_pc(pc, traits::NEXT_PC); |         this->gen_set_pc(pc, traits::NEXT_PC); | ||||||
|         this->gen_raise_trap(0,  3); |         this->gen_raise_trap(0,  3); | ||||||
|         bb = BasicBlock::Create(this->mod->getContext(), "entry", this->func, this->leave_blk); |         bb = this->leave_blk; | ||||||
|         auto returnValue = std::make_tuple(CONT,bb); |         auto returnValue = std::make_tuple(TRAP,nullptr); | ||||||
|          |          | ||||||
|         this->gen_trap_check(bb); |         this->gen_trap_check(bb); | ||||||
|     	this->gen_sync(POST_SYNC, 84); |     	this->gen_sync(POST_SYNC, 84); | ||||||
| @@ -4351,8 +4351,8 @@ private: | |||||||
|         pc=pc+ 2; |         pc=pc+ 2; | ||||||
|         this->gen_set_pc(pc, traits::NEXT_PC); |         this->gen_set_pc(pc, traits::NEXT_PC); | ||||||
|         this->gen_raise_trap(0,  2); |         this->gen_raise_trap(0,  2); | ||||||
|         bb = BasicBlock::Create(this->mod->getContext(), "entry", this->func, this->leave_blk); |         bb = this->leave_blk; | ||||||
|         auto returnValue = std::make_tuple(CONT,bb); |         auto returnValue = std::make_tuple(TRAP,nullptr); | ||||||
|          |          | ||||||
|         this->gen_trap_check(bb); |         this->gen_trap_check(bb); | ||||||
|     	this->gen_sync(POST_SYNC, 86); |     	this->gen_sync(POST_SYNC, 86); | ||||||
|   | |||||||
| @@ -357,8 +357,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,0); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,0); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -392,8 +392,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,1); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,1); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -434,8 +434,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,2); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,2); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -485,8 +485,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,3); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,3); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -528,8 +528,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,4); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,4); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -571,8 +571,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,5); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,5); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -614,8 +614,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,6); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,6); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -657,8 +657,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,7); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,7); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -700,8 +700,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,8); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,8); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -743,8 +743,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,9); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,9); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -783,8 +783,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,10); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,10); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -823,8 +823,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,11); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,11); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -863,8 +863,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,12); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,12); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -903,8 +903,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,13); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,13); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -943,8 +943,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,14); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,14); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -979,8 +979,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,15); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,15); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1015,8 +1015,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,16); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,16); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1051,8 +1051,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,17); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,17); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1089,8 +1089,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,18); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,18); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1127,8 +1127,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,19); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,19); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1165,8 +1165,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,20); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,20); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1203,8 +1203,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,21); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,21); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1241,8 +1241,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,22); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,22); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1279,8 +1279,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,23); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,23); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1317,8 +1317,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,24); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,24); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1355,8 +1355,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,25); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,25); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1393,8 +1393,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,26); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,26); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1431,8 +1431,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,27); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,27); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1469,8 +1469,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,28); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,28); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1509,8 +1509,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,29); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,29); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1547,8 +1547,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,30); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,30); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1585,8 +1585,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,31); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,31); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1623,8 +1623,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,32); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,32); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1663,8 +1663,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,33); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,33); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1703,8 +1703,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,34); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,34); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1741,8 +1741,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,35); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,35); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1779,8 +1779,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,36); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,36); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1809,8 +1809,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,37); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,37); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1828,11 +1828,11 @@ private: | |||||||
|         gen_set_pc(tu, pc, traits::NEXT_PC); |         gen_set_pc(tu, pc, traits::NEXT_PC); | ||||||
|         tu.open_scope(); |         tu.open_scope(); | ||||||
|         this->gen_raise_trap(tu, 0,  11); |         this->gen_raise_trap(tu, 0,  11); | ||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(TRAP); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,38); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,38); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1850,11 +1850,11 @@ private: | |||||||
|         gen_set_pc(tu, pc, traits::NEXT_PC); |         gen_set_pc(tu, pc, traits::NEXT_PC); | ||||||
|         tu.open_scope(); |         tu.open_scope(); | ||||||
|         this->gen_raise_trap(tu, 0,  3); |         this->gen_raise_trap(tu, 0,  3); | ||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(TRAP); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,39); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,39); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1872,11 +1872,11 @@ private: | |||||||
|         gen_set_pc(tu, pc, traits::NEXT_PC); |         gen_set_pc(tu, pc, traits::NEXT_PC); | ||||||
|         tu.open_scope(); |         tu.open_scope(); | ||||||
|         this->gen_leave_trap(tu, 3); |         this->gen_leave_trap(tu, 3); | ||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(TRAP); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,40); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,40); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1897,8 +1897,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,41); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,41); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1938,8 +1938,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,42); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,42); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -1981,8 +1981,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,43); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,43); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2024,8 +2024,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,44); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,44); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2062,8 +2062,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,45); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,45); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2104,8 +2104,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,46); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,46); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2146,8 +2146,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,47); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,47); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2174,8 +2174,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,48); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,48); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2213,8 +2213,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,49); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,49); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2254,8 +2254,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,50); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,50); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2295,8 +2295,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,51); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,51); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2336,8 +2336,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,52); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,52); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2394,8 +2394,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,53); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,53); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2441,8 +2441,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,54); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,54); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2502,8 +2502,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,55); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,55); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2549,8 +2549,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,56); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,56); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2584,8 +2584,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,57); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,57); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2616,8 +2616,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,58); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,58); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2647,8 +2647,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,59); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,59); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2684,8 +2684,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,60); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,60); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2706,8 +2706,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,61); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,61); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2736,8 +2736,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,62); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,62); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2771,8 +2771,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,63); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,63); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2804,8 +2804,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,64); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,64); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2838,8 +2838,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,65); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,65); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2861,8 +2861,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,66); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,66); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2891,8 +2891,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,67); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,67); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2929,8 +2929,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,68); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,68); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2959,8 +2959,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,69); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,69); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -2989,8 +2989,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,70); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,70); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3019,8 +3019,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,71); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,71); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3049,8 +3049,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,72); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,72); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3079,8 +3079,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,73); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,73); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3107,8 +3107,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,74); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,74); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3140,8 +3140,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,75); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,75); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3173,8 +3173,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,76); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,76); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3210,8 +3210,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,77); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,77); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3246,8 +3246,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,78); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,78); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3281,8 +3281,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,79); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,79); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3316,8 +3316,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,80); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,80); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3338,8 +3338,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,81); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,81); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3375,8 +3375,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,82); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,82); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3414,8 +3414,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(BRANCH); |         auto returnValue = std::make_tuple(BRANCH); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,83); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,83); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3433,11 +3433,11 @@ private: | |||||||
|         gen_set_pc(tu, pc, traits::NEXT_PC); |         gen_set_pc(tu, pc, traits::NEXT_PC); | ||||||
|         tu.open_scope(); |         tu.open_scope(); | ||||||
|         this->gen_raise_trap(tu, 0,  3); |         this->gen_raise_trap(tu, 0,  3); | ||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(TRAP); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,84); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,84); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3471,8 +3471,8 @@ private: | |||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(CONT); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,85); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,85); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3490,11 +3490,11 @@ private: | |||||||
|         gen_set_pc(tu, pc, traits::NEXT_PC); |         gen_set_pc(tu, pc, traits::NEXT_PC); | ||||||
|         tu.open_scope(); |         tu.open_scope(); | ||||||
|         this->gen_raise_trap(tu, 0,  2); |         this->gen_raise_trap(tu, 0,  2); | ||||||
|         auto returnValue = std::make_tuple(CONT); |         auto returnValue = std::make_tuple(TRAP); | ||||||
|          |          | ||||||
|         tu.close_scope(); |         tu.close_scope(); | ||||||
|  |         gen_trap_check(tu);         | ||||||
|         vm_base<ARCH>::gen_sync(tu, POST_SYNC,86); |         vm_base<ARCH>::gen_sync(tu, POST_SYNC,86); | ||||||
|         gen_trap_check(tu); |  | ||||||
|         return returnValue; |         return returnValue; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -3627,6 +3627,7 @@ template <typename ARCH> void vm_impl<ARCH>::gen_wait(tu_builder& tu, unsigned t | |||||||
|  |  | ||||||
| template <typename ARCH> void vm_impl<ARCH>::gen_trap_behavior(tu_builder& tu) { | template <typename ARCH> void vm_impl<ARCH>::gen_trap_behavior(tu_builder& tu) { | ||||||
|     tu("trap_entry:"); |     tu("trap_entry:"); | ||||||
|  |     this->gen_sync(tu, POST_SYNC, -1);     | ||||||
|     tu("enter_trap(core_ptr, *trap_state, *pc, 0);"); |     tu("enter_trap(core_ptr, *trap_state, *pc, 0);"); | ||||||
|     tu.store(traits::LAST_BRANCH, tu.constant(std::numeric_limits<uint32_t>::max(),32)); |     tu.store(traits::LAST_BRANCH, tu.constant(std::numeric_limits<uint32_t>::max(),32)); | ||||||
|     tu("return *next_pc;"); |     tu("return *next_pc;"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user