From ccd84ec768417a8bc43fba8bbd8798aaaa558ac0 Mon Sep 17 00:00:00 2001 From: AMIR <31338382+amiremohamadi@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:12:30 +0330 Subject: [PATCH] fix: apply proper offset for pointers in unary operations (#45) --- examples/inp_pointer.c | 3 + parser/expr/expr.c | 11 +- tests/output/inp_pointer.c_asm_output.txt | 558 +++++++++++---------- tests/output/inp_pointer.c_lex_output.txt | Bin 4214 -> 4444 bytes tests/output/inp_pointer.c_tree_output.txt | 20 + 5 files changed, 338 insertions(+), 254 deletions(-) diff --git a/examples/inp_pointer.c b/examples/inp_pointer.c index 5a7a9f0..a3a52a5 100644 --- a/examples/inp_pointer.c +++ b/examples/inp_pointer.c @@ -14,6 +14,9 @@ int main() printf("*a: %d\n", *a++); } + printf("*--a %d\n", *--a); + printf("*--a %d\n", *--a); + char *s = (char *)malloc(10 * sizeof(char)); s[0] = '1'; s[1] = 'h'; diff --git a/parser/expr/expr.c b/parser/expr/expr.c index c963872..ffa4ec5 100644 --- a/parser/expr/expr.c +++ b/parser/expr/expr.c @@ -110,6 +110,13 @@ apply_result *unary_op_apply(parser_node *node, context *ctx) int op = unary_op->op; + int unit = 1; + if (operand->type->kind == TYPE_POINTER) + { + general_type *type = ((node_type *)operand->type->data)->type; + unit = type->size(type, ctx); + } + if (op == TKN_MIN) { add_text(ctx, "neg rax"); @@ -122,12 +129,12 @@ apply_result *unary_op_apply(parser_node *node, context *ctx) } else if (op == TKN_MINMIN) { - add_text(ctx, "sub rax, 1"); + add_text(ctx, "sub rax, %d", unit); move_reg_to_var(ctx, operand, "rax"); } else if (op == TKN_PLUSPLUS) { - add_text(ctx, "add rax, 1"); + add_text(ctx, "add rax, %d", unit); move_reg_to_var(ctx, operand, "rax"); } diff --git a/tests/output/inp_pointer.c_asm_output.txt b/tests/output/inp_pointer.c_asm_output.txt index 8e65ba9..70ef4d1 100644 --- a/tests/output/inp_pointer.c_asm_output.txt +++ b/tests/output/inp_pointer.c_asm_output.txt @@ -3,12 +3,14 @@ __printf_size: equ 16 __malloc_size: equ 16 __temp_str_2 db `a[4] %d\n`, 0 __temp_str_3 db `*a: %d\n`, 0 -__temp_str_4 db `s %c\n`, 0 -__temp_str_5 db `s %s`, 0 -__temp_str_6 db `arr[0][0] %d\n`, 0 -__temp_str_7 db `arr[1][0] %d\n`, 0 -__temp_str_8 db `arr[1][1] %d\n`, 0 -__main_size: equ 1168 +__temp_str_4 db `*--a %d\n`, 0 +__temp_str_5 db `*--a %d\n`, 0 +__temp_str_6 db `s %c\n`, 0 +__temp_str_7 db `s %s`, 0 +__temp_str_8 db `arr[0][0] %d\n`, 0 +__temp_str_9 db `arr[1][0] %d\n`, 0 +__temp_str_10 db `arr[1][1] %d\n`, 0 +__main_size: equ 1280 section .text extern printf extern malloc @@ -177,473 +179,525 @@ mov [rsp+184], rax jmp __tmp_label_4 __tmp_label_5: ; exit loop +mov rax, __temp_str_4 +mov [rsp+128], rax +; unary op apply +mov rax, rsp +add rax, 0 +mov [rsp+136], rax +; operand code: [rsp+0] +mov rax, [rsp+0] +sub rax, 8 +mov rbx, [rsp+136] +mov [rbx], rax +mov [rsp+144], rax +; unary op finish +mov rax, [rsp+144] +mov [rsp+152], rax +mov rax, [rax] +mov [rsp+160], rax +mov rax, [rsp+160] +mov [rsp+168], rax +mov rdi, [rsp+128] +mov rsi, [rsp+168] +mov rax, rsp +add rax, 0 +mov [rsp+176], rax +call printf +mov [rsp+184], rax +mov rax, __temp_str_5 +mov [rsp+184], rax +; unary op apply +mov rax, rsp +add rax, 0 +mov [rsp+192], rax +; operand code: [rsp+0] +mov rax, [rsp+0] +sub rax, 8 +mov rbx, [rsp+192] +mov [rbx], rax +mov [rsp+200], rax +; unary op finish +mov rax, [rsp+200] +mov [rsp+208], rax +mov rax, [rax] +mov [rsp+216], rax +mov rax, [rsp+216] +mov [rsp+224], rax +mov rdi, [rsp+184] +mov rsi, [rsp+224] +mov rax, rsp +add rax, 0 +mov [rsp+232], rax +call printf +mov [rsp+240], rax mov rax, 10 mov rbx, 1 mul rbx -mov [rsp+136], rax -mov rax, [rsp+136] -mov [rsp+144], rax -mov rdi, [rsp+144] +mov [rsp+248], rax +mov rax, [rsp+248] +mov [rsp+256], rax +mov rdi, [rsp+256] mov rax, rsp add rax, 0 -mov [rsp+152], rax +mov [rsp+264], rax call malloc -mov [rsp+160], rax -mov rax, [rsp+160] -mov [rsp+128], rax +mov [rsp+272], rax +mov rax, [rsp+272] +mov [rsp+240], rax mov rax, rsp -add rax, 128 -mov [rsp+168], rax +add rax, 240 +mov [rsp+280], rax mov rax, 0 mov rbx, 1 mul rbx -mov rbx, [rsp+128] +mov rbx, [rsp+240] add rbx, rax -mov [rsp+176], rbx +mov [rsp+288], rbx mov rax, [rbx] -mov [rsp+184], rax -mov rax, [rsp+184] +mov [rsp+296], rax +mov rax, [rsp+296] mov rbx, 49 mov rax, 49 -mov rbx, [rsp+176] +mov rbx, [rsp+288] mov [rbx], rax -mov [rsp+185], rax +mov [rsp+297], rax mov rax, rsp -add rax, 128 -mov [rsp+186], rax +add rax, 240 +mov [rsp+298], rax mov rax, 1 mov rbx, 1 mul rbx -mov rbx, [rsp+128] +mov rbx, [rsp+240] add rbx, rax -mov [rsp+194], rbx +mov [rsp+306], rbx mov rax, [rbx] -mov [rsp+202], rax -mov rax, [rsp+202] +mov [rsp+314], rax +mov rax, [rsp+314] mov rbx, 104 mov rax, 104 -mov rbx, [rsp+194] +mov rbx, [rsp+306] mov [rbx], rax -mov [rsp+203], rax +mov [rsp+315], rax mov rax, rsp -add rax, 128 -mov [rsp+204], rax +add rax, 240 +mov [rsp+316], rax mov rax, 2 mov rbx, 1 mul rbx -mov rbx, [rsp+128] +mov rbx, [rsp+240] add rbx, rax -mov [rsp+212], rbx +mov [rsp+324], rbx mov rax, [rbx] -mov [rsp+220], rax -mov rax, [rsp+220] +mov [rsp+332], rax +mov rax, [rsp+332] mov rbx, 101 mov rax, 101 -mov rbx, [rsp+212] +mov rbx, [rsp+324] mov [rbx], rax -mov [rsp+221], rax +mov [rsp+333], rax mov rax, rsp -add rax, 128 -mov [rsp+222], rax +add rax, 240 +mov [rsp+334], rax mov rax, 3 mov rbx, 1 mul rbx -mov rbx, [rsp+128] +mov rbx, [rsp+240] add rbx, rax -mov [rsp+230], rbx +mov [rsp+342], rbx mov rax, [rbx] -mov [rsp+238], rax -mov rax, [rsp+238] +mov [rsp+350], rax +mov rax, [rsp+350] mov rbx, 108 mov rax, 108 -mov rbx, [rsp+230] +mov rbx, [rsp+342] mov [rbx], rax -mov [rsp+239], rax +mov [rsp+351], rax mov rax, rsp -add rax, 128 -mov [rsp+240], rax +add rax, 240 +mov [rsp+352], rax mov rax, 4 mov rbx, 1 mul rbx -mov rbx, [rsp+128] +mov rbx, [rsp+240] add rbx, rax -mov [rsp+248], rbx +mov [rsp+360], rbx mov rax, [rbx] -mov [rsp+256], rax -mov rax, [rsp+256] +mov [rsp+368], rax +mov rax, [rsp+368] mov rbx, 108 mov rax, 108 -mov rbx, [rsp+248] +mov rbx, [rsp+360] mov [rbx], rax -mov [rsp+257], rax +mov [rsp+369], rax mov rax, rsp -add rax, 128 -mov [rsp+258], rax +add rax, 240 +mov [rsp+370], rax mov rax, 5 mov rbx, 1 mul rbx -mov rbx, [rsp+128] +mov rbx, [rsp+240] add rbx, rax -mov [rsp+266], rbx +mov [rsp+378], rbx mov rax, [rbx] -mov [rsp+274], rax -mov rax, [rsp+274] +mov [rsp+386], rax +mov rax, [rsp+386] mov rbx, 111 mov rax, 111 -mov rbx, [rsp+266] +mov rbx, [rsp+378] mov [rbx], rax -mov [rsp+275], rax +mov [rsp+387], rax mov rax, rsp -add rax, 128 -mov [rsp+276], rax +add rax, 240 +mov [rsp+388], rax mov rax, 6 mov rbx, 1 mul rbx -mov rbx, [rsp+128] +mov rbx, [rsp+240] add rbx, rax -mov [rsp+284], rbx +mov [rsp+396], rbx mov rax, [rbx] -mov [rsp+292], rax -mov rax, [rsp+292] +mov [rsp+404], rax +mov rax, [rsp+404] mov rbx, 10 mov rax, 10 -mov rbx, [rsp+284] +mov rbx, [rsp+396] mov [rbx], rax -mov [rsp+293], rax +mov [rsp+405], rax mov rax, rsp -add rax, 128 -mov [rsp+294], rax +add rax, 240 +mov [rsp+406], rax mov rax, 7 mov rbx, 1 mul rbx -mov rbx, [rsp+128] +mov rbx, [rsp+240] add rbx, rax -mov [rsp+302], rbx +mov [rsp+414], rbx mov rax, [rbx] -mov [rsp+310], rax -mov rax, [rsp+310] +mov [rsp+422], rax +mov rax, [rsp+422] mov rbx, 0 mov rax, 0 -mov rbx, [rsp+302] +mov rbx, [rsp+414] mov [rbx], rax -mov [rsp+311], rax -mov rax, __temp_str_4 -mov [rsp+312], rax +mov [rsp+423], rax +mov rax, __temp_str_6 +mov [rsp+424], rax ; unary op apply mov rax, rsp -add rax, 128 -mov [rsp+320], rax -; operand code: [rsp+128] -mov rax, [rsp+128] +add rax, 240 +mov [rsp+432], rax +; operand code: [rsp+240] +mov rax, [rsp+240] add rax, 1 -mov rbx, [rsp+320] +mov rbx, [rsp+432] mov [rbx], rax -mov [rsp+328], rax +mov [rsp+440], rax ; unary op finish -mov rax, [rsp+328] -mov [rsp+336], rax +mov rax, [rsp+440] +mov [rsp+448], rax mov rax, [rax] -mov [rsp+344], rax -mov rax, [rsp+344] -mov [rsp+345], rax -mov rdi, [rsp+312] -mov rsi, [rsp+345] +mov [rsp+456], rax +mov rax, [rsp+456] +mov [rsp+457], rax +mov rdi, [rsp+424] +mov rsi, [rsp+457] mov rax, rsp add rax, 0 -mov [rsp+346], rax +mov [rsp+458], rax call printf -mov [rsp+354], rax -mov rax, __temp_str_5 -mov [rsp+354], rax +mov [rsp+466], rax +mov rax, __temp_str_7 +mov [rsp+466], rax mov rax, rsp -add rax, 128 -mov [rsp+362], rax -mov rax, [rsp+128] -mov [rsp+370], rax -mov rdi, [rsp+354] -mov rsi, [rsp+370] +add rax, 240 +mov [rsp+474], rax +mov rax, [rsp+240] +mov [rsp+482], rax +mov rdi, [rsp+466] +mov rsi, [rsp+482] mov rax, rsp add rax, 0 -mov [rsp+378], rax +mov [rsp+490], rax call printf -mov [rsp+386], rax +mov [rsp+498], rax mov rax, 10 mov rbx, 8 mul rbx -mov [rsp+394], rax -mov rax, [rsp+394] -mov [rsp+402], rax -mov rdi, [rsp+402] +mov [rsp+506], rax +mov rax, [rsp+506] +mov [rsp+514], rax +mov rdi, [rsp+514] mov rax, rsp add rax, 0 -mov [rsp+410], rax +mov [rsp+522], rax call malloc -mov [rsp+418], rax -mov rax, [rsp+418] -mov [rsp+386], rax +mov [rsp+530], rax +mov rax, [rsp+530] +mov [rsp+498], rax mov rax, rsp -add rax, 386 -mov [rsp+426], rax -mov rax, [rsp+386] -mov [rsp+434], rax +add rax, 498 +mov [rsp+538], rax +mov rax, [rsp+498] +mov [rsp+546], rax mov rax, [rax] -mov [rsp+442], rax +mov [rsp+554], rax mov rax, 10 mov rbx, 8 mul rbx -mov [rsp+450], rax -mov rax, [rsp+450] -mov [rsp+458], rax -mov rdi, [rsp+458] +mov [rsp+562], rax +mov rax, [rsp+562] +mov [rsp+570], rax +mov rdi, [rsp+570] mov rax, rsp add rax, 0 -mov [rsp+466], rax +mov [rsp+578], rax call malloc -mov [rsp+474], rax -mov rax, [rsp+442] -mov rbx, [rsp+474] -mov rax, [rsp+474] -mov rbx, [rsp+434] +mov [rsp+586], rax +mov rax, [rsp+554] +mov rbx, [rsp+586] +mov rax, [rsp+586] +mov rbx, [rsp+546] mov [rbx], rax -mov [rsp+482], rax +mov [rsp+594], rax mov rax, rsp -add rax, 386 -mov [rsp+490], rax +add rax, 498 +mov [rsp+602], rax mov rax, 1 mov rbx, 8 mul rbx mov rbx, rax -mov rax, [rsp+386] -add rax, rbx -mov [rsp+498], rax mov rax, [rsp+498] -mov [rsp+506], rax +add rax, rbx +mov [rsp+610], rax +mov rax, [rsp+610] +mov [rsp+618], rax mov rax, [rax] -mov [rsp+514], rax +mov [rsp+626], rax mov rax, 10 mov rbx, 8 mul rbx -mov [rsp+522], rax -mov rax, [rsp+522] -mov [rsp+530], rax -mov rdi, [rsp+530] +mov [rsp+634], rax +mov rax, [rsp+634] +mov [rsp+642], rax +mov rdi, [rsp+642] mov rax, rsp add rax, 0 -mov [rsp+538], rax +mov [rsp+650], rax call malloc -mov [rsp+546], rax -mov rax, [rsp+514] -mov rbx, [rsp+546] -mov rax, [rsp+546] -mov rbx, [rsp+506] +mov [rsp+658], rax +mov rax, [rsp+626] +mov rbx, [rsp+658] +mov rax, [rsp+658] +mov rbx, [rsp+618] mov [rbx], rax -mov [rsp+554], rax +mov [rsp+666], rax mov rax, rsp -add rax, 386 -mov [rsp+562], rax +add rax, 498 +mov [rsp+674], rax mov rax, 2 mov rbx, 8 mul rbx -mov rbx, [rsp+386] +mov rbx, [rsp+498] add rbx, rax -mov [rsp+570], rbx +mov [rsp+682], rbx mov rax, [rbx] -mov [rsp+578], rax +mov [rsp+690], rax mov rax, 10 mov rbx, 8 mul rbx -mov [rsp+586], rax -mov rax, [rsp+586] -mov [rsp+594], rax -mov rdi, [rsp+594] +mov [rsp+698], rax +mov rax, [rsp+698] +mov [rsp+706], rax +mov rdi, [rsp+706] mov rax, rsp add rax, 0 -mov [rsp+602], rax +mov [rsp+714], rax call malloc -mov [rsp+610], rax -mov rax, [rsp+578] -mov rbx, [rsp+610] -mov rax, [rsp+610] -mov rbx, [rsp+570] +mov [rsp+722], rax +mov rax, [rsp+690] +mov rbx, [rsp+722] +mov rax, [rsp+722] +mov rbx, [rsp+682] mov [rbx], rax -mov [rsp+618], rax +mov [rsp+730], rax mov rax, rsp -add rax, 386 -mov [rsp+626], rax +add rax, 498 +mov [rsp+738], rax mov rax, 0 mov rbx, 8 mul rbx -mov rbx, [rsp+386] +mov rbx, [rsp+498] add rbx, rax -mov [rsp+634], rbx +mov [rsp+746], rbx mov rax, [rbx] -mov [rsp+642], rax +mov [rsp+754], rax mov rax, 0 mov rbx, 8 mul rbx -mov rbx, [rsp+642] +mov rbx, [rsp+754] add rbx, rax -mov [rsp+650], rbx +mov [rsp+762], rbx mov rax, [rbx] -mov [rsp+658], rax -mov rax, [rsp+658] +mov [rsp+770], rax +mov rax, [rsp+770] mov rbx, 69 mov rax, 69 -mov rbx, [rsp+650] +mov rbx, [rsp+762] mov [rbx], rax -mov [rsp+666], rax +mov [rsp+778], rax mov rax, rsp -add rax, 386 -mov [rsp+674], rax +add rax, 498 +mov [rsp+786], rax mov rax, 1 mov rbx, 8 mul rbx mov rbx, rax -mov rax, [rsp+386] +mov rax, [rsp+498] add rax, rbx -mov [rsp+682], rax +mov [rsp+794], rax mov rax, 0 mov rbx, 8 mul rbx -mov rbx, [rsp+682] +mov rbx, [rsp+794] add rbx, rax -mov [rsp+690], rbx +mov [rsp+802], rbx mov rax, [rbx] -mov [rsp+698], rax -mov rax, [rsp+698] -mov [rsp+706], rax +mov [rsp+810], rax +mov rax, [rsp+810] +mov [rsp+818], rax mov rax, [rax] -mov [rsp+714], rax -mov rax, [rsp+714] +mov [rsp+826], rax +mov rax, [rsp+826] mov rbx, 99 mov rax, 99 -mov rbx, [rsp+706] +mov rbx, [rsp+818] mov [rbx], rax -mov [rsp+722], rax +mov [rsp+834], rax mov rax, rsp -add rax, 386 -mov [rsp+730], rax +add rax, 498 +mov [rsp+842], rax mov rax, 1 mov rbx, 8 mul rbx mov rbx, rax -mov rax, [rsp+386] +mov rax, [rsp+498] add rax, rbx -mov [rsp+738], rax -mov rax, [rsp+738] -mov [rsp+746], rax +mov [rsp+850], rax +mov rax, [rsp+850] +mov [rsp+858], rax mov rax, [rax] -mov [rsp+754], rax +mov [rsp+866], rax mov rax, 1 mov rbx, 8 mul rbx mov rbx, rax -mov rax, [rsp+754] +mov rax, [rsp+866] add rax, rbx -mov [rsp+762], rax -mov rax, [rsp+762] -mov [rsp+770], rax +mov [rsp+874], rax +mov rax, [rsp+874] +mov [rsp+882], rax mov rax, [rax] -mov [rsp+778], rax -mov rax, [rsp+778] +mov [rsp+890], rax +mov rax, [rsp+890] mov rbx, 109 mov rax, 109 -mov rbx, [rsp+770] +mov rbx, [rsp+882] mov [rbx], rax -mov [rsp+786], rax -mov rax, __temp_str_6 -mov [rsp+794], rax +mov [rsp+898], rax +mov rax, __temp_str_8 +mov [rsp+906], rax mov rax, rsp -add rax, 386 -mov [rsp+802], rax +add rax, 498 +mov [rsp+914], rax mov rax, 0 mov rbx, 8 mul rbx -mov rbx, [rsp+386] +mov rbx, [rsp+498] add rbx, rax -mov [rsp+810], rbx +mov [rsp+922], rbx mov rax, [rbx] -mov [rsp+818], rax +mov [rsp+930], rax mov rax, 0 mov rbx, 8 mul rbx -mov rbx, [rsp+818] +mov rbx, [rsp+930] add rbx, rax -mov [rsp+826], rbx +mov [rsp+938], rbx mov rax, [rbx] -mov [rsp+834], rax -mov rax, [rsp+834] -mov [rsp+842], rax -mov rdi, [rsp+794] -mov rsi, [rsp+842] +mov [rsp+946], rax +mov rax, [rsp+946] +mov [rsp+954], rax +mov rdi, [rsp+906] +mov rsi, [rsp+954] mov rax, rsp add rax, 0 -mov [rsp+850], rax +mov [rsp+962], rax call printf -mov [rsp+858], rax -mov rax, __temp_str_7 -mov [rsp+858], rax +mov [rsp+970], rax +mov rax, __temp_str_9 +mov [rsp+970], rax mov rax, rsp -add rax, 386 -mov [rsp+866], rax +add rax, 498 +mov [rsp+978], rax mov rax, 1 mov rbx, 8 mul rbx mov rbx, rax -mov rax, [rsp+386] +mov rax, [rsp+498] add rax, rbx -mov [rsp+874], rax +mov [rsp+986], rax mov rax, 0 mov rbx, 8 mul rbx -mov rbx, [rsp+874] +mov rbx, [rsp+986] add rbx, rax -mov [rsp+882], rbx +mov [rsp+994], rbx mov rax, [rbx] -mov [rsp+890], rax -mov rax, [rsp+890] -mov [rsp+898], rax +mov [rsp+1002], rax +mov rax, [rsp+1002] +mov [rsp+1010], rax mov rax, [rax] -mov [rsp+906], rax -mov rax, [rsp+906] -mov [rsp+914], rax -mov rdi, [rsp+858] -mov rsi, [rsp+914] +mov [rsp+1018], rax +mov rax, [rsp+1018] +mov [rsp+1026], rax +mov rdi, [rsp+970] +mov rsi, [rsp+1026] mov rax, rsp add rax, 0 -mov [rsp+922], rax +mov [rsp+1034], rax call printf -mov [rsp+930], rax -mov rax, __temp_str_8 -mov [rsp+930], rax +mov [rsp+1042], rax +mov rax, __temp_str_10 +mov [rsp+1042], rax mov rax, rsp -add rax, 386 -mov [rsp+938], rax +add rax, 498 +mov [rsp+1050], rax mov rax, 1 mov rbx, 8 mul rbx -mov rbx, [rsp+386] +mov rbx, [rsp+498] add rbx, rax -mov [rsp+946], rbx +mov [rsp+1058], rbx mov rax, [rbx] -mov [rsp+954], rax +mov [rsp+1066], rax mov rax, 1 mov rbx, 8 mul rbx -mov rbx, [rsp+954] +mov rbx, [rsp+1066] add rbx, rax -mov [rsp+962], rbx +mov [rsp+1074], rbx mov rax, [rbx] -mov [rsp+970], rax -mov rax, [rsp+970] -mov [rsp+978], rax -mov rdi, [rsp+930] -mov rsi, [rsp+978] +mov [rsp+1082], rax +mov rax, [rsp+1082] +mov [rsp+1090], rax +mov rdi, [rsp+1042] +mov rsi, [rsp+1090] mov rax, rsp add rax, 0 -mov [rsp+986], rax +mov [rsp+1098], rax call printf -mov [rsp+994], rax +mov [rsp+1106], rax mov rsp, rbp pop rbp ret diff --git a/tests/output/inp_pointer.c_lex_output.txt b/tests/output/inp_pointer.c_lex_output.txt index 81faee850eb3e822aec0a7d277dbbe3ed1da29f4..0c4eeb3e97fca7edbb896796b32233f2f2a82a9c 100644 GIT binary patch delta 63 zcmeySa7Sswbe75DEGo>px`~qom}S{~J^g@avJbQLOEELvE_`8H2yxz7y%PN))U delta 12 Tcmcbk^i5&Ibe7GvtoOMACz1t! diff --git a/tests/output/inp_pointer.c_tree_output.txt b/tests/output/inp_pointer.c_tree_output.txt index 911636f..e9f23f4 100644 --- a/tests/output/inp_pointer.c_tree_output.txt +++ b/tests/output/inp_pointer.c_tree_output.txt @@ -126,6 +126,26 @@ Program( Postfix(Op: 73) expression: Variable(a) + FunctionCall: + Function: + Variable(printf) + Args: + Literal(Type: 33, Value: *--a %d +) + Deref: + unaryOp(Op: 76) + expression: + Variable(a) + FunctionCall: + Function: + Variable(printf) + Args: + Literal(Type: 33, Value: *--a %d +) + Deref: + unaryOp(Op: 76) + expression: + Variable(a) VarDecl(s): Type(Name: s): Pointer of: