11 using namespace etiss;
31 rd += R_rd_0.
read(ba) << 0;
34 rs1 += R_rs1_0.
read(ba) << 0;
37 rs2 += R_rs2_0.
read(ba) << 0;
40 rl += R_rl_0.
read(ba) << 0;
43 aq += R_aq_0.
read(ba) << 0;
50 cp.
code() = std::string(
"//AMOSWAPW\n");
53 cp.
code() +=
"etiss_coverage_count(1, 172);\n";
55 cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
56 cp.
code() +=
"{ // block\n";
58 cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
59 cp.
code() +=
"} // block\n";
62 cp.
code() +=
"etiss_coverage_count(1, 6522);\n";
63 cp.
code() +=
"{ // block\n";
64 cp.
code() +=
"etiss_uint32 offs = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL];\n";
65 cp.
code() +=
"etiss_coverage_count(4, 6489, 6488, 6487, 6485);\n";
66 cp.
code() +=
"etiss_coverage_count(1, 6490);\n";
67 if ((rd % 32ULL) != 0LL) {
68 cp.
code() +=
"etiss_coverage_count(5, 6496, 6493, 6491, 6494, 6495);\n";
69 cp.
code() +=
"etiss_uint32 mem_val_0;\n";
70 cp.
code() +=
"cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";
71 cp.
code() +=
"if (cpu->exception) { // conditional\n";
73 cp.
code() +=
"{ // procedure\n";
74 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
76 cp.
code() +=
"} // procedure\n";
78 cp.
code() +=
"} // conditional\n";
79 cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = (etiss_int32)(((etiss_int32)(mem_val_0)));\n";
80 cp.
code() +=
"etiss_coverage_count(9, 6510, 6501, 6500, 6498, 6509, 6506, 6504, 6503, 6507);\n";
82 cp.
code() +=
"etiss_uint32 mem_val_1;\n";
83 cp.
code() +=
"mem_val_1 = (etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]);\n";
84 cp.
code() +=
"etiss_coverage_count(7, 6521, 6513, 6512, 6520, 6518, 6517, 6515);\n";
85 cp.
code() +=
"cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";
86 cp.
code() +=
"if (cpu->exception) { // conditional\n";
88 cp.
code() +=
"{ // procedure\n";
89 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
91 cp.
code() +=
"} // procedure\n";
93 cp.
code() +=
"} // conditional\n";
94 cp.
code() +=
"} // block\n";
97 cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
104 cp.
code() = std::string(
"//AMOSWAPW\n");
107 cp.
code() +=
"if (cpu->return_pending || cpu->exception) return cpu->exception;\n";
119 rd += R_rd_0.read(ba) << 0;
122 rs1 += R_rs1_0.read(ba) << 0;
125 rs2 += R_rs2_0.read(ba) << 0;
128 rl += R_rl_0.read(ba) << 0;
131 aq += R_aq_0.read(ba) << 0;
135 std::stringstream ss;
137 ss <<
"amoswapw" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
" | rl=" + std::to_string(rl) +
" | aq=" + std::to_string(aq) +
"]");
159 rd += R_rd_0.
read(ba) << 0;
162 rs1 += R_rs1_0.
read(ba) << 0;
165 rs2 += R_rs2_0.
read(ba) << 0;
168 rl += R_rl_0.
read(ba) << 0;
171 aq += R_aq_0.
read(ba) << 0;
178 cp.
code() = std::string(
"//AMOADDW\n");
181 cp.
code() +=
"etiss_coverage_count(1, 173);\n";
183 cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
184 cp.
code() +=
"{ // block\n";
186 cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
187 cp.
code() +=
"} // block\n";
190 cp.
code() +=
"etiss_coverage_count(1, 6563);\n";
191 cp.
code() +=
"{ // block\n";
192 cp.
code() +=
"etiss_uint32 offs = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL];\n";
193 cp.
code() +=
"etiss_coverage_count(4, 6529, 6528, 6527, 6525);\n";
194 cp.
code() +=
"etiss_uint32 mem_val_0;\n";
195 cp.
code() +=
"cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";
196 cp.
code() +=
"if (cpu->exception) { // conditional\n";
198 cp.
code() +=
"{ // procedure\n";
199 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
201 cp.
code() +=
"} // procedure\n";
203 cp.
code() +=
"} // conditional\n";
204 cp.
code() +=
"etiss_int32 res1 = mem_val_0;\n";
205 cp.
code() +=
"etiss_coverage_count(3, 6534, 6533, 6532);\n";
206 cp.
code() +=
"etiss_coverage_count(1, 6535);\n";
207 if ((rd % 32ULL) != 0LL) {
208 cp.
code() +=
"etiss_coverage_count(5, 6541, 6538, 6536, 6539, 6540);\n";
209 cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = res1;\n";
210 cp.
code() +=
"etiss_coverage_count(5, 6548, 6546, 6545, 6543, 6547);\n";
212 cp.
code() +=
"etiss_uint32 res2 = res1 + *((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL];\n";
213 cp.
code() +=
"etiss_coverage_count(6, 6557, 6556, 6550, 6555, 6554, 6552);\n";
214 cp.
code() +=
"etiss_uint32 mem_val_1;\n";
215 cp.
code() +=
"mem_val_1 = res2;\n";
216 cp.
code() +=
"etiss_coverage_count(4, 6562, 6560, 6559, 6561);\n";
217 cp.
code() +=
"cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";
218 cp.
code() +=
"if (cpu->exception) { // conditional\n";
220 cp.
code() +=
"{ // procedure\n";
221 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
223 cp.
code() +=
"} // procedure\n";
225 cp.
code() +=
"} // conditional\n";
226 cp.
code() +=
"} // block\n";
229 cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
236 cp.
code() = std::string(
"//AMOADDW\n");
239 cp.
code() +=
"if (cpu->return_pending || cpu->exception) return cpu->exception;\n";
251 rd += R_rd_0.read(ba) << 0;
254 rs1 += R_rs1_0.read(ba) << 0;
257 rs2 += R_rs2_0.read(ba) << 0;
260 rl += R_rl_0.read(ba) << 0;
263 aq += R_aq_0.read(ba) << 0;
267 std::stringstream ss;
269 ss <<
"amoaddw" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
" | rl=" + std::to_string(rl) +
" | aq=" + std::to_string(aq) +
"]");
291 rd += R_rd_0.
read(ba) << 0;
294 rs1 += R_rs1_0.
read(ba) << 0;
297 rs2 += R_rs2_0.
read(ba) << 0;
300 rl += R_rl_0.
read(ba) << 0;
303 aq += R_aq_0.
read(ba) << 0;
310 cp.
code() = std::string(
"//AMOXORW\n");
313 cp.
code() +=
"etiss_coverage_count(1, 174);\n";
315 cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
316 cp.
code() +=
"{ // block\n";
318 cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
319 cp.
code() +=
"} // block\n";
322 cp.
code() +=
"etiss_coverage_count(1, 6604);\n";
323 cp.
code() +=
"{ // block\n";
324 cp.
code() +=
"etiss_uint32 offs = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL];\n";
325 cp.
code() +=
"etiss_coverage_count(4, 6570, 6569, 6568, 6566);\n";
326 cp.
code() +=
"etiss_uint32 mem_val_0;\n";
327 cp.
code() +=
"cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";
328 cp.
code() +=
"if (cpu->exception) { // conditional\n";
330 cp.
code() +=
"{ // procedure\n";
331 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
333 cp.
code() +=
"} // procedure\n";
335 cp.
code() +=
"} // conditional\n";
336 cp.
code() +=
"etiss_int32 res1 = mem_val_0;\n";
337 cp.
code() +=
"etiss_coverage_count(3, 6575, 6574, 6573);\n";
338 cp.
code() +=
"etiss_coverage_count(1, 6576);\n";
339 if ((rd % 32ULL) != 0LL) {
340 cp.
code() +=
"etiss_coverage_count(5, 6582, 6579, 6577, 6580, 6581);\n";
341 cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = res1;\n";
342 cp.
code() +=
"etiss_coverage_count(5, 6589, 6587, 6586, 6584, 6588);\n";
344 cp.
code() +=
"etiss_uint32 res2 = res1 ^ *((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL];\n";
345 cp.
code() +=
"etiss_coverage_count(6, 6598, 6597, 6591, 6596, 6595, 6593);\n";
346 cp.
code() +=
"etiss_uint32 mem_val_1;\n";
347 cp.
code() +=
"mem_val_1 = res2;\n";
348 cp.
code() +=
"etiss_coverage_count(4, 6603, 6601, 6600, 6602);\n";
349 cp.
code() +=
"cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";
350 cp.
code() +=
"if (cpu->exception) { // conditional\n";
352 cp.
code() +=
"{ // procedure\n";
353 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
355 cp.
code() +=
"} // procedure\n";
357 cp.
code() +=
"} // conditional\n";
358 cp.
code() +=
"} // block\n";
361 cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
368 cp.
code() = std::string(
"//AMOXORW\n");
371 cp.
code() +=
"if (cpu->return_pending || cpu->exception) return cpu->exception;\n";
383 rd += R_rd_0.read(ba) << 0;
386 rs1 += R_rs1_0.read(ba) << 0;
389 rs2 += R_rs2_0.read(ba) << 0;
392 rl += R_rl_0.read(ba) << 0;
395 aq += R_aq_0.read(ba) << 0;
399 std::stringstream ss;
401 ss <<
"amoxorw" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
" | rl=" + std::to_string(rl) +
" | aq=" + std::to_string(aq) +
"]");
423 rd += R_rd_0.
read(ba) << 0;
426 rs1 += R_rs1_0.
read(ba) << 0;
429 rs2 += R_rs2_0.
read(ba) << 0;
432 rl += R_rl_0.
read(ba) << 0;
435 aq += R_aq_0.
read(ba) << 0;
442 cp.
code() = std::string(
"//AMOANDW\n");
445 cp.
code() +=
"etiss_coverage_count(1, 175);\n";
447 cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
448 cp.
code() +=
"{ // block\n";
450 cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
451 cp.
code() +=
"} // block\n";
454 cp.
code() +=
"etiss_coverage_count(1, 6645);\n";
455 cp.
code() +=
"{ // block\n";
456 cp.
code() +=
"etiss_uint32 offs = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL];\n";
457 cp.
code() +=
"etiss_coverage_count(4, 6611, 6610, 6609, 6607);\n";
458 cp.
code() +=
"etiss_uint32 mem_val_0;\n";
459 cp.
code() +=
"cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";
460 cp.
code() +=
"if (cpu->exception) { // conditional\n";
462 cp.
code() +=
"{ // procedure\n";
463 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
465 cp.
code() +=
"} // procedure\n";
467 cp.
code() +=
"} // conditional\n";
468 cp.
code() +=
"etiss_int32 res1 = mem_val_0;\n";
469 cp.
code() +=
"etiss_coverage_count(3, 6616, 6615, 6614);\n";
470 cp.
code() +=
"etiss_coverage_count(1, 6617);\n";
471 if ((rd % 32ULL) != 0LL) {
472 cp.
code() +=
"etiss_coverage_count(5, 6623, 6620, 6618, 6621, 6622);\n";
473 cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = res1;\n";
474 cp.
code() +=
"etiss_coverage_count(5, 6630, 6628, 6627, 6625, 6629);\n";
476 cp.
code() +=
"etiss_uint32 res2 = res1 & *((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL];\n";
477 cp.
code() +=
"etiss_coverage_count(6, 6639, 6638, 6632, 6637, 6636, 6634);\n";
478 cp.
code() +=
"etiss_uint32 mem_val_1;\n";
479 cp.
code() +=
"mem_val_1 = res2;\n";
480 cp.
code() +=
"etiss_coverage_count(4, 6644, 6642, 6641, 6643);\n";
481 cp.
code() +=
"cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";
482 cp.
code() +=
"if (cpu->exception) { // conditional\n";
484 cp.
code() +=
"{ // procedure\n";
485 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
487 cp.
code() +=
"} // procedure\n";
489 cp.
code() +=
"} // conditional\n";
490 cp.
code() +=
"} // block\n";
493 cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
500 cp.
code() = std::string(
"//AMOANDW\n");
503 cp.
code() +=
"if (cpu->return_pending || cpu->exception) return cpu->exception;\n";
515 rd += R_rd_0.read(ba) << 0;
518 rs1 += R_rs1_0.read(ba) << 0;
521 rs2 += R_rs2_0.read(ba) << 0;
524 rl += R_rl_0.read(ba) << 0;
527 aq += R_aq_0.read(ba) << 0;
531 std::stringstream ss;
533 ss <<
"amoandw" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
" | rl=" + std::to_string(rl) +
" | aq=" + std::to_string(aq) +
"]");
555 rd += R_rd_0.
read(ba) << 0;
558 rs1 += R_rs1_0.
read(ba) << 0;
561 rs2 += R_rs2_0.
read(ba) << 0;
564 rl += R_rl_0.
read(ba) << 0;
567 aq += R_aq_0.
read(ba) << 0;
574 cp.
code() = std::string(
"//AMOORW\n");
577 cp.
code() +=
"etiss_coverage_count(1, 176);\n";
579 cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
580 cp.
code() +=
"{ // block\n";
582 cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
583 cp.
code() +=
"} // block\n";
586 cp.
code() +=
"etiss_coverage_count(1, 6686);\n";
587 cp.
code() +=
"{ // block\n";
588 cp.
code() +=
"etiss_uint32 offs = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL];\n";
589 cp.
code() +=
"etiss_coverage_count(4, 6652, 6651, 6650, 6648);\n";
590 cp.
code() +=
"etiss_uint32 mem_val_0;\n";
591 cp.
code() +=
"cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";
592 cp.
code() +=
"if (cpu->exception) { // conditional\n";
594 cp.
code() +=
"{ // procedure\n";
595 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
597 cp.
code() +=
"} // procedure\n";
599 cp.
code() +=
"} // conditional\n";
600 cp.
code() +=
"etiss_int32 res1 = mem_val_0;\n";
601 cp.
code() +=
"etiss_coverage_count(3, 6657, 6656, 6655);\n";
602 cp.
code() +=
"etiss_coverage_count(1, 6658);\n";
603 if ((rd % 32ULL) != 0LL) {
604 cp.
code() +=
"etiss_coverage_count(5, 6664, 6661, 6659, 6662, 6663);\n";
605 cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = res1;\n";
606 cp.
code() +=
"etiss_coverage_count(5, 6671, 6669, 6668, 6666, 6670);\n";
608 cp.
code() +=
"etiss_uint32 res2 = res1 | *((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL];\n";
609 cp.
code() +=
"etiss_coverage_count(6, 6680, 6679, 6673, 6678, 6677, 6675);\n";
610 cp.
code() +=
"etiss_uint32 mem_val_1;\n";
611 cp.
code() +=
"mem_val_1 = res2;\n";
612 cp.
code() +=
"etiss_coverage_count(4, 6685, 6683, 6682, 6684);\n";
613 cp.
code() +=
"cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";
614 cp.
code() +=
"if (cpu->exception) { // conditional\n";
616 cp.
code() +=
"{ // procedure\n";
617 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
619 cp.
code() +=
"} // procedure\n";
621 cp.
code() +=
"} // conditional\n";
622 cp.
code() +=
"} // block\n";
625 cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
632 cp.
code() = std::string(
"//AMOORW\n");
635 cp.
code() +=
"if (cpu->return_pending || cpu->exception) return cpu->exception;\n";
647 rd += R_rd_0.read(ba) << 0;
650 rs1 += R_rs1_0.read(ba) << 0;
653 rs2 += R_rs2_0.read(ba) << 0;
656 rl += R_rl_0.read(ba) << 0;
659 aq += R_aq_0.read(ba) << 0;
663 std::stringstream ss;
665 ss <<
"amoorw" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
" | rl=" + std::to_string(rl) +
" | aq=" + std::to_string(aq) +
"]");
687 rd += R_rd_0.
read(ba) << 0;
690 rs1 += R_rs1_0.
read(ba) << 0;
693 rs2 += R_rs2_0.
read(ba) << 0;
696 rl += R_rl_0.
read(ba) << 0;
699 aq += R_aq_0.
read(ba) << 0;
706 cp.
code() = std::string(
"//AMOMINW\n");
709 cp.
code() +=
"etiss_coverage_count(1, 177);\n";
711 cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
712 cp.
code() +=
"{ // block\n";
714 cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
715 cp.
code() +=
"} // block\n";
718 cp.
code() +=
"etiss_coverage_count(1, 6736);\n";
719 cp.
code() +=
"{ // block\n";
720 cp.
code() +=
"etiss_uint32 offs = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL];\n";
721 cp.
code() +=
"etiss_coverage_count(4, 6693, 6692, 6691, 6689);\n";
722 cp.
code() +=
"etiss_uint32 mem_val_0;\n";
723 cp.
code() +=
"cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";
724 cp.
code() +=
"if (cpu->exception) { // conditional\n";
726 cp.
code() +=
"{ // procedure\n";
727 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
729 cp.
code() +=
"} // procedure\n";
731 cp.
code() +=
"} // conditional\n";
732 cp.
code() +=
"etiss_int32 res1 = mem_val_0;\n";
733 cp.
code() +=
"etiss_coverage_count(3, 6698, 6697, 6696);\n";
734 cp.
code() +=
"etiss_coverage_count(1, 6699);\n";
735 if ((rd % 32ULL) != 0LL) {
736 cp.
code() +=
"etiss_coverage_count(5, 6705, 6702, 6700, 6703, 6704);\n";
737 cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = res1;\n";
738 cp.
code() +=
"etiss_coverage_count(5, 6712, 6710, 6709, 6707, 6711);\n";
740 cp.
code() +=
"etiss_uint32 res2 = (res1 > (etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL])) ? (*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]) : (res1);\n";
741 cp.
code() +=
"etiss_coverage_count(12, 6730, 6729, 6722, 6714, 6721, 6719, 6718, 6716, 6727, 6726, 6724, 6728);\n";
742 cp.
code() +=
"etiss_uint32 mem_val_1;\n";
743 cp.
code() +=
"mem_val_1 = res2;\n";
744 cp.
code() +=
"etiss_coverage_count(4, 6735, 6733, 6732, 6734);\n";
745 cp.
code() +=
"cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";
746 cp.
code() +=
"if (cpu->exception) { // conditional\n";
748 cp.
code() +=
"{ // procedure\n";
749 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
751 cp.
code() +=
"} // procedure\n";
753 cp.
code() +=
"} // conditional\n";
754 cp.
code() +=
"} // block\n";
757 cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
764 cp.
code() = std::string(
"//AMOMINW\n");
767 cp.
code() +=
"if (cpu->return_pending || cpu->exception) return cpu->exception;\n";
779 rd += R_rd_0.read(ba) << 0;
782 rs1 += R_rs1_0.read(ba) << 0;
785 rs2 += R_rs2_0.read(ba) << 0;
788 rl += R_rl_0.read(ba) << 0;
791 aq += R_aq_0.read(ba) << 0;
795 std::stringstream ss;
797 ss <<
"amominw" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
" | rl=" + std::to_string(rl) +
" | aq=" + std::to_string(aq) +
"]");
819 rd += R_rd_0.
read(ba) << 0;
822 rs1 += R_rs1_0.
read(ba) << 0;
825 rs2 += R_rs2_0.
read(ba) << 0;
828 rl += R_rl_0.
read(ba) << 0;
831 aq += R_aq_0.
read(ba) << 0;
838 cp.
code() = std::string(
"//AMOMAXW\n");
841 cp.
code() +=
"etiss_coverage_count(1, 178);\n";
843 cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
844 cp.
code() +=
"{ // block\n";
846 cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
847 cp.
code() +=
"} // block\n";
850 cp.
code() +=
"etiss_coverage_count(1, 6786);\n";
851 cp.
code() +=
"{ // block\n";
852 cp.
code() +=
"etiss_uint32 offs = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL];\n";
853 cp.
code() +=
"etiss_coverage_count(4, 6743, 6742, 6741, 6739);\n";
854 cp.
code() +=
"etiss_uint32 mem_val_0;\n";
855 cp.
code() +=
"cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";
856 cp.
code() +=
"if (cpu->exception) { // conditional\n";
858 cp.
code() +=
"{ // procedure\n";
859 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
861 cp.
code() +=
"} // procedure\n";
863 cp.
code() +=
"} // conditional\n";
864 cp.
code() +=
"etiss_int32 res1 = mem_val_0;\n";
865 cp.
code() +=
"etiss_coverage_count(3, 6748, 6747, 6746);\n";
866 cp.
code() +=
"etiss_coverage_count(1, 6749);\n";
867 if ((rd % 32ULL) != 0LL) {
868 cp.
code() +=
"etiss_coverage_count(5, 6755, 6752, 6750, 6753, 6754);\n";
869 cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = res1;\n";
870 cp.
code() +=
"etiss_coverage_count(5, 6762, 6760, 6759, 6757, 6761);\n";
872 cp.
code() +=
"etiss_uint32 res2 = (res1 < (etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL])) ? (*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]) : (res1);\n";
873 cp.
code() +=
"etiss_coverage_count(12, 6780, 6779, 6772, 6764, 6771, 6769, 6768, 6766, 6777, 6776, 6774, 6778);\n";
874 cp.
code() +=
"etiss_uint32 mem_val_1;\n";
875 cp.
code() +=
"mem_val_1 = res2;\n";
876 cp.
code() +=
"etiss_coverage_count(4, 6785, 6783, 6782, 6784);\n";
877 cp.
code() +=
"cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";
878 cp.
code() +=
"if (cpu->exception) { // conditional\n";
880 cp.
code() +=
"{ // procedure\n";
881 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
883 cp.
code() +=
"} // procedure\n";
885 cp.
code() +=
"} // conditional\n";
886 cp.
code() +=
"} // block\n";
889 cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
896 cp.
code() = std::string(
"//AMOMAXW\n");
899 cp.
code() +=
"if (cpu->return_pending || cpu->exception) return cpu->exception;\n";
911 rd += R_rd_0.read(ba) << 0;
914 rs1 += R_rs1_0.read(ba) << 0;
917 rs2 += R_rs2_0.read(ba) << 0;
920 rl += R_rl_0.read(ba) << 0;
923 aq += R_aq_0.read(ba) << 0;
927 std::stringstream ss;
929 ss <<
"amomaxw" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
" | rl=" + std::to_string(rl) +
" | aq=" + std::to_string(aq) +
"]");
951 rd += R_rd_0.
read(ba) << 0;
954 rs1 += R_rs1_0.
read(ba) << 0;
957 rs2 += R_rs2_0.
read(ba) << 0;
960 rl += R_rl_0.
read(ba) << 0;
963 aq += R_aq_0.
read(ba) << 0;
970 cp.
code() = std::string(
"//AMOMINUW\n");
973 cp.
code() +=
"etiss_coverage_count(1, 179);\n";
975 cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
976 cp.
code() +=
"{ // block\n";
978 cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
979 cp.
code() +=
"} // block\n";
982 cp.
code() +=
"etiss_coverage_count(1, 6838);\n";
983 cp.
code() +=
"{ // block\n";
984 cp.
code() +=
"etiss_uint32 offs = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL];\n";
985 cp.
code() +=
"etiss_coverage_count(4, 6793, 6792, 6791, 6789);\n";
986 cp.
code() +=
"etiss_uint32 mem_val_0;\n";
987 cp.
code() +=
"cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";
988 cp.
code() +=
"if (cpu->exception) { // conditional\n";
990 cp.
code() +=
"{ // procedure\n";
991 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
993 cp.
code() +=
"} // procedure\n";
995 cp.
code() +=
"} // conditional\n";
996 cp.
code() +=
"etiss_uint32 res1 = mem_val_0;\n";
997 cp.
code() +=
"etiss_coverage_count(3, 6798, 6797, 6796);\n";
998 cp.
code() +=
"etiss_coverage_count(1, 6799);\n";
999 if ((rd % 32ULL) != 0LL) {
1000 cp.
code() +=
"etiss_coverage_count(5, 6805, 6802, 6800, 6803, 6804);\n";
1001 cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = (etiss_int32)(res1);\n";
1002 cp.
code() +=
"etiss_coverage_count(6, 6814, 6810, 6809, 6807, 6813, 6811);\n";
1004 cp.
code() +=
"etiss_uint32 res2 = (res1 > (etiss_uint32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL])) ? (*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]) : (res1);\n";
1005 cp.
code() +=
"etiss_coverage_count(12, 6832, 6831, 6824, 6816, 6823, 6821, 6820, 6818, 6829, 6828, 6826, 6830);\n";
1006 cp.
code() +=
"etiss_uint32 mem_val_1;\n";
1007 cp.
code() +=
"mem_val_1 = res2;\n";
1008 cp.
code() +=
"etiss_coverage_count(4, 6837, 6835, 6834, 6836);\n";
1009 cp.
code() +=
"cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";
1010 cp.
code() +=
"if (cpu->exception) { // conditional\n";
1012 cp.
code() +=
"{ // procedure\n";
1013 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
1015 cp.
code() +=
"} // procedure\n";
1017 cp.
code() +=
"} // conditional\n";
1018 cp.
code() +=
"} // block\n";
1021 cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
1028 cp.
code() = std::string(
"//AMOMINUW\n");
1031 cp.
code() +=
"if (cpu->return_pending || cpu->exception) return cpu->exception;\n";
1043 rd += R_rd_0.read(ba) << 0;
1046 rs1 += R_rs1_0.read(ba) << 0;
1049 rs2 += R_rs2_0.read(ba) << 0;
1052 rl += R_rl_0.read(ba) << 0;
1055 aq += R_aq_0.read(ba) << 0;
1059 std::stringstream ss;
1061 ss <<
"amominuw" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
" | rl=" + std::to_string(rl) +
" | aq=" + std::to_string(aq) +
"]");
1083 rd += R_rd_0.
read(ba) << 0;
1086 rs1 += R_rs1_0.
read(ba) << 0;
1089 rs2 += R_rs2_0.
read(ba) << 0;
1092 rl += R_rl_0.
read(ba) << 0;
1095 aq += R_aq_0.
read(ba) << 0;
1102 cp.
code() = std::string(
"//AMOMAXUW\n");
1105 cp.
code() +=
"etiss_coverage_count(1, 180);\n";
1107 cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
1108 cp.
code() +=
"{ // block\n";
1110 cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
1111 cp.
code() +=
"} // block\n";
1114 cp.
code() +=
"etiss_coverage_count(1, 6890);\n";
1115 cp.
code() +=
"{ // block\n";
1116 cp.
code() +=
"etiss_uint32 offs = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL];\n";
1117 cp.
code() +=
"etiss_coverage_count(4, 6845, 6844, 6843, 6841);\n";
1118 cp.
code() +=
"etiss_uint32 mem_val_0;\n";
1119 cp.
code() +=
"cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";
1120 cp.
code() +=
"if (cpu->exception) { // conditional\n";
1122 cp.
code() +=
"{ // procedure\n";
1123 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
1125 cp.
code() +=
"} // procedure\n";
1127 cp.
code() +=
"} // conditional\n";
1128 cp.
code() +=
"etiss_uint32 res1 = mem_val_0;\n";
1129 cp.
code() +=
"etiss_coverage_count(3, 6850, 6849, 6848);\n";
1130 cp.
code() +=
"etiss_coverage_count(1, 6851);\n";
1131 if ((rd % 32ULL) != 0LL) {
1132 cp.
code() +=
"etiss_coverage_count(5, 6857, 6854, 6852, 6855, 6856);\n";
1133 cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = (etiss_int32)(res1);\n";
1134 cp.
code() +=
"etiss_coverage_count(6, 6866, 6862, 6861, 6859, 6865, 6863);\n";
1136 cp.
code() +=
"etiss_uint32 res2 = (res1 < (etiss_uint32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL])) ? (*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]) : (res1);\n";
1137 cp.
code() +=
"etiss_coverage_count(12, 6884, 6883, 6876, 6868, 6875, 6873, 6872, 6870, 6881, 6880, 6878, 6882);\n";
1138 cp.
code() +=
"etiss_uint32 mem_val_1;\n";
1139 cp.
code() +=
"mem_val_1 = res2;\n";
1140 cp.
code() +=
"etiss_coverage_count(4, 6889, 6887, 6886, 6888);\n";
1141 cp.
code() +=
"cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";
1142 cp.
code() +=
"if (cpu->exception) { // conditional\n";
1144 cp.
code() +=
"{ // procedure\n";
1145 cp.
code() +=
"RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";
1147 cp.
code() +=
"} // procedure\n";
1149 cp.
code() +=
"} // conditional\n";
1150 cp.
code() +=
"} // block\n";
1153 cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
1160 cp.
code() = std::string(
"//AMOMAXUW\n");
1163 cp.
code() +=
"if (cpu->return_pending || cpu->exception) return cpu->exception;\n";
1175 rd += R_rd_0.read(ba) << 0;
1178 rs1 += R_rs1_0.read(ba) << 0;
1181 rs2 += R_rs2_0.read(ba) << 0;
1184 rl += R_rl_0.read(ba) << 0;
1187 aq += R_aq_0.read(ba) << 0;
1191 std::stringstream ss;
1193 ss <<
"amomaxuw" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
" | rl=" + std::to_string(rl) +
" | aq=" + std::to_string(aq) +
"]");
etiss::instr::InstructionGroup ISA32_RV32IMACFD("ISA32_RV32IMACFD", 32)
static InstructionDefinition amomaxuw_rd_rs1_rs2_rl_aq(ISA32_RV32IMACFD, "amomaxuw",(uint32_t) 0xe000202f,(uint32_t) 0xf800707f, [](BitArray &ba, etiss::CodeSet &cs, InstructionContext &ic) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//AMOMAXUW\n");cp.code()+="etiss_coverage_count(1, 180);\n";{ cp.code()+="etiss_coverage_count(1, 1169);\n";cp.code()+="{ // block\n";cp.code()+="cpu->nextPc = "+std::to_string(ic.current_address_+4)+"ULL;\n";cp.code()+="etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";cp.code()+="} // block\n";} { cp.code()+="etiss_coverage_count(1, 6890);\n";cp.code()+="{ // block\n";cp.code()+="etiss_uint32 offs = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(4, 6845, 6844, 6843, 6841);\n";cp.code()+="etiss_uint32 mem_val_0;\n";cp.code()+="cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="etiss_uint32 res1 = mem_val_0;\n";cp.code()+="etiss_coverage_count(3, 6850, 6849, 6848);\n";cp.code()+="etiss_coverage_count(1, 6851);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 6857, 6854, 6852, 6855, 6856);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = (etiss_int32)(res1);\n";cp.code()+="etiss_coverage_count(6, 6866, 6862, 6861, 6859, 6865, 6863);\n";} cp.code()+="etiss_uint32 res2 = (res1 < (etiss_uint32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL])) ? (*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]) : (res1);\n";cp.code()+="etiss_coverage_count(12, 6884, 6883, 6876, 6868, 6875, 6873, 6872, 6870, 6881, 6880, 6878, 6882);\n";cp.code()+="etiss_uint32 mem_val_1;\n";cp.code()+="mem_val_1 = res2;\n";cp.code()+="etiss_coverage_count(4, 6889, 6887, 6886, 6888);\n";cp.code()+="cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="} // block\n";} cp.code()+="instr_exit_"+std::to_string(ic.current_address_)+":\n";cp.code()+="cpu->instructionPointer = cpu->nextPc;\n";cp.getAffectedRegisters().add("instructionPointer", 32);} { CodePart &cp=cs.append(CodePart::APPENDEDRETURNINGREQUIRED);cp.code()=std::string("//AMOMAXUW\n");cp.code()+="if (cpu->return_pending || cpu->exception) return cpu->exception;\n";} return true;}, 0, [](BitArray &ba, Instruction &instr) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;std::stringstream ss;ss<< "amomaxuw"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+" | rl="+std::to_string(rl)+" | aq="+std::to_string(aq)+"]");return ss.str();})
static InstructionDefinition amoorw_rd_rs1_rs2_rl_aq(ISA32_RV32IMACFD, "amoorw",(uint32_t) 0x4000202f,(uint32_t) 0xf800707f, [](BitArray &ba, etiss::CodeSet &cs, InstructionContext &ic) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//AMOORW\n");cp.code()+="etiss_coverage_count(1, 176);\n";{ cp.code()+="etiss_coverage_count(1, 1169);\n";cp.code()+="{ // block\n";cp.code()+="cpu->nextPc = "+std::to_string(ic.current_address_+4)+"ULL;\n";cp.code()+="etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";cp.code()+="} // block\n";} { cp.code()+="etiss_coverage_count(1, 6686);\n";cp.code()+="{ // block\n";cp.code()+="etiss_uint32 offs = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(4, 6652, 6651, 6650, 6648);\n";cp.code()+="etiss_uint32 mem_val_0;\n";cp.code()+="cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="etiss_int32 res1 = mem_val_0;\n";cp.code()+="etiss_coverage_count(3, 6657, 6656, 6655);\n";cp.code()+="etiss_coverage_count(1, 6658);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 6664, 6661, 6659, 6662, 6663);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = res1;\n";cp.code()+="etiss_coverage_count(5, 6671, 6669, 6668, 6666, 6670);\n";} cp.code()+="etiss_uint32 res2 = res1 | *((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(6, 6680, 6679, 6673, 6678, 6677, 6675);\n";cp.code()+="etiss_uint32 mem_val_1;\n";cp.code()+="mem_val_1 = res2;\n";cp.code()+="etiss_coverage_count(4, 6685, 6683, 6682, 6684);\n";cp.code()+="cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="} // block\n";} cp.code()+="instr_exit_"+std::to_string(ic.current_address_)+":\n";cp.code()+="cpu->instructionPointer = cpu->nextPc;\n";cp.getAffectedRegisters().add("instructionPointer", 32);} { CodePart &cp=cs.append(CodePart::APPENDEDRETURNINGREQUIRED);cp.code()=std::string("//AMOORW\n");cp.code()+="if (cpu->return_pending || cpu->exception) return cpu->exception;\n";} return true;}, 0, [](BitArray &ba, Instruction &instr) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;std::stringstream ss;ss<< "amoorw"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+" | rl="+std::to_string(rl)+" | aq="+std::to_string(aq)+"]");return ss.str();})
static InstructionDefinition amominuw_rd_rs1_rs2_rl_aq(ISA32_RV32IMACFD, "amominuw",(uint32_t) 0xc000202f,(uint32_t) 0xf800707f, [](BitArray &ba, etiss::CodeSet &cs, InstructionContext &ic) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//AMOMINUW\n");cp.code()+="etiss_coverage_count(1, 179);\n";{ cp.code()+="etiss_coverage_count(1, 1169);\n";cp.code()+="{ // block\n";cp.code()+="cpu->nextPc = "+std::to_string(ic.current_address_+4)+"ULL;\n";cp.code()+="etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";cp.code()+="} // block\n";} { cp.code()+="etiss_coverage_count(1, 6838);\n";cp.code()+="{ // block\n";cp.code()+="etiss_uint32 offs = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(4, 6793, 6792, 6791, 6789);\n";cp.code()+="etiss_uint32 mem_val_0;\n";cp.code()+="cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="etiss_uint32 res1 = mem_val_0;\n";cp.code()+="etiss_coverage_count(3, 6798, 6797, 6796);\n";cp.code()+="etiss_coverage_count(1, 6799);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 6805, 6802, 6800, 6803, 6804);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = (etiss_int32)(res1);\n";cp.code()+="etiss_coverage_count(6, 6814, 6810, 6809, 6807, 6813, 6811);\n";} cp.code()+="etiss_uint32 res2 = (res1 > (etiss_uint32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL])) ? (*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]) : (res1);\n";cp.code()+="etiss_coverage_count(12, 6832, 6831, 6824, 6816, 6823, 6821, 6820, 6818, 6829, 6828, 6826, 6830);\n";cp.code()+="etiss_uint32 mem_val_1;\n";cp.code()+="mem_val_1 = res2;\n";cp.code()+="etiss_coverage_count(4, 6837, 6835, 6834, 6836);\n";cp.code()+="cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="} // block\n";} cp.code()+="instr_exit_"+std::to_string(ic.current_address_)+":\n";cp.code()+="cpu->instructionPointer = cpu->nextPc;\n";cp.getAffectedRegisters().add("instructionPointer", 32);} { CodePart &cp=cs.append(CodePart::APPENDEDRETURNINGREQUIRED);cp.code()=std::string("//AMOMINUW\n");cp.code()+="if (cpu->return_pending || cpu->exception) return cpu->exception;\n";} return true;}, 0, [](BitArray &ba, Instruction &instr) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;std::stringstream ss;ss<< "amominuw"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+" | rl="+std::to_string(rl)+" | aq="+std::to_string(aq)+"]");return ss.str();})
static InstructionDefinition amominw_rd_rs1_rs2_rl_aq(ISA32_RV32IMACFD, "amominw",(uint32_t) 0x8000202f,(uint32_t) 0xf800707f, [](BitArray &ba, etiss::CodeSet &cs, InstructionContext &ic) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//AMOMINW\n");cp.code()+="etiss_coverage_count(1, 177);\n";{ cp.code()+="etiss_coverage_count(1, 1169);\n";cp.code()+="{ // block\n";cp.code()+="cpu->nextPc = "+std::to_string(ic.current_address_+4)+"ULL;\n";cp.code()+="etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";cp.code()+="} // block\n";} { cp.code()+="etiss_coverage_count(1, 6736);\n";cp.code()+="{ // block\n";cp.code()+="etiss_uint32 offs = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(4, 6693, 6692, 6691, 6689);\n";cp.code()+="etiss_uint32 mem_val_0;\n";cp.code()+="cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="etiss_int32 res1 = mem_val_0;\n";cp.code()+="etiss_coverage_count(3, 6698, 6697, 6696);\n";cp.code()+="etiss_coverage_count(1, 6699);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 6705, 6702, 6700, 6703, 6704);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = res1;\n";cp.code()+="etiss_coverage_count(5, 6712, 6710, 6709, 6707, 6711);\n";} cp.code()+="etiss_uint32 res2 = (res1 > (etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL])) ? (*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]) : (res1);\n";cp.code()+="etiss_coverage_count(12, 6730, 6729, 6722, 6714, 6721, 6719, 6718, 6716, 6727, 6726, 6724, 6728);\n";cp.code()+="etiss_uint32 mem_val_1;\n";cp.code()+="mem_val_1 = res2;\n";cp.code()+="etiss_coverage_count(4, 6735, 6733, 6732, 6734);\n";cp.code()+="cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="} // block\n";} cp.code()+="instr_exit_"+std::to_string(ic.current_address_)+":\n";cp.code()+="cpu->instructionPointer = cpu->nextPc;\n";cp.getAffectedRegisters().add("instructionPointer", 32);} { CodePart &cp=cs.append(CodePart::APPENDEDRETURNINGREQUIRED);cp.code()=std::string("//AMOMINW\n");cp.code()+="if (cpu->return_pending || cpu->exception) return cpu->exception;\n";} return true;}, 0, [](BitArray &ba, Instruction &instr) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;std::stringstream ss;ss<< "amominw"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+" | rl="+std::to_string(rl)+" | aq="+std::to_string(aq)+"]");return ss.str();})
static InstructionDefinition amoaddw_rd_rs1_rs2_rl_aq(ISA32_RV32IMACFD, "amoaddw",(uint32_t) 0x00202f,(uint32_t) 0xf800707f, [](BitArray &ba, etiss::CodeSet &cs, InstructionContext &ic) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//AMOADDW\n");cp.code()+="etiss_coverage_count(1, 173);\n";{ cp.code()+="etiss_coverage_count(1, 1169);\n";cp.code()+="{ // block\n";cp.code()+="cpu->nextPc = "+std::to_string(ic.current_address_+4)+"ULL;\n";cp.code()+="etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";cp.code()+="} // block\n";} { cp.code()+="etiss_coverage_count(1, 6563);\n";cp.code()+="{ // block\n";cp.code()+="etiss_uint32 offs = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(4, 6529, 6528, 6527, 6525);\n";cp.code()+="etiss_uint32 mem_val_0;\n";cp.code()+="cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="etiss_int32 res1 = mem_val_0;\n";cp.code()+="etiss_coverage_count(3, 6534, 6533, 6532);\n";cp.code()+="etiss_coverage_count(1, 6535);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 6541, 6538, 6536, 6539, 6540);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = res1;\n";cp.code()+="etiss_coverage_count(5, 6548, 6546, 6545, 6543, 6547);\n";} cp.code()+="etiss_uint32 res2 = res1 + *((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(6, 6557, 6556, 6550, 6555, 6554, 6552);\n";cp.code()+="etiss_uint32 mem_val_1;\n";cp.code()+="mem_val_1 = res2;\n";cp.code()+="etiss_coverage_count(4, 6562, 6560, 6559, 6561);\n";cp.code()+="cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="} // block\n";} cp.code()+="instr_exit_"+std::to_string(ic.current_address_)+":\n";cp.code()+="cpu->instructionPointer = cpu->nextPc;\n";cp.getAffectedRegisters().add("instructionPointer", 32);} { CodePart &cp=cs.append(CodePart::APPENDEDRETURNINGREQUIRED);cp.code()=std::string("//AMOADDW\n");cp.code()+="if (cpu->return_pending || cpu->exception) return cpu->exception;\n";} return true;}, 0, [](BitArray &ba, Instruction &instr) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;std::stringstream ss;ss<< "amoaddw"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+" | rl="+std::to_string(rl)+" | aq="+std::to_string(aq)+"]");return ss.str();})
static InstructionDefinition amoswapw_rd_rs1_rs2_rl_aq(ISA32_RV32IMACFD, "amoswapw",(uint32_t) 0x800202f,(uint32_t) 0xf800707f, [](BitArray &ba, etiss::CodeSet &cs, InstructionContext &ic) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//AMOSWAPW\n");cp.code()+="etiss_coverage_count(1, 172);\n";{ cp.code()+="etiss_coverage_count(1, 1169);\n";cp.code()+="{ // block\n";cp.code()+="cpu->nextPc = "+std::to_string(ic.current_address_+4)+"ULL;\n";cp.code()+="etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";cp.code()+="} // block\n";} { cp.code()+="etiss_coverage_count(1, 6522);\n";cp.code()+="{ // block\n";cp.code()+="etiss_uint32 offs = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(4, 6489, 6488, 6487, 6485);\n";cp.code()+="etiss_coverage_count(1, 6490);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 6496, 6493, 6491, 6494, 6495);\n";cp.code()+="etiss_uint32 mem_val_0;\n";cp.code()+="cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = (etiss_int32)(((etiss_int32)(mem_val_0)));\n";cp.code()+="etiss_coverage_count(9, 6510, 6501, 6500, 6498, 6509, 6506, 6504, 6503, 6507);\n";} cp.code()+="etiss_uint32 mem_val_1;\n";cp.code()+="mem_val_1 = (etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]);\n";cp.code()+="etiss_coverage_count(7, 6521, 6513, 6512, 6520, 6518, 6517, 6515);\n";cp.code()+="cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="} // block\n";} cp.code()+="instr_exit_"+std::to_string(ic.current_address_)+":\n";cp.code()+="cpu->instructionPointer = cpu->nextPc;\n";cp.getAffectedRegisters().add("instructionPointer", 32);} { CodePart &cp=cs.append(CodePart::APPENDEDRETURNINGREQUIRED);cp.code()=std::string("//AMOSWAPW\n");cp.code()+="if (cpu->return_pending || cpu->exception) return cpu->exception;\n";} return true;}, 0, [](BitArray &ba, Instruction &instr) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;std::stringstream ss;ss<< "amoswapw"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+" | rl="+std::to_string(rl)+" | aq="+std::to_string(aq)+"]");return ss.str();})
static InstructionDefinition amoandw_rd_rs1_rs2_rl_aq(ISA32_RV32IMACFD, "amoandw",(uint32_t) 0x6000202f,(uint32_t) 0xf800707f, [](BitArray &ba, etiss::CodeSet &cs, InstructionContext &ic) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//AMOANDW\n");cp.code()+="etiss_coverage_count(1, 175);\n";{ cp.code()+="etiss_coverage_count(1, 1169);\n";cp.code()+="{ // block\n";cp.code()+="cpu->nextPc = "+std::to_string(ic.current_address_+4)+"ULL;\n";cp.code()+="etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";cp.code()+="} // block\n";} { cp.code()+="etiss_coverage_count(1, 6645);\n";cp.code()+="{ // block\n";cp.code()+="etiss_uint32 offs = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(4, 6611, 6610, 6609, 6607);\n";cp.code()+="etiss_uint32 mem_val_0;\n";cp.code()+="cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="etiss_int32 res1 = mem_val_0;\n";cp.code()+="etiss_coverage_count(3, 6616, 6615, 6614);\n";cp.code()+="etiss_coverage_count(1, 6617);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 6623, 6620, 6618, 6621, 6622);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = res1;\n";cp.code()+="etiss_coverage_count(5, 6630, 6628, 6627, 6625, 6629);\n";} cp.code()+="etiss_uint32 res2 = res1 & *((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(6, 6639, 6638, 6632, 6637, 6636, 6634);\n";cp.code()+="etiss_uint32 mem_val_1;\n";cp.code()+="mem_val_1 = res2;\n";cp.code()+="etiss_coverage_count(4, 6644, 6642, 6641, 6643);\n";cp.code()+="cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="} // block\n";} cp.code()+="instr_exit_"+std::to_string(ic.current_address_)+":\n";cp.code()+="cpu->instructionPointer = cpu->nextPc;\n";cp.getAffectedRegisters().add("instructionPointer", 32);} { CodePart &cp=cs.append(CodePart::APPENDEDRETURNINGREQUIRED);cp.code()=std::string("//AMOANDW\n");cp.code()+="if (cpu->return_pending || cpu->exception) return cpu->exception;\n";} return true;}, 0, [](BitArray &ba, Instruction &instr) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;std::stringstream ss;ss<< "amoandw"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+" | rl="+std::to_string(rl)+" | aq="+std::to_string(aq)+"]");return ss.str();})
static InstructionDefinition amomaxw_rd_rs1_rs2_rl_aq(ISA32_RV32IMACFD, "amomaxw",(uint32_t) 0xa000202f,(uint32_t) 0xf800707f, [](BitArray &ba, etiss::CodeSet &cs, InstructionContext &ic) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//AMOMAXW\n");cp.code()+="etiss_coverage_count(1, 178);\n";{ cp.code()+="etiss_coverage_count(1, 1169);\n";cp.code()+="{ // block\n";cp.code()+="cpu->nextPc = "+std::to_string(ic.current_address_+4)+"ULL;\n";cp.code()+="etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";cp.code()+="} // block\n";} { cp.code()+="etiss_coverage_count(1, 6786);\n";cp.code()+="{ // block\n";cp.code()+="etiss_uint32 offs = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(4, 6743, 6742, 6741, 6739);\n";cp.code()+="etiss_uint32 mem_val_0;\n";cp.code()+="cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="etiss_int32 res1 = mem_val_0;\n";cp.code()+="etiss_coverage_count(3, 6748, 6747, 6746);\n";cp.code()+="etiss_coverage_count(1, 6749);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 6755, 6752, 6750, 6753, 6754);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = res1;\n";cp.code()+="etiss_coverage_count(5, 6762, 6760, 6759, 6757, 6761);\n";} cp.code()+="etiss_uint32 res2 = (res1 < (etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL])) ? (*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]) : (res1);\n";cp.code()+="etiss_coverage_count(12, 6780, 6779, 6772, 6764, 6771, 6769, 6768, 6766, 6777, 6776, 6774, 6778);\n";cp.code()+="etiss_uint32 mem_val_1;\n";cp.code()+="mem_val_1 = res2;\n";cp.code()+="etiss_coverage_count(4, 6785, 6783, 6782, 6784);\n";cp.code()+="cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="} // block\n";} cp.code()+="instr_exit_"+std::to_string(ic.current_address_)+":\n";cp.code()+="cpu->instructionPointer = cpu->nextPc;\n";cp.getAffectedRegisters().add("instructionPointer", 32);} { CodePart &cp=cs.append(CodePart::APPENDEDRETURNINGREQUIRED);cp.code()=std::string("//AMOMAXW\n");cp.code()+="if (cpu->return_pending || cpu->exception) return cpu->exception;\n";} return true;}, 0, [](BitArray &ba, Instruction &instr) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;std::stringstream ss;ss<< "amomaxw"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+" | rl="+std::to_string(rl)+" | aq="+std::to_string(aq)+"]");return ss.str();})
static InstructionDefinition amoxorw_rd_rs1_rs2_rl_aq(ISA32_RV32IMACFD, "amoxorw",(uint32_t) 0x2000202f,(uint32_t) 0xf800707f, [](BitArray &ba, etiss::CodeSet &cs, InstructionContext &ic) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//AMOXORW\n");cp.code()+="etiss_coverage_count(1, 174);\n";{ cp.code()+="etiss_coverage_count(1, 1169);\n";cp.code()+="{ // block\n";cp.code()+="cpu->nextPc = "+std::to_string(ic.current_address_+4)+"ULL;\n";cp.code()+="etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";cp.code()+="} // block\n";} { cp.code()+="etiss_coverage_count(1, 6604);\n";cp.code()+="{ // block\n";cp.code()+="etiss_uint32 offs = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(4, 6570, 6569, 6568, 6566);\n";cp.code()+="etiss_uint32 mem_val_0;\n";cp.code()+="cpu->exception |= (*(system->dread))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_0, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="etiss_int32 res1 = mem_val_0;\n";cp.code()+="etiss_coverage_count(3, 6575, 6574, 6573);\n";cp.code()+="etiss_coverage_count(1, 6576);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 6582, 6579, 6577, 6580, 6581);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = res1;\n";cp.code()+="etiss_coverage_count(5, 6589, 6587, 6586, 6584, 6588);\n";} cp.code()+="etiss_uint32 res2 = res1 ^ *((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(6, 6598, 6597, 6591, 6596, 6595, 6593);\n";cp.code()+="etiss_uint32 mem_val_1;\n";cp.code()+="mem_val_1 = res2;\n";cp.code()+="etiss_coverage_count(4, 6603, 6601, 6600, 6602);\n";cp.code()+="cpu->exception |= (*(system->dwrite))(system->handle, cpu, offs, (etiss_uint8*)&mem_val_1, 4);\n";cp.code()+="if (cpu->exception) { // conditional\n";{ cp.code()+="{ // procedure\n";cp.code()+="RV32IMACFD_translate_exc_code(cpu, system, plugin_pointers, cpu->exception);\n";cp.code()+="goto instr_exit_"+std::to_string(ic.current_address_)+";\n";cp.code()+="} // procedure\n";} cp.code()+="} // conditional\n";cp.code()+="} // block\n";} cp.code()+="instr_exit_"+std::to_string(ic.current_address_)+":\n";cp.code()+="cpu->instructionPointer = cpu->nextPc;\n";cp.getAffectedRegisters().add("instructionPointer", 32);} { CodePart &cp=cs.append(CodePart::APPENDEDRETURNINGREQUIRED);cp.code()=std::string("//AMOXORW\n");cp.code()+="if (cpu->return_pending || cpu->exception) return cpu->exception;\n";} return true;}, 0, [](BitArray &ba, Instruction &instr) { etiss_uint8 rd=0;static BitArrayRange R_rd_0(11, 7);rd+=R_rd_0.read(ba)<< 0;etiss_uint8 rs1=0;static BitArrayRange R_rs1_0(19, 15);rs1+=R_rs1_0.read(ba)<< 0;etiss_uint8 rs2=0;static BitArrayRange R_rs2_0(24, 20);rs2+=R_rs2_0.read(ba)<< 0;etiss_uint8 rl=0;static BitArrayRange R_rl_0(25, 25);rl+=R_rl_0.read(ba)<< 0;etiss_uint8 aq=0;static BitArrayRange R_aq_0(26, 26);aq+=R_aq_0.read(ba)<< 0;std::stringstream ss;ss<< "amoxorw"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+" | rl="+std::to_string(rl)+" | aq="+std::to_string(aq)+"]");return ss.str();})
static __inline__ uint32_t
Contains a small code snipped.
@ APPENDEDRETURNINGREQUIRED
RegisterSet & getAffectedRegisters()
void append(const CodePart &part, CodePart::TYPE type)
void add(const RegisterPart &rp)
add a registerPart to the set or just its relevant bits if a register with the same name is already p...
Reading through it will only return bits within the range.
I read(const BitArray &ba)
reads bits from the range to the return value starting at the lsb.
this class contains parameters that persist in between instruction lookpus/translation within a trans...
uint64_t current_address_
start address of current instruction
holds information and translation callbacks for an instruction.
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.