20 (uint32_t) 0xfe00707f,
31rd += R_rd_0.
read(ba) << 0;
34rs1 += R_rs1_0.
read(ba) << 0;
37rs2 += R_rs2_0.
read(ba) << 0;
44 cp.
code() = std::string(
"//MUL\n");
47cp.
code() +=
"etiss_coverage_count(1, 72);\n";
49cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
50cp.
code() +=
"{ // block\n";
52cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
53cp.
code() +=
"} // block\n";
56cp.
code() +=
"etiss_coverage_count(1, 2846);\n";
57cp.
code() +=
"{ // block\n";
58cp.
code() +=
"etiss_coverage_count(1, 2810);\n";
59if ((rd % 32ULL) != 0LL) {
60cp.
code() +=
"etiss_coverage_count(5, 2816, 2813, 2811, 2814, 2815);\n";
62cp.
code() +=
"etiss_coverage_count(1, 2845);\n";
63cp.
code() +=
"{ // block\n";
64cp.
code() +=
"etiss_int64 res = (etiss_int64)((etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL])) * (etiss_int64)((etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]));\n";
65cp.
code() +=
"etiss_coverage_count(12, 2835, 2834, 2825, 2823, 2822, 2821, 2819, 2833, 2831, 2830, 2829, 2827);\n";
66cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = (etiss_uint32)(res);\n";
67cp.
code() +=
"etiss_coverage_count(6, 2844, 2840, 2839, 2837, 2843, 2841);\n";
68cp.
code() +=
"} // block\n";
71cp.
code() +=
"} // block\n";
74cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
87rd += R_rd_0.read(ba) << 0;
90rs1 += R_rs1_0.read(ba) << 0;
93rs2 += R_rs2_0.read(ba) << 0;
99ss <<
"mul" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
"]");
109 (uint32_t) 0x2001033,
110 (uint32_t) 0xfe00707f,
121rd += R_rd_0.
read(ba) << 0;
124rs1 += R_rs1_0.
read(ba) << 0;
127rs2 += R_rs2_0.
read(ba) << 0;
134 cp.
code() = std::string(
"//MULH\n");
137cp.
code() +=
"etiss_coverage_count(1, 73);\n";
139cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
140cp.
code() +=
"{ // block\n";
142cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
143cp.
code() +=
"} // block\n";
146cp.
code() +=
"etiss_coverage_count(1, 2886);\n";
147cp.
code() +=
"{ // block\n";
148cp.
code() +=
"etiss_coverage_count(1, 2847);\n";
149if ((rd % 32ULL) != 0LL) {
150cp.
code() +=
"etiss_coverage_count(5, 2853, 2850, 2848, 2851, 2852);\n";
152cp.
code() +=
"etiss_coverage_count(1, 2885);\n";
153cp.
code() +=
"{ // block\n";
154cp.
code() +=
"etiss_int64 res = (etiss_int64)((etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL])) * (etiss_int64)((etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]));\n";
155cp.
code() +=
"etiss_coverage_count(12, 2872, 2871, 2862, 2860, 2859, 2858, 2856, 2870, 2868, 2867, 2866, 2864);\n";
156cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = (etiss_uint32)((res >> 32ULL));\n";
157cp.
code() +=
"etiss_coverage_count(8, 2884, 2877, 2876, 2874, 2883, 2880, 2878, 2881);\n";
158cp.
code() +=
"} // block\n";
161cp.
code() +=
"} // block\n";
164cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
177rd += R_rd_0.read(ba) << 0;
180rs1 += R_rs1_0.read(ba) << 0;
183rs2 += R_rs2_0.read(ba) << 0;
187 std::stringstream ss;
189ss <<
"mulh" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
"]");
199 (uint32_t) 0x2002033,
200 (uint32_t) 0xfe00707f,
211rd += R_rd_0.
read(ba) << 0;
214rs1 += R_rs1_0.
read(ba) << 0;
217rs2 += R_rs2_0.
read(ba) << 0;
224 cp.
code() = std::string(
"//MULHSU\n");
227cp.
code() +=
"etiss_coverage_count(1, 74);\n";
229cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
230cp.
code() +=
"{ // block\n";
232cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
233cp.
code() +=
"} // block\n";
236cp.
code() +=
"etiss_coverage_count(1, 2925);\n";
237cp.
code() +=
"{ // block\n";
238cp.
code() +=
"etiss_coverage_count(1, 2887);\n";
239if ((rd % 32ULL) != 0LL) {
240cp.
code() +=
"etiss_coverage_count(5, 2893, 2890, 2888, 2891, 2892);\n";
242cp.
code() +=
"etiss_coverage_count(1, 2924);\n";
243cp.
code() +=
"{ // block\n";
244cp.
code() +=
"etiss_int64 res = (etiss_int64)((etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL])) * (etiss_uint64)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]);\n";
245cp.
code() +=
"etiss_coverage_count(11, 2911, 2910, 2902, 2900, 2899, 2898, 2896, 2909, 2907, 2906, 2904);\n";
246cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = (etiss_uint32)((res >> 32ULL));\n";
247cp.
code() +=
"etiss_coverage_count(8, 2923, 2916, 2915, 2913, 2922, 2919, 2917, 2920);\n";
248cp.
code() +=
"} // block\n";
251cp.
code() +=
"} // block\n";
254cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
267rd += R_rd_0.read(ba) << 0;
270rs1 += R_rs1_0.read(ba) << 0;
273rs2 += R_rs2_0.read(ba) << 0;
277 std::stringstream ss;
279ss <<
"mulhsu" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
"]");
289 (uint32_t) 0x2003033,
290 (uint32_t) 0xfe00707f,
301rd += R_rd_0.
read(ba) << 0;
304rs1 += R_rs1_0.
read(ba) << 0;
307rs2 += R_rs2_0.
read(ba) << 0;
314 cp.
code() = std::string(
"//MULHU\n");
317cp.
code() +=
"etiss_coverage_count(1, 75);\n";
319cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
320cp.
code() +=
"{ // block\n";
322cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
323cp.
code() +=
"} // block\n";
326cp.
code() +=
"etiss_coverage_count(1, 2963);\n";
327cp.
code() +=
"{ // block\n";
328cp.
code() +=
"etiss_coverage_count(1, 2926);\n";
329if ((rd % 32ULL) != 0LL) {
330cp.
code() +=
"etiss_coverage_count(5, 2932, 2929, 2927, 2930, 2931);\n";
332cp.
code() +=
"etiss_coverage_count(1, 2962);\n";
333cp.
code() +=
"{ // block\n";
334cp.
code() +=
"etiss_uint64 res = (etiss_uint64)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL]) * (etiss_uint64)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]);\n";
335cp.
code() +=
"etiss_coverage_count(10, 2949, 2948, 2940, 2938, 2937, 2935, 2947, 2945, 2944, 2942);\n";
336cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = (etiss_uint32)((res >> 32ULL));\n";
337cp.
code() +=
"etiss_coverage_count(8, 2961, 2954, 2953, 2951, 2960, 2957, 2955, 2958);\n";
338cp.
code() +=
"} // block\n";
341cp.
code() +=
"} // block\n";
344cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
357rd += R_rd_0.read(ba) << 0;
360rs1 += R_rs1_0.read(ba) << 0;
363rs2 += R_rs2_0.read(ba) << 0;
367 std::stringstream ss;
369ss <<
"mulhu" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
"]");
379 (uint32_t) 0x2004033,
380 (uint32_t) 0xfe00707f,
391rd += R_rd_0.
read(ba) << 0;
394rs1 += R_rs1_0.
read(ba) << 0;
397rs2 += R_rs2_0.
read(ba) << 0;
404 cp.
code() = std::string(
"//DIV\n");
407cp.
code() +=
"etiss_coverage_count(1, 76);\n";
409cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
410cp.
code() +=
"{ // block\n";
412cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
413cp.
code() +=
"} // block\n";
416cp.
code() +=
"etiss_coverage_count(1, 3044);\n";
417cp.
code() +=
"{ // block\n";
418cp.
code() +=
"etiss_coverage_count(1, 2964);\n";
419if ((rd % 32ULL) != 0LL) {
420cp.
code() +=
"etiss_coverage_count(5, 2970, 2967, 2965, 2968, 2969);\n";
422cp.
code() +=
"etiss_coverage_count(1, 3043);\n";
423cp.
code() +=
"{ // block\n";
424cp.
code() +=
"etiss_coverage_count(1, 2971);\n";
425cp.
code() +=
"if (*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL] != 0LL) { // conditional\n";
426cp.
code() +=
"etiss_coverage_count(5, 2978, 2976, 2975, 2973, 2977);\n";
428cp.
code() +=
"etiss_coverage_count(1, 3034);\n";
429cp.
code() +=
"{ // block\n";
431cp.
code() +=
"etiss_coverage_count(1, 2986);\n";
432cp.
code() +=
"etiss_coverage_count(1, 2987);\n";
433cp.
code() +=
"if (*((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL] == " + std::to_string(MMIN) +
"ULL && (etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]) == -1LL) { // conditional\n";
434cp.
code() +=
"etiss_coverage_count(11, 3005, 2994, 2992, 2991, 2989, 2993, 3004, 3001, 2999, 2998, 2996);\n";
435cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = " + std::to_string(MMIN) +
"ULL;\n";
436cp.
code() +=
"etiss_coverage_count(5, 3012, 3010, 3009, 3007, 3011);\n";
437cp.
code() +=
"} // conditional\n";
438cp.
code() +=
"else { // conditional\n";
439cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = (etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL]) / (etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]);\n";
440cp.
code() +=
"etiss_coverage_count(13, 3033, 3017, 3016, 3014, 3032, 3024, 3022, 3021, 3019, 3031, 3029, 3028, 3026);\n";
441cp.
code() +=
"} // conditional\n";
442cp.
code() +=
"} // block\n";
444cp.
code() +=
"} // conditional\n";
445cp.
code() +=
"else { // conditional\n";
446cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = -1LL;\n";
447cp.
code() +=
"etiss_coverage_count(4, 3042, 3039, 3038, 3036);\n";
448cp.
code() +=
"} // conditional\n";
449cp.
code() +=
"} // block\n";
452cp.
code() +=
"} // block\n";
455cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
468rd += R_rd_0.read(ba) << 0;
471rs1 += R_rs1_0.read(ba) << 0;
474rs2 += R_rs2_0.read(ba) << 0;
478 std::stringstream ss;
480ss <<
"div" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
"]");
490 (uint32_t) 0x2005033,
491 (uint32_t) 0xfe00707f,
502rd += R_rd_0.
read(ba) << 0;
505rs1 += R_rs1_0.
read(ba) << 0;
508rs2 += R_rs2_0.
read(ba) << 0;
515 cp.
code() = std::string(
"//DIVU\n");
518cp.
code() +=
"etiss_coverage_count(1, 77);\n";
520cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
521cp.
code() +=
"{ // block\n";
523cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
524cp.
code() +=
"} // block\n";
527cp.
code() +=
"etiss_coverage_count(1, 3086);\n";
528cp.
code() +=
"{ // block\n";
529cp.
code() +=
"etiss_coverage_count(1, 3045);\n";
530if ((rd % 32ULL) != 0LL) {
531cp.
code() +=
"etiss_coverage_count(5, 3051, 3048, 3046, 3049, 3050);\n";
533cp.
code() +=
"etiss_coverage_count(1, 3085);\n";
534cp.
code() +=
"{ // block\n";
535cp.
code() +=
"etiss_coverage_count(1, 3052);\n";
536cp.
code() +=
"if (*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL] != 0LL) { // conditional\n";
537cp.
code() +=
"etiss_coverage_count(5, 3059, 3057, 3056, 3054, 3058);\n";
538cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL] / *((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL];\n";
539cp.
code() +=
"etiss_coverage_count(11, 3076, 3064, 3063, 3061, 3075, 3069, 3068, 3066, 3074, 3073, 3071);\n";
540cp.
code() +=
"} // conditional\n";
541cp.
code() +=
"else { // conditional\n";
542cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = -1LL;\n";
543cp.
code() +=
"etiss_coverage_count(4, 3084, 3081, 3080, 3078);\n";
544cp.
code() +=
"} // conditional\n";
545cp.
code() +=
"} // block\n";
548cp.
code() +=
"} // block\n";
551cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
564rd += R_rd_0.read(ba) << 0;
567rs1 += R_rs1_0.read(ba) << 0;
570rs2 += R_rs2_0.read(ba) << 0;
574 std::stringstream ss;
576ss <<
"divu" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
"]");
586 (uint32_t) 0x2006033,
587 (uint32_t) 0xfe00707f,
598rd += R_rd_0.
read(ba) << 0;
601rs1 += R_rs1_0.
read(ba) << 0;
604rs2 += R_rs2_0.
read(ba) << 0;
611 cp.
code() = std::string(
"//REM\n");
614cp.
code() +=
"etiss_coverage_count(1, 78);\n";
616cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
617cp.
code() +=
"{ // block\n";
619cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
620cp.
code() +=
"} // block\n";
623cp.
code() +=
"etiss_coverage_count(1, 3170);\n";
624cp.
code() +=
"{ // block\n";
625cp.
code() +=
"etiss_coverage_count(1, 3087);\n";
626if ((rd % 32ULL) != 0LL) {
627cp.
code() +=
"etiss_coverage_count(5, 3093, 3090, 3088, 3091, 3092);\n";
629cp.
code() +=
"etiss_coverage_count(1, 3169);\n";
630cp.
code() +=
"{ // block\n";
631cp.
code() +=
"etiss_coverage_count(1, 3094);\n";
632cp.
code() +=
"if (*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL] != 0LL) { // conditional\n";
633cp.
code() +=
"etiss_coverage_count(5, 3101, 3099, 3098, 3096, 3100);\n";
635cp.
code() +=
"etiss_coverage_count(1, 3157);\n";
636cp.
code() +=
"{ // block\n";
638cp.
code() +=
"etiss_coverage_count(1, 3109);\n";
639cp.
code() +=
"etiss_coverage_count(1, 3110);\n";
640cp.
code() +=
"if (*((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL] == " + std::to_string(MMIN) +
"ULL && (etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]) == -1LL) { // conditional\n";
641cp.
code() +=
"etiss_coverage_count(11, 3128, 3117, 3115, 3114, 3112, 3116, 3127, 3124, 3122, 3121, 3119);\n";
642cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = 0LL;\n";
643cp.
code() +=
"etiss_coverage_count(5, 3135, 3133, 3132, 3130, 3134);\n";
644cp.
code() +=
"} // conditional\n";
645cp.
code() +=
"else { // conditional\n";
646cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = (etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL]) % (etiss_int32)(*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL]);\n";
647cp.
code() +=
"etiss_coverage_count(13, 3156, 3140, 3139, 3137, 3155, 3147, 3145, 3144, 3142, 3154, 3152, 3151, 3149);\n";
648cp.
code() +=
"} // conditional\n";
649cp.
code() +=
"} // block\n";
651cp.
code() +=
"} // conditional\n";
652cp.
code() +=
"else { // conditional\n";
653cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL];\n";
654cp.
code() +=
"etiss_coverage_count(7, 3168, 3162, 3161, 3159, 3167, 3166, 3164);\n";
655cp.
code() +=
"} // conditional\n";
656cp.
code() +=
"} // block\n";
659cp.
code() +=
"} // block\n";
662cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
675rd += R_rd_0.read(ba) << 0;
678rs1 += R_rs1_0.read(ba) << 0;
681rs2 += R_rs2_0.read(ba) << 0;
685 std::stringstream ss;
687ss <<
"rem" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
"]");
697 (uint32_t) 0x2007033,
698 (uint32_t) 0xfe00707f,
709rd += R_rd_0.
read(ba) << 0;
712rs1 += R_rs1_0.
read(ba) << 0;
715rs2 += R_rs2_0.
read(ba) << 0;
722 cp.
code() = std::string(
"//REMU\n");
725cp.
code() +=
"etiss_coverage_count(1, 79);\n";
727cp.
code() +=
"etiss_coverage_count(1, 1169);\n";
728cp.
code() +=
"{ // block\n";
730cp.
code() +=
"etiss_coverage_count(5, 1168, 1164, 1167, 1165, 1166);\n";
731cp.
code() +=
"} // block\n";
734cp.
code() +=
"etiss_coverage_count(1, 3215);\n";
735cp.
code() +=
"{ // block\n";
736cp.
code() +=
"etiss_coverage_count(1, 3171);\n";
737if ((rd % 32ULL) != 0LL) {
738cp.
code() +=
"etiss_coverage_count(5, 3177, 3174, 3172, 3175, 3176);\n";
740cp.
code() +=
"etiss_coverage_count(1, 3214);\n";
741cp.
code() +=
"{ // block\n";
742cp.
code() +=
"etiss_coverage_count(1, 3178);\n";
743cp.
code() +=
"if (*((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL] != 0LL) { // conditional\n";
744cp.
code() +=
"etiss_coverage_count(5, 3185, 3183, 3182, 3180, 3184);\n";
745cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL] % *((RV32IMACFD*)cpu)->X[" + std::to_string(rs2 % 32ULL) +
"ULL];\n";
746cp.
code() +=
"etiss_coverage_count(11, 3202, 3190, 3189, 3187, 3201, 3195, 3194, 3192, 3200, 3199, 3197);\n";
747cp.
code() +=
"} // conditional\n";
748cp.
code() +=
"else { // conditional\n";
749cp.
code() +=
"*((RV32IMACFD*)cpu)->X[" + std::to_string(rd % 32ULL) +
"ULL] = *((RV32IMACFD*)cpu)->X[" + std::to_string(rs1 % 32ULL) +
"ULL];\n";
750cp.
code() +=
"etiss_coverage_count(7, 3213, 3207, 3206, 3204, 3212, 3211, 3209);\n";
751cp.
code() +=
"} // conditional\n";
752cp.
code() +=
"} // block\n";
755cp.
code() +=
"} // block\n";
758cp.
code() +=
"cpu->instructionPointer = cpu->nextPc;\n";
771rd += R_rd_0.read(ba) << 0;
774rs1 += R_rs1_0.read(ba) << 0;
777rs2 += R_rs2_0.read(ba) << 0;
781 std::stringstream ss;
783ss <<
"remu" <<
" # " << ba << (
" [rd=" + std::to_string(rd) +
" | rs1=" + std::to_string(rs1) +
" | rs2=" + std::to_string(rs2) +
"]");
etiss::instr::InstructionGroup ISA32_RV32IMACFD("ISA32_RV32IMACFD", 32)
static InstructionDefinition divu_rd_rs1_rs2(ISA32_RV32IMACFD, "divu",(uint32_t) 0x2005033,(uint32_t) 0xfe00707f, [](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;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//DIVU\n");cp.code()+="etiss_coverage_count(1, 77);\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, 3086);\n";cp.code()+="{ // block\n";cp.code()+="etiss_coverage_count(1, 3045);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 3051, 3048, 3046, 3049, 3050);\n";{ cp.code()+="etiss_coverage_count(1, 3085);\n";cp.code()+="{ // block\n";cp.code()+="etiss_coverage_count(1, 3052);\n";cp.code()+="if (*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL] != 0LL) { // conditional\n";cp.code()+="etiss_coverage_count(5, 3059, 3057, 3056, 3054, 3058);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL] / *((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(11, 3076, 3064, 3063, 3061, 3075, 3069, 3068, 3066, 3074, 3073, 3071);\n";cp.code()+="} // conditional\n";cp.code()+="else { // conditional\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = -1LL;\n";cp.code()+="etiss_coverage_count(4, 3084, 3081, 3080, 3078);\n";cp.code()+="} // conditional\n";cp.code()+="} // block\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);} 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;std::stringstream ss;ss<< "divu"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+"]");return ss.str();})
static InstructionDefinition mulh_rd_rs1_rs2(ISA32_RV32IMACFD, "mulh",(uint32_t) 0x2001033,(uint32_t) 0xfe00707f, [](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;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//MULH\n");cp.code()+="etiss_coverage_count(1, 73);\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, 2886);\n";cp.code()+="{ // block\n";cp.code()+="etiss_coverage_count(1, 2847);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 2853, 2850, 2848, 2851, 2852);\n";{ cp.code()+="etiss_coverage_count(1, 2885);\n";cp.code()+="{ // block\n";cp.code()+="etiss_int64 res = (etiss_int64)((etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL])) * (etiss_int64)((etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]));\n";cp.code()+="etiss_coverage_count(12, 2872, 2871, 2862, 2860, 2859, 2858, 2856, 2870, 2868, 2867, 2866, 2864);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = (etiss_uint32)((res >> 32ULL));\n";cp.code()+="etiss_coverage_count(8, 2884, 2877, 2876, 2874, 2883, 2880, 2878, 2881);\n";cp.code()+="} // block\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);} 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;std::stringstream ss;ss<< "mulh"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+"]");return ss.str();})
static InstructionDefinition rem_rd_rs1_rs2(ISA32_RV32IMACFD, "rem",(uint32_t) 0x2006033,(uint32_t) 0xfe00707f, [](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;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//REM\n");cp.code()+="etiss_coverage_count(1, 78);\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, 3170);\n";cp.code()+="{ // block\n";cp.code()+="etiss_coverage_count(1, 3087);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 3093, 3090, 3088, 3091, 3092);\n";{ cp.code()+="etiss_coverage_count(1, 3169);\n";cp.code()+="{ // block\n";cp.code()+="etiss_coverage_count(1, 3094);\n";cp.code()+="if (*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL] != 0LL) { // conditional\n";cp.code()+="etiss_coverage_count(5, 3101, 3099, 3098, 3096, 3100);\n";{ cp.code()+="etiss_coverage_count(1, 3157);\n";cp.code()+="{ // block\n";etiss_uint32 MMIN=2147483648ULL;cp.code()+="etiss_coverage_count(1, 3109);\n";cp.code()+="etiss_coverage_count(1, 3110);\n";cp.code()+="if (*((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL] == "+std::to_string(MMIN)+"ULL && (etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]) == -1LL) { // conditional\n";cp.code()+="etiss_coverage_count(11, 3128, 3117, 3115, 3114, 3112, 3116, 3127, 3124, 3122, 3121, 3119);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = 0LL;\n";cp.code()+="etiss_coverage_count(5, 3135, 3133, 3132, 3130, 3134);\n";cp.code()+="} // conditional\n";cp.code()+="else { // conditional\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = (etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL]) % (etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]);\n";cp.code()+="etiss_coverage_count(13, 3156, 3140, 3139, 3137, 3155, 3147, 3145, 3144, 3142, 3154, 3152, 3151, 3149);\n";cp.code()+="} // conditional\n";cp.code()+="} // block\n";} cp.code()+="} // conditional\n";cp.code()+="else { // conditional\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(7, 3168, 3162, 3161, 3159, 3167, 3166, 3164);\n";cp.code()+="} // conditional\n";cp.code()+="} // block\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);} 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;std::stringstream ss;ss<< "rem"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+"]");return ss.str();})
static InstructionDefinition div_rd_rs1_rs2(ISA32_RV32IMACFD, "div",(uint32_t) 0x2004033,(uint32_t) 0xfe00707f, [](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;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//DIV\n");cp.code()+="etiss_coverage_count(1, 76);\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, 3044);\n";cp.code()+="{ // block\n";cp.code()+="etiss_coverage_count(1, 2964);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 2970, 2967, 2965, 2968, 2969);\n";{ cp.code()+="etiss_coverage_count(1, 3043);\n";cp.code()+="{ // block\n";cp.code()+="etiss_coverage_count(1, 2971);\n";cp.code()+="if (*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL] != 0LL) { // conditional\n";cp.code()+="etiss_coverage_count(5, 2978, 2976, 2975, 2973, 2977);\n";{ cp.code()+="etiss_coverage_count(1, 3034);\n";cp.code()+="{ // block\n";etiss_uint32 MMIN=2147483648ULL;cp.code()+="etiss_coverage_count(1, 2986);\n";cp.code()+="etiss_coverage_count(1, 2987);\n";cp.code()+="if (*((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL] == "+std::to_string(MMIN)+"ULL && (etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]) == -1LL) { // conditional\n";cp.code()+="etiss_coverage_count(11, 3005, 2994, 2992, 2991, 2989, 2993, 3004, 3001, 2999, 2998, 2996);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = "+std::to_string(MMIN)+"ULL;\n";cp.code()+="etiss_coverage_count(5, 3012, 3010, 3009, 3007, 3011);\n";cp.code()+="} // conditional\n";cp.code()+="else { // conditional\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = (etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL]) / (etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]);\n";cp.code()+="etiss_coverage_count(13, 3033, 3017, 3016, 3014, 3032, 3024, 3022, 3021, 3019, 3031, 3029, 3028, 3026);\n";cp.code()+="} // conditional\n";cp.code()+="} // block\n";} cp.code()+="} // conditional\n";cp.code()+="else { // conditional\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = -1LL;\n";cp.code()+="etiss_coverage_count(4, 3042, 3039, 3038, 3036);\n";cp.code()+="} // conditional\n";cp.code()+="} // block\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);} 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;std::stringstream ss;ss<< "div"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+"]");return ss.str();})
static InstructionDefinition mulhsu_rd_rs1_rs2(ISA32_RV32IMACFD, "mulhsu",(uint32_t) 0x2002033,(uint32_t) 0xfe00707f, [](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;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//MULHSU\n");cp.code()+="etiss_coverage_count(1, 74);\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, 2925);\n";cp.code()+="{ // block\n";cp.code()+="etiss_coverage_count(1, 2887);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 2893, 2890, 2888, 2891, 2892);\n";{ cp.code()+="etiss_coverage_count(1, 2924);\n";cp.code()+="{ // block\n";cp.code()+="etiss_int64 res = (etiss_int64)((etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL])) * (etiss_uint64)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]);\n";cp.code()+="etiss_coverage_count(11, 2911, 2910, 2902, 2900, 2899, 2898, 2896, 2909, 2907, 2906, 2904);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = (etiss_uint32)((res >> 32ULL));\n";cp.code()+="etiss_coverage_count(8, 2923, 2916, 2915, 2913, 2922, 2919, 2917, 2920);\n";cp.code()+="} // block\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);} 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;std::stringstream ss;ss<< "mulhsu"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+"]");return ss.str();})
static InstructionDefinition mulhu_rd_rs1_rs2(ISA32_RV32IMACFD, "mulhu",(uint32_t) 0x2003033,(uint32_t) 0xfe00707f, [](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;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//MULHU\n");cp.code()+="etiss_coverage_count(1, 75);\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, 2963);\n";cp.code()+="{ // block\n";cp.code()+="etiss_coverage_count(1, 2926);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 2932, 2929, 2927, 2930, 2931);\n";{ cp.code()+="etiss_coverage_count(1, 2962);\n";cp.code()+="{ // block\n";cp.code()+="etiss_uint64 res = (etiss_uint64)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL]) * (etiss_uint64)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]);\n";cp.code()+="etiss_coverage_count(10, 2949, 2948, 2940, 2938, 2937, 2935, 2947, 2945, 2944, 2942);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = (etiss_uint32)((res >> 32ULL));\n";cp.code()+="etiss_coverage_count(8, 2961, 2954, 2953, 2951, 2960, 2957, 2955, 2958);\n";cp.code()+="} // block\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);} 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;std::stringstream ss;ss<< "mulhu"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+"]");return ss.str();})
static InstructionDefinition mul_rd_rs1_rs2(ISA32_RV32IMACFD, "mul",(uint32_t) 0x2000033,(uint32_t) 0xfe00707f, [](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;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//MUL\n");cp.code()+="etiss_coverage_count(1, 72);\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, 2846);\n";cp.code()+="{ // block\n";cp.code()+="etiss_coverage_count(1, 2810);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 2816, 2813, 2811, 2814, 2815);\n";{ cp.code()+="etiss_coverage_count(1, 2845);\n";cp.code()+="{ // block\n";cp.code()+="etiss_int64 res = (etiss_int64)((etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL])) * (etiss_int64)((etiss_int32)(*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL]));\n";cp.code()+="etiss_coverage_count(12, 2835, 2834, 2825, 2823, 2822, 2821, 2819, 2833, 2831, 2830, 2829, 2827);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = (etiss_uint32)(res);\n";cp.code()+="etiss_coverage_count(6, 2844, 2840, 2839, 2837, 2843, 2841);\n";cp.code()+="} // block\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);} 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;std::stringstream ss;ss<< "mul"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+"]");return ss.str();})
static InstructionDefinition remu_rd_rs1_rs2(ISA32_RV32IMACFD, "remu",(uint32_t) 0x2007033,(uint32_t) 0xfe00707f, [](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;{ CodePart &cp=cs.append(CodePart::INITIALREQUIRED);cp.code()=std::string("//REMU\n");cp.code()+="etiss_coverage_count(1, 79);\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, 3215);\n";cp.code()+="{ // block\n";cp.code()+="etiss_coverage_count(1, 3171);\n";if((rd % 32ULL) !=0LL) { cp.code()+="etiss_coverage_count(5, 3177, 3174, 3172, 3175, 3176);\n";{ cp.code()+="etiss_coverage_count(1, 3214);\n";cp.code()+="{ // block\n";cp.code()+="etiss_coverage_count(1, 3178);\n";cp.code()+="if (*((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL] != 0LL) { // conditional\n";cp.code()+="etiss_coverage_count(5, 3185, 3183, 3182, 3180, 3184);\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL] % *((RV32IMACFD*)cpu)->X["+std::to_string(rs2 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(11, 3202, 3190, 3189, 3187, 3201, 3195, 3194, 3192, 3200, 3199, 3197);\n";cp.code()+="} // conditional\n";cp.code()+="else { // conditional\n";cp.code()+="*((RV32IMACFD*)cpu)->X["+std::to_string(rd % 32ULL)+"ULL] = *((RV32IMACFD*)cpu)->X["+std::to_string(rs1 % 32ULL)+"ULL];\n";cp.code()+="etiss_coverage_count(7, 3213, 3207, 3206, 3204, 3212, 3211, 3209);\n";cp.code()+="} // conditional\n";cp.code()+="} // block\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);} 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;std::stringstream ss;ss<< "remu"<< " # "<< ba<<(" [rd="+std::to_string(rd)+" | rs1="+std::to_string(rs1)+" | rs2="+std::to_string(rs2)+"]");return ss.str();})
Contains a small code snipped.
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.