Verified Commit 8df29455 authored by Camil Staps's avatar Camil Staps 🚀

Fix 6e2653e0 (use 2 instead of 4 bytes for labels): for .n and .nu we may add...

Fix 6e2653e0 (use 2 instead of 4 bytes for labels): for .n and .nu we may add NULL labels and these need to be stored as 2 instead of 4 bytes as well
parent 7a0856e1
Pipeline #28907 passed with stages
in 13 minutes and 6 seconds
......@@ -367,13 +367,6 @@ void add_data2_to_code(int i) {
store_code_elem(2, i);
}
void add_data4_to_code(int i) {
if (list_code)
printf("%d\t.data4 %d\n",pgrm.code_size,i);
store_code_elem(4, i);
}
void add_data8_to_code(int i) {
if (list_code)
printf("%d\t.data8 %d\n",pgrm.code_size,i);
......@@ -4299,7 +4292,7 @@ struct label *code_descriptor
label=enter_label("_add_arg");
} else {
Fadd_arg_label_used[n]=1;
char label_name[11];
char label_name[19];
sprintf(label_name,"_add_arg%d",n);
label = enter_label(label_name);
}
......@@ -4554,7 +4547,7 @@ void code_n(int32_t number_of_arguments, char *descriptor_name, char *ea_label_n
}
if (descriptor_name==NULL)
add_data4_to_code(0);
add_data2_to_code(0);
else
add_label(descriptor_name);
} else if (descriptor_name != NULL) {
......@@ -4584,7 +4577,7 @@ void code_nu(int a_size,int b_size,char *descriptor_name,char *ea_label_name) {
add_instruction(Chalt);
if (descriptor_name==NULL)
add_data4_to_code(0);
add_data2_to_code(0);
else
add_label(descriptor_name);
} else if (descriptor_name!=NULL) {
......
......@@ -27,4 +27,4 @@ typedef int64_t CleanInt;
#define BCGEN_INSTRUCTION_TABLE_SIZE 512
#define ABC_MAGIC_NUMBER 0x2a434241
#define ABC_VERSION 11
#define ABC_VERSION 12
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