From 88630ebbea03e85119cf9795320a83cb846bdd20 Mon Sep 17 00:00:00 2001 From: Carlos Maniero Date: Wed, 10 May 2023 01:43:40 -0300 Subject: gas: Implement && and || for if statements Now if statements are complete! The function %gas_assembly_generator_compile_condition% is generic and will be used for any other flow-control statment. The only requirement to it work is having two labels: One to jump when the condition is true, and another one when the condition is false. Signed-off-by: Carlos Maniero --- src/gas_assembly_generator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gas_assembly_generator.h') diff --git a/src/gas_assembly_generator.h b/src/gas_assembly_generator.h index 3d9a43c..2e195fb 100644 --- a/src/gas_assembly_generator.h +++ b/src/gas_assembly_generator.h @@ -46,7 +46,7 @@ typedef struct gas_assembly_generator_t FILE *stream; vector_t *refs; int stack_offset; - uint64_t label_counter; + uint64_t cur_label_index; evaluation_result_t latest_evaluation; } gas_assembly_generator_t; -- cgit v1.2.3