ALLOCATE_DATA fixed

This commit is contained in:
Nicolas Kruse 2025-10-12 23:23:59 +02:00
parent 37283e850d
commit 0356b5846d
1 changed files with 4 additions and 4 deletions

View File

@ -388,6 +388,10 @@ def compile_to_instruction_list(node_list: Iterable[Node], sdb: stencil_database
dw.write_value(net.source.value, lengths) dw.write_value(net.source.value, lengths)
# print(f'+ {net.dtype} {net.source.value}') # print(f'+ {net.dtype} {net.source.value}')
# allocate program data
dw.write_com(binw.Command.ALLOCATE_CODE)
dw.write_int(0)
# write auxiliary_functions # write auxiliary_functions
aux_function_names = sdb.get_sub_functions(node.name for _, node in extended_output_ops) aux_function_names = sdb.get_sub_functions(node.name for _, node in extended_output_ops)
aux_function_mem_layout, aux_function_lengths = get_aux_function_mem_layout(aux_function_names, sdb) aux_function_mem_layout, aux_function_lengths = get_aux_function_mem_layout(aux_function_names, sdb)
@ -436,10 +440,6 @@ def compile_to_instruction_list(node_list: Iterable[Node], sdb: stencil_database
offset += len(data) offset += len(data)
# print('function_end', offset, data) # print('function_end', offset, data)
# allocate program data
dw.write_com(binw.Command.ALLOCATE_CODE)
dw.write_int(offset)
# write program data # write program data
dw.write_com(binw.Command.COPY_CODE) dw.write_com(binw.Command.COPY_CODE)
dw.write_int(0) dw.write_int(0)