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

Verified Commit afc77975 authored by Camil Staps's avatar Camil Staps 🚀

Add buildhr04 instruction

parent 2b47e558
......@@ -95,6 +95,7 @@ const char *instruction_type (BC_WORD i) {
case Cbuildhr01: return "l";
case Cbuildhr02: return "l";
case Cbuildhr03: return "l";
case Cbuildhr04: return "l";
case Cbuildhr10: return "l";
case Cbuildhr11: return "l";
case Cbuildhr12: return "l";
......
......@@ -66,6 +66,7 @@ enum {
INSTRUCTION(buildhr01)
INSTRUCTION(buildhr02)
INSTRUCTION(buildhr03)
INSTRUCTION(buildhr04)
INSTRUCTION(buildhr10)
INSTRUCTION(buildhr11)
INSTRUCTION(buildhr12)
......
......@@ -1065,6 +1065,10 @@ void code_buildhr(char descriptor_name[],int a_size,int b_size) {
add_instruction_label_offset(Cbuildhr03,descriptor_name,2);
return;
}
if (b_size==4) {
add_instruction_label_offset(Cbuildhr04,descriptor_name,2);
return;
}
} else if (a_size==1) {
if (b_size==0) {
add_instruction_label_offset(Cbuildhr10,descriptor_name,2);
......
......@@ -697,6 +697,21 @@ INSTRUCTION_BLOCK(buildhr03):
pc+=2;
END_INSTRUCTION_BLOCK;
}
INSTRUCTION_BLOCK(buildhr04):
{
NEED_HEAP(6);
hp[0]=pc[1];
hp[1]=bsp[0];
hp[2]=(BC_WORD)&hp[3];
hp[3]=bsp[1];
hp[4]=bsp[2];
hp[5]=bsp[3];
*++asp=(BC_WORD)hp;
bsp+=4;
hp+=6;
pc+=2;
END_INSTRUCTION_BLOCK;
}
INSTRUCTION_BLOCK(buildhr11):
NEED_HEAP(3);
hp[0]=pc[1];
......
......@@ -27,4 +27,4 @@ typedef int64_t CleanInt;
#define BCGEN_INSTRUCTION_TABLE_SIZE 512
#define ABC_MAGIC_NUMBER 0x2a434241
#define ABC_VERSION 1
#define ABC_VERSION 2
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