We planned to upgrade GitLab and Mattermost to the latest version this Friday morning (early). You may experience some downtime!

Verified Commit 883c8913 authored by Camil Staps's avatar Camil Staps 🚀

Remove jsr_stack_check and stack_check (for debugging); add last missing types of instructions

parent d4943524
Pipeline #16738 passed with stages
in 17 minutes and 38 seconds
......@@ -87,11 +87,11 @@ const char *instruction_type (BC_WORD i) {
case Cbuildh2: return "l";
case Cbuildh3: return "l";
case Cbuildh4: return "l";
case Cbuildhr: return "?";
case Cbuildhra0: return "?";
case Cbuildhra1: return "?";
case Cbuildhr0b: return "?";
case Cbuildhr1b: return "?";
case Cbuildhr: return "nln";
case Cbuildhra0: return "nl";
case Cbuildhra1: return "nl";
case Cbuildhr0b: return "nl";
case Cbuildhr1b: return "nl";
case Cbuildhr01: return "l";
case Cbuildhr02: return "l";
case Cbuildhr03: return "l";
......@@ -141,7 +141,7 @@ const char *instruction_type (BC_WORD i) {
case Ccentry: return "";
case CcosR: return "";
case Ccreate: return "";
case Ccreates: return "?";
case Ccreates: return "n";
case Ccreate_array: return "";
case Ccreate_arrayBOOL: return "";
case Ccreate_arrayCHAR: return "";
......@@ -180,7 +180,7 @@ const char *instruction_type (BC_WORD i) {
case Ceq_desc_b0: return "l";
case Ceq_nulldesc: return "nl";
case CexpR: return "";
case Cfill: return "?";
case Cfill: return "nnl";
case Cfill0: return "nl";
case Cfill1_r0101: return "n";
case Cfill1_r0111: return "nl";
......@@ -229,7 +229,7 @@ const char *instruction_type (BC_WORD i) {
case Cfill3a10: return "nl";
case Cfill3a11: return "nln";
case Cfill3a12: return "nlnn";
case Cfill3aaab13: return "?";
case Cfill3aaab13: return "nlnnn";
case Cfillh3: return "nl";
case Cfillh4: return "nl";
case CfillB_b: return "nn";
......@@ -460,7 +460,7 @@ const char *instruction_type (BC_WORD i) {
case CselectCHAR: return "";
case CselectINT: return "";
case CselectREAL: return "";
case Cselect_r: return "?";
case Cselect_r: return "nn";
case Cselect_r01: return "";
case Cselect_r02: return "";
case Cselect_r03: return "";
......@@ -613,7 +613,7 @@ const char *instruction_type (BC_WORD i) {
case Ceval_upd32: return "";
case Cfill_a01_pop_rtn: return "";
case CaddIi: return "?";
case CaddIi: return "i";
case CandIi: return "i";
case CandIio: return "ni";
case Cbuildh0_dup_a: return "ln";
......@@ -623,7 +623,7 @@ const char *instruction_type (BC_WORD i) {
case Cbuildh0_put_a_jsr: return "lnl";
case Cbuildho2: return "nnl";
case Cbuildo1: return "nl";
case Cbuildo2: return "?";
case Cbuildo2: return "nnl";
case Cdup_a: return "n";
case Cdup2_a: return "n";
case Cdup3_a: return "n";
......@@ -648,7 +648,7 @@ const char *instruction_type (BC_WORD i) {
case Cjmp_ne_desc: return "nll";
case Cjmp_o_geI: return "nl";
case Cjmp_o_geI_arraysize_a: return "nnl";
case CltIi: return "?";
case CltIi: return "i";
case Cswap_b1: return "";
case Cpop_a_jmp: return "Nl";
case Cpop_a_jsr: return "Nl";
......@@ -697,9 +697,6 @@ const char *instruction_type (BC_WORD i) {
case Cupdates3pop_b: return "nnnn";
case Cupdates4_a: return "nnnnn";
case Cjsr_stack_check: return "?";
case Cstack_check: return "?";
case CA_data_IIIla: return "IIIla";
case CA_data_IIl: return "IIl";
case CA_data_IlI: return "IlI";
......
......@@ -683,9 +683,6 @@ enum {
INSTRUCTION(updates3pop_b)
INSTRUCTION(updates4_a)
INSTRUCTION(jsr_stack_check)
INSTRUCTION(stack_check)
/* Annotations */
/* A number of code elems that should not be parsed intelligently (see e.g. on IIIln) */
INSTRUCTION(A_data_IIIla) /* Three instruction-width elems, a label-width elem, and an arity */
......
......@@ -4294,15 +4294,6 @@ void code_o(int oa,int ob,uint32_t vector[]) {
exit(1);
}
}
#if 0
code[pgrm.code_size-2]=Cjsr_stack_check;
if (list_code)
printf("%d\t%d %d\n",pgrm.code_size,oa-last_da,ob-last_db);
store_code_elem(8, oa-last_da);
store_code_elem(8, ob-last_db);
add_instruction(Cstack_check);
#endif
}
last_jsr_with_d=0;
}
......
......@@ -8706,27 +8706,6 @@ eval_upd_n:
asp+=instr_arg-1;
END_INSTRUCTION_BLOCK;
}
INSTRUCTION_BLOCK(jsr_stack_check):
csp-=3;
csp[0]=(BC_WORD)&pc[4];
csp[1]=(BC_WORD)&asp[(BC_WORD)pc[2]];
csp[2]=(BC_WORD)&bsp[-(BC_WORD)pc[3]];
pc=(BC_WORD*)pc[1];
END_INSTRUCTION_BLOCK;
INSTRUCTION_BLOCK(stack_check):
if (csp[0]!=(BC_WORD)asp){
PRINTF("Cstack_check asp incorrect " BC_WORD_FMT " %p " BC_WORD_FMT " %p\n",csp[0],(void*)asp,csp[1],(void*)bsp);
PRINTF(BC_WORD_FMT " %d %d %d\n",*pc,(int)(pc-program->code),(int)(asp-stack),(int)(&stack[stack_size]-bsp));
exit (1);
}
if (csp[1]!=(BC_WORD)bsp){
PRINTF("Cstack_check bsp incorrect " BC_WORD_FMT " %p " BC_WORD_FMT " %p\n",csp[0],(void*)asp,csp[1],(void*)bsp);
PRINTF(BC_WORD_FMT " %d %d %d\n",*pc,(int)(pc-program->code),(int)(asp-stack),(int)(&stack[stack_size]-bsp));
exit (1);
}
csp+=2;
++pc;
END_INSTRUCTION_BLOCK;
INSTRUCTION_BLOCK(jesr):
g_asp=asp;
g_bsp=bsp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment