From 3c12c0e2883cd9016bfa433abe55d846dca72f06 Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Sun, 27 Oct 2024 19:08:22 +0100 Subject: [PATCH] removing codegen test outputs --- lang/tests/codegen_tests_arithmetic.txt | 28 --- lang/tests/codegen_tests_arrays.txt | 67 -------- lang/tests/codegen_tests_c_strings.txt | 36 ---- lang/tests/codegen_tests_comments.txt | 17 -- ...ts_comptime_function_from_another_file.txt | 11 -- .../codegen_tests_comptime_min_reg_leak.txt | 11 -- lang/tests/codegen_tests_different_types.txt | 57 ------ lang/tests/codegen_tests_directives.txt | 30 ---- lang/tests/codegen_tests_fb_driver.txt | 74 -------- lang/tests/codegen_tests_functions.txt | 32 ---- .../tests/codegen_tests_generic_functions.txt | 38 ---- lang/tests/codegen_tests_generic_types.txt | 144 ---------------- lang/tests/codegen_tests_global_variables.txt | 16 -- ...odegen_tests_hex_octal_binary_literals.txt | 31 ---- lang/tests/codegen_tests_idk.txt | 25 --- lang/tests/codegen_tests_if_statements.txt | 33 ---- lang/tests/codegen_tests_inline.txt | 13 -- lang/tests/codegen_tests_inline_test.txt | 162 ------------------ ...odegen_tests_inlined_generic_functions.txt | 18 -- ...codegen_tests_integer_inference_issues.txt | 30 ---- lang/tests/codegen_tests_loops.txt | 30 ---- lang/tests/codegen_tests_pointers.txt | 47 ----- lang/tests/codegen_tests_request_page.txt | 61 ------- .../tests/codegen_tests_some_generic_code.txt | 16 -- .../tests/codegen_tests_something_somehow.txt | 0 .../codegen_tests_sort_something_viredly.txt | 36 ---- lang/tests/codegen_tests_struct_operators.txt | 130 -------------- lang/tests/codegen_tests_struct_patterns.txt | 64 ------- ...sts_struct_return_from_module_function.txt | 39 ----- lang/tests/codegen_tests_structs.txt | 52 ------ .../codegen_tests_tests_ptr_to_ptr_copy.txt | 38 ---- lang/tests/codegen_tests_variables.txt | 13 -- lang/tests/codegen_tests_wide_ret.txt | 46 ----- lang/tests/codegen_tests_wired_mem_swap.txt | 0 .../codegen_tests_writing_into_string.txt | 26 --- 35 files changed, 1471 deletions(-) delete mode 100644 lang/tests/codegen_tests_arithmetic.txt delete mode 100644 lang/tests/codegen_tests_arrays.txt delete mode 100644 lang/tests/codegen_tests_c_strings.txt delete mode 100644 lang/tests/codegen_tests_comments.txt delete mode 100644 lang/tests/codegen_tests_comptime_function_from_another_file.txt delete mode 100644 lang/tests/codegen_tests_comptime_min_reg_leak.txt delete mode 100644 lang/tests/codegen_tests_different_types.txt delete mode 100644 lang/tests/codegen_tests_directives.txt delete mode 100644 lang/tests/codegen_tests_fb_driver.txt delete mode 100644 lang/tests/codegen_tests_functions.txt delete mode 100644 lang/tests/codegen_tests_generic_functions.txt delete mode 100644 lang/tests/codegen_tests_generic_types.txt delete mode 100644 lang/tests/codegen_tests_global_variables.txt delete mode 100644 lang/tests/codegen_tests_hex_octal_binary_literals.txt delete mode 100644 lang/tests/codegen_tests_idk.txt delete mode 100644 lang/tests/codegen_tests_if_statements.txt delete mode 100644 lang/tests/codegen_tests_inline.txt delete mode 100644 lang/tests/codegen_tests_inline_test.txt delete mode 100644 lang/tests/codegen_tests_inlined_generic_functions.txt delete mode 100644 lang/tests/codegen_tests_integer_inference_issues.txt delete mode 100644 lang/tests/codegen_tests_loops.txt delete mode 100644 lang/tests/codegen_tests_pointers.txt delete mode 100644 lang/tests/codegen_tests_request_page.txt delete mode 100644 lang/tests/codegen_tests_some_generic_code.txt delete mode 100644 lang/tests/codegen_tests_something_somehow.txt delete mode 100644 lang/tests/codegen_tests_sort_something_viredly.txt delete mode 100644 lang/tests/codegen_tests_struct_operators.txt delete mode 100644 lang/tests/codegen_tests_struct_patterns.txt delete mode 100644 lang/tests/codegen_tests_struct_return_from_module_function.txt delete mode 100644 lang/tests/codegen_tests_structs.txt delete mode 100644 lang/tests/codegen_tests_tests_ptr_to_ptr_copy.txt delete mode 100644 lang/tests/codegen_tests_variables.txt delete mode 100644 lang/tests/codegen_tests_wide_ret.txt delete mode 100644 lang/tests/codegen_tests_wired_mem_swap.txt delete mode 100644 lang/tests/codegen_tests_writing_into_string.txt diff --git a/lang/tests/codegen_tests_arithmetic.txt b/lang/tests/codegen_tests_arithmetic.txt deleted file mode 100644 index 09966ef..0000000 --- a/lang/tests/codegen_tests_arithmetic.txt +++ /dev/null @@ -1,28 +0,0 @@ -main: - ADDI64 r254, r254, -32d - ST r31, r254, 0a, 32h - LI64 r32, 10d - LI64 r33, 20d - LI64 r34, 2d - DIRS64 r33, r0, r33, r34 - SUB64 r32, r32, r33 - LI64 r33, 4d - LI64 r34, 2d - ADDI64 r34, r34, 2d - MUL64 r33, r33, r34 - ADD64 r32, r32, r33 - LI64 r33, 4d - MULI64 r33, r33, 4d - SUB64 r32, r32, r33 - LI64 r33, 1d - SLUI64 r33, r33, 0b - ADD64 r32, r32, r33 - LI64 r33, 1d - NEG r33, r33 - ADD64 r1, r32, r33 - LD r31, r254, 0a, 32h - ADDI64 r254, r254, 32d - JALA r0, r31, 0a -code size: 205 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_arrays.txt b/lang/tests/codegen_tests_arrays.txt deleted file mode 100644 index bece78c..0000000 --- a/lang/tests/codegen_tests_arrays.txt +++ /dev/null @@ -1,67 +0,0 @@ -main: - ADDI64 r254, r254, -76d - ST r31, r254, 28a, 48h - LI64 r32, 511d - LI64 r33, 0d - ST r33, r254, 0a, 1h - LI64 r33, 0d - ST r33, r254, 1a, 1h - CP r33, r32 - ANDI r33, r33, 255d - ST r33, r254, 2a, 1h - CP r33, r32 - SRUI16 r33, r33, 8b - ANDI r33, r33, 255d - ST r33, r254, 3a, 1h - ADDI64 r33, r254, 0d - LI64 r34, 1d - ST r34, r254, 4a, 8h - LI64 r34, 2d - ST r34, r254, 12a, 8h - LI64 r34, 4d - ST r34, r254, 20a, 8h - ADDI64 r34, r254, 4d - CP r2, r34 - JAL r31, r0, :pass - CP r34, r1 - ADDI64 r35, r254, 0d - LI64 r36, 3d - ADD64 r35, r35, r36 - CP r36, r0 - LD r36, r35, 0a, 1h - SXT8 r36, r36 - ADD64 r1, r34, r36 - LD r31, r254, 28a, 48h - ADDI64 r254, r254, 76d - JALA r0, r31, 0a -pass: - ADDI64 r254, r254, -48d - ST r31, r254, 0a, 48h - CP r32, r2 - CP r33, r32 - LI64 r34, 0d - MULI64 r34, r34, 8d - ADD64 r33, r33, r34 - LD r34, r33, 0a, 8h - CP r33, r32 - LI64 r35, 1d - MULI64 r35, r35, 8d - ADD64 r33, r33, r35 - LD r35, r33, 0a, 8h - ADD64 r34, r34, r35 - CP r33, r32 - CP r35, r32 - LI64 r36, 1d - MULI64 r36, r36, 8d - ADD64 r35, r35, r36 - LD r36, r35, 0a, 8h - MULI64 r36, r36, 8d - ADD64 r33, r33, r36 - LD r36, r33, 0a, 8h - ADD64 r1, r34, r36 - LD r31, r254, 0a, 48h - ADDI64 r254, r254, 48d - JALA r0, r31, 0a -code size: 557 -ret: 8 -status: Ok(()) diff --git a/lang/tests/codegen_tests_c_strings.txt b/lang/tests/codegen_tests_c_strings.txt deleted file mode 100644 index 97a7393..0000000 --- a/lang/tests/codegen_tests_c_strings.txt +++ /dev/null @@ -1,36 +0,0 @@ -main: - ADDI64 r254, r254, -40d - ST r31, r254, 0a, 40h - LRA r32, r0, :"abāļž\n\r\t56789\0" - CP r2, r32 - JAL r31, r0, :str_len - CP r33, r1 - LRA r34, r0, :"fff\0" - CP r2, r34 - JAL r31, r0, :str_len - CP r35, r1 - ADD64 r1, r35, r33 - LD r31, r254, 0a, 40h - ADDI64 r254, r254, 40d - JALA r0, r31, 0a -str_len: - ADDI64 r254, r254, -48d - ST r31, r254, 0a, 48h - CP r32, r2 - LI64 r33, 0d - 2: CP r34, r32 - CP r35, r0 - LD r35, r34, 0a, 1h - LI64 r36, 0d - JNE r35, r36, :0 - JMP :1 - 0: ADDI64 r33, r33, 1d - ADDI64 r32, r32, 1d - JMP :2 - 1: CP r1, r33 - LD r31, r254, 0a, 48h - ADDI64 r254, r254, 48d - JALA r0, r31, 0a -code size: 270 -ret: 16 -status: Ok(()) diff --git a/lang/tests/codegen_tests_comments.txt b/lang/tests/codegen_tests_comments.txt deleted file mode 100644 index 33f3145..0000000 --- a/lang/tests/codegen_tests_comments.txt +++ /dev/null @@ -1,17 +0,0 @@ -foo: - ADDI64 r254, r254, -8d - ST r31, r254, 0a, 8h - LD r31, r254, 0a, 8h - ADDI64 r254, r254, 8d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -8d - ST r31, r254, 0a, 8h - JAL r31, r0, :foo - LI64 r1, 0d - LD r31, r254, 0a, 8h - ADDI64 r254, r254, 8d - JALA r0, r31, 0a -code size: 143 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_comptime_function_from_another_file.txt b/lang/tests/codegen_tests_comptime_function_from_another_file.txt deleted file mode 100644 index 86ad55c..0000000 --- a/lang/tests/codegen_tests_comptime_function_from_another_file.txt +++ /dev/null @@ -1,11 +0,0 @@ -main: - ADDI64 r254, r254, -16d - ST r31, r254, 0a, 16h - LRA r32, r0, :a - LD r1, r32, 0a, 8h - LD r31, r254, 0a, 16h - ADDI64 r254, r254, 16d - JALA r0, r31, 0a -code size: 95 -ret: 50 -status: Ok(()) diff --git a/lang/tests/codegen_tests_comptime_min_reg_leak.txt b/lang/tests/codegen_tests_comptime_min_reg_leak.txt deleted file mode 100644 index c8fac45..0000000 --- a/lang/tests/codegen_tests_comptime_min_reg_leak.txt +++ /dev/null @@ -1,11 +0,0 @@ -main: - ADDI64 r254, r254, -16d - ST r31, r254, 0a, 16h - LRA r32, r0, :a - LD r1, r32, 0a, 8h - LD r31, r254, 0a, 16h - ADDI64 r254, r254, 16d - JALA r0, r31, 0a -code size: 218 -ret: 50 -status: Ok(()) diff --git a/lang/tests/codegen_tests_different_types.txt b/lang/tests/codegen_tests_different_types.txt deleted file mode 100644 index ecee632..0000000 --- a/lang/tests/codegen_tests_different_types.txt +++ /dev/null @@ -1,57 +0,0 @@ -main: - ADDI64 r254, r254, -52d - ST r31, r254, 12a, 40h - LI64 r32, 255d - ST r32, r254, 0a, 1h - LI64 r32, 0d - ST r32, r254, 1a, 1h - LI64 r32, 0d - ST r32, r254, 2a, 1h - LI64 r32, 255d - ST r32, r254, 3a, 1h - LI64 r32, 0d - ST r32, r254, 4a, 4h - LI64 r32, 2d - ST r32, r254, 8a, 4h - LI64 r32, 1d - ADDI64 r33, r254, 4d - CP r34, r32 - MULI64 r34, r34, 4d - ADD64 r33, r33, r34 - CP r34, r0 - LD r34, r33, 0a, 4h - LI64 r35, 2d - JEQ r34, r35, :0 - LI64 r1, 0d - JMP :1 - 0: ADDI64 r35, r254, 8d - ADDI64 r35, r35, -4d - CP r34, r0 - LD r34, r35, 0a, 4h - LI64 r33, 0d - JEQ r34, r33, :2 - LI64 r1, 64d - JMP :1 - 2: CP r33, r0 - LD r33, r254, 4a, 4h - CP r34, r0 - LD r34, r254, 8a, 4h - ADD32 r33, r33, r34 - CP r34, r0 - LD r34, r254, 0a, 1h - ADD32 r33, r33, r34 - CP r34, r0 - LD r34, r254, 1a, 1h - ADD32 r33, r33, r34 - CP r34, r0 - LD r34, r254, 2a, 1h - ADD32 r33, r33, r34 - CP r34, r0 - LD r34, r254, 3a, 1h - ADD32 r1, r33, r34 - 1: LD r31, r254, 12a, 40h - ADDI64 r254, r254, 52d - JALA r0, r31, 0a -code size: 474 -ret: 512 -status: Ok(()) diff --git a/lang/tests/codegen_tests_directives.txt b/lang/tests/codegen_tests_directives.txt deleted file mode 100644 index bc3f047..0000000 --- a/lang/tests/codegen_tests_directives.txt +++ /dev/null @@ -1,30 +0,0 @@ -main: - ADDI64 r254, r254, -96d - ST r31, r254, 16a, 80h - LI64 r32, 10d - LI64 r33, 30d - LI64 r34, 40d - CP r35, r34 - LI64 r36, 16d - LI64 r37, 8d - LI64 r38, 10d - LI64 r2, 1d - LI64 r39, 10d - ST r39, r254, 0a, 8h - LI64 r39, 20d - ST r39, r254, 8a, 8h - LD r3, r254, 0a, 16h - LI64 r5, 5d - LI64 r6, 6d - ECA - CP r39, r1 - LRA r40, r0, :arbitrary text - - LI64 r1, 0d - LD r31, r254, 16a, 80h - ADDI64 r254, r254, 96d - JALA r0, r31, 0a -ev: Ecall -code size: 255 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_fb_driver.txt b/lang/tests/codegen_tests_fb_driver.txt deleted file mode 100644 index 51591db..0000000 --- a/lang/tests/codegen_tests_fb_driver.txt +++ /dev/null @@ -1,74 +0,0 @@ -main: - ADDI64 r254, r254, -80d - ST r31, r254, 0a, 80h - JAL r31, r0, :check_platform - CP r32, r1 - LI64 r33, 100d - LI64 r34, 30d - LI64 r35, 0d - LI64 r36, 0d - 4: CP r37, r35 - CP r38, r34 - ADDI64 r38, r38, 1d - CMPS r37, r37, r38 - CMPUI r37, r37, 1d - JEQ r37, r0, :0 - CP r2, r35 - CP r3, r36 - CP r4, r33 - JAL r31, r0, :set_pixel - CP r37, r1 - CP r38, r35 - ADDI64 r38, r38, 1d - CP r35, r38 - JMP :1 - 0: CP r2, r35 - CP r3, r36 - CP r4, r33 - JAL r31, r0, :set_pixel - CP r38, r1 - LI64 r35, 0d - CP r39, r36 - ADDI64 r39, r39, 1d - CP r36, r39 - 1: CP r39, r36 - CP r40, r33 - CMPS r39, r39, r40 - CMPUI r39, r39, 0d - NOT r39, r39 - JEQ r39, r0, :2 - JMP :3 - 2: JMP :4 - 3: LI64 r1, 0d - LD r31, r254, 0a, 80h - ADDI64 r254, r254, 80d - JALA r0, r31, 0a -set_pixel: - ADDI64 r254, r254, -32d - ST r31, r254, 0a, 32h - CP r32, r2 - CP r33, r3 - CP r34, r4 - MUL64 r33, r33, r34 - ADD64 r33, r33, r32 - LI64 r1, 0d - LD r31, r254, 0a, 32h - ADDI64 r254, r254, 32d - JALA r0, r31, 0a -check_platform: - ADDI64 r254, r254, -8d - ST r31, r254, 0a, 8h - JAL r31, r0, :x86_fb_ptr - LD r31, r254, 0a, 8h - ADDI64 r254, r254, 8d - JALA r0, r31, 0a -x86_fb_ptr: - ADDI64 r254, r254, -8d - ST r31, r254, 0a, 8h - LI64 r1, 100d - LD r31, r254, 0a, 8h - ADDI64 r254, r254, 8d - JALA r0, r31, 0a -code size: 511 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_functions.txt b/lang/tests/codegen_tests_functions.txt deleted file mode 100644 index 49b789d..0000000 --- a/lang/tests/codegen_tests_functions.txt +++ /dev/null @@ -1,32 +0,0 @@ -add_one: - ADDI64 r254, r254, -16d - ST r31, r254, 0a, 16h - CP r32, r2 - ADDI64 r1, r32, 1d - LD r31, r254, 0a, 16h - ADDI64 r254, r254, 16d - JALA r0, r31, 0a -add_two: - ADDI64 r254, r254, -16d - ST r31, r254, 0a, 16h - CP r32, r2 - ADDI64 r1, r32, 2d - LD r31, r254, 0a, 16h - ADDI64 r254, r254, 16d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -24d - ST r31, r254, 0a, 24h - LI64 r2, 10d - JAL r31, r0, :add_one - CP r32, r1 - LI64 r2, 20d - JAL r31, r0, :add_two - CP r33, r1 - ADD64 r1, r32, r33 - LD r31, r254, 0a, 24h - ADDI64 r254, r254, 24d - JALA r0, r31, 0a -code size: 257 -ret: 33 -status: Ok(()) diff --git a/lang/tests/codegen_tests_generic_functions.txt b/lang/tests/codegen_tests_generic_functions.txt deleted file mode 100644 index 0997f12..0000000 --- a/lang/tests/codegen_tests_generic_functions.txt +++ /dev/null @@ -1,38 +0,0 @@ -add: - ADDI64 r254, r254, -24d - ST r31, r254, 0a, 24h - CP r32, r2 - CP r33, r3 - ADD64 r1, r32, r33 - LD r31, r254, 0a, 24h - ADDI64 r254, r254, 24d - JALA r0, r31, 0a -add: - ADDI64 r254, r254, -24d - ST r31, r254, 0a, 24h - CP r32, r2 - CP r33, r3 - ADD32 r1, r32, r33 - LD r31, r254, 0a, 24h - ADDI64 r254, r254, 24d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -32d - ST r31, r254, 0a, 32h - LI64 r2, 2d - LI64 r3, 2d - JAL r31, r0, :add - CP r32, r1 - LI64 r2, 1d - LI64 r3, 3d - JAL r31, r0, :add - CP r33, r1 - CP r34, r32 - SXT32 r34, r34 - SUB64 r1, r34, r33 - LD r31, r254, 0a, 32h - ADDI64 r254, r254, 32d - JALA r0, r31, 0a -code size: 275 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_generic_types.txt b/lang/tests/codegen_tests_generic_types.txt deleted file mode 100644 index 95396f8..0000000 --- a/lang/tests/codegen_tests_generic_types.txt +++ /dev/null @@ -1,144 +0,0 @@ -deinit: - ADDI64 r254, r254, -24d - ST r31, r254, 0a, 24h - CP r32, r2 - LD r2, r32, 0a, 8h - LD r33, r32, 16a, 8h - MULI64 r33, r33, 8d - CP r3, r33 - LI64 r4, 8d - JAL r31, r0, :free - CP r33, r32 - CP r1, r33 - JAL r31, r0, :new - LD r31, r254, 0a, 24h - ADDI64 r254, r254, 24d - JALA r0, r31, 0a -free: - ADDI64 r254, r254, -40d - ST r31, r254, 0a, 40h - CP r32, r2 - CP r33, r3 - CP r34, r4 - LRA r35, r0, :FREE_SYS_CALL - LD r2, r35, 0a, 8h - CP r3, r32 - CP r4, r33 - CP r5, r34 - ECA - LD r31, r254, 0a, 40h - ADDI64 r254, r254, 40d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -48d - ST r31, r254, 24a, 24h - ADDI64 r1, r254, 0d - JAL r31, r0, :new - ADDI64 r32, r254, 0d - CP r2, r32 - LI64 r3, 69d - JAL r31, r0, :push - CP r32, r1 - LD r32, r254, 0a, 8h - LD r33, r32, 0a, 8h - ADDI64 r32, r254, 0d - CP r2, r32 - JAL r31, r0, :deinit - CP r1, r33 - LD r31, r254, 24a, 24h - ADDI64 r254, r254, 48d - JALA r0, r31, 0a -malloc: - ADDI64 r254, r254, -32d - ST r31, r254, 0a, 32h - CP r32, r2 - CP r33, r3 - LRA r34, r0, :MALLOC_SYS_CALL - LD r2, r34, 0a, 8h - CP r3, r32 - CP r4, r33 - ECA - LD r31, r254, 0a, 32h - ADDI64 r254, r254, 32d - JALA r0, r31, 0a -new: - ADDI64 r254, r254, -24d - ST r31, r254, 0a, 24h - CP r32, r1 - LI64 r33, 0d - ST r33, r32, 0a, 8h - LI64 r33, 0d - ST r33, r32, 8a, 8h - LI64 r33, 0d - ST r33, r32, 16a, 8h - LD r31, r254, 0a, 24h - ADDI64 r254, r254, 24d - JALA r0, r31, 0a -push: - ADDI64 r254, r254, -80d - ST r31, r254, 0a, 80h - CP r32, r2 - CP r33, r3 - LD r34, r32, 8a, 8h - LD r35, r32, 16a, 8h - JNE r34, r35, :0 - LD r35, r32, 16a, 8h - LI64 r34, 0d - JNE r35, r34, :1 - LI64 r34, 1d - ST r34, r32, 16a, 8h - JMP :2 - 1: LD r34, r32, 16a, 8h - MULI64 r34, r34, 2d - ST r34, r32, 16a, 8h - 2: LD r34, r32, 16a, 8h - MULI64 r34, r34, 8d - CP r2, r34 - LI64 r3, 8d - JAL r31, r0, :malloc - CP r34, r1 - LI64 r35, 0d - JNE r34, r35, :3 - LI64 r1, 0d - JMP :4 - 3: LD r35, r32, 0a, 8h - CP r36, r34 - LD r37, r32, 0a, 8h - LD r38, r32, 8a, 8h - MULI64 r38, r38, 8d - ADD64 r37, r37, r38 - 7: JNE r35, r37, :5 - JMP :6 - 5: CP r38, r36 - CP r39, r35 - LD r40, r39, 0a, 8h - ST r40, r38, 0a, 8h - ADDI64 r35, r35, 8d - ADDI64 r36, r36, 8d - JMP :7 - 6: LD r38, r32, 8a, 8h - LI64 r39, 0d - JEQ r38, r39, :8 - LD r2, r32, 0a, 8h - LD r39, r32, 8a, 8h - MULI64 r39, r39, 8d - CP r3, r39 - LI64 r4, 8d - JAL r31, r0, :free - 8: ST r34, r32, 0a, 8h - 0: LD r39, r32, 0a, 8h - LD r38, r32, 8a, 8h - MULI64 r38, r38, 8d - ADD64 r39, r39, r38 - CP r38, r39 - ST r33, r38, 0a, 8h - LD r38, r32, 8a, 8h - ADDI64 r38, r38, 1d - ST r38, r32, 8a, 8h - CP r1, r39 - 4: LD r31, r254, 0a, 80h - ADDI64 r254, r254, 80d - JALA r0, r31, 0a -code size: 1225 -ret: 69 -status: Ok(()) diff --git a/lang/tests/codegen_tests_global_variables.txt b/lang/tests/codegen_tests_global_variables.txt deleted file mode 100644 index f1b89c6..0000000 --- a/lang/tests/codegen_tests_global_variables.txt +++ /dev/null @@ -1,16 +0,0 @@ -main: - ADDI64 r254, r254, -32d - ST r31, r254, 0a, 32h - LRA r32, r0, :complex_global_var - LRA r33, r0, :complex_global_var - LD r34, r33, 0a, 8h - ADDI64 r34, r34, 5d - ST r34, r32, 0a, 8h - LRA r32, r0, :complex_global_var - LD r1, r32, 0a, 8h - LD r31, r254, 0a, 32h - ADDI64 r254, r254, 32d - JALA r0, r31, 0a -code size: 146 -ret: 55 -status: Ok(()) diff --git a/lang/tests/codegen_tests_hex_octal_binary_literals.txt b/lang/tests/codegen_tests_hex_octal_binary_literals.txt deleted file mode 100644 index 186e7eb..0000000 --- a/lang/tests/codegen_tests_hex_octal_binary_literals.txt +++ /dev/null @@ -1,31 +0,0 @@ -main: - ADDI64 r254, r254, -56d - ST r31, r254, 0a, 56h - LI64 r32, 255d - LI64 r33, 255d - LI64 r34, 255d - LI64 r35, 255d - CP r36, r32 - CMPS r36, r36, r33 - CMPUI r36, r36, 0d - NOT r36, r36 - CP r37, r34 - CMPS r37, r37, r33 - CMPUI r37, r37, 0d - NOT r37, r37 - AND r36, r36, r37 - CP r37, r35 - CMPS r37, r37, r33 - CMPUI r37, r37, 0d - NOT r37, r37 - AND r36, r36, r37 - JEQ r36, r0, :0 - LI64 r1, 0d - JMP :1 - 0: LI64 r1, 1d - 1: LD r31, r254, 0a, 56h - ADDI64 r254, r254, 56d - JALA r0, r31, 0a -code size: 208 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_idk.txt b/lang/tests/codegen_tests_idk.txt deleted file mode 100644 index 3f1980b..0000000 --- a/lang/tests/codegen_tests_idk.txt +++ /dev/null @@ -1,25 +0,0 @@ -main: - ADDI64 r254, r254, -160d - ST r31, r254, 128a, 32h - LI64 r32, 0d - 2: LI64 r33, 128d - JLTS r32, r33, :0 - JMP :1 - 0: ADDI64 r33, r254, 0d - CP r34, r32 - ADD64 r33, r33, r34 - LI64 r34, 69d - ST r34, r33, 0a, 1h - ADDI64 r32, r32, 1d - JMP :2 - 1: ADDI64 r33, r254, 0d - LI64 r34, 42d - ADD64 r33, r33, r34 - CP r1, r0 - LD r1, r33, 0a, 1h - LD r31, r254, 128a, 32h - ADDI64 r254, r254, 160d - JALA r0, r31, 0a -code size: 195 -ret: 69 -status: Ok(()) diff --git a/lang/tests/codegen_tests_if_statements.txt b/lang/tests/codegen_tests_if_statements.txt deleted file mode 100644 index 36393e1..0000000 --- a/lang/tests/codegen_tests_if_statements.txt +++ /dev/null @@ -1,33 +0,0 @@ -fib: - ADDI64 r254, r254, -32d - ST r31, r254, 0a, 32h - CP r32, r2 - LI64 r33, 2d - JGTS r32, r33, :0 - LI64 r1, 1d - JMP :1 - 0: CP r33, r32 - ADDI64 r33, r33, -1d - CP r2, r33 - JAL r31, r0, :fib - CP r33, r1 - CP r34, r32 - ADDI64 r34, r34, -2d - CP r2, r34 - JAL r31, r0, :fib - CP r34, r1 - ADD64 r1, r33, r34 - 1: LD r31, r254, 0a, 32h - ADDI64 r254, r254, 32d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -8d - ST r31, r254, 0a, 8h - LI64 r2, 10d - JAL r31, r0, :fib - LD r31, r254, 0a, 8h - ADDI64 r254, r254, 8d - JALA r0, r31, 0a -code size: 234 -ret: 55 -status: Ok(()) diff --git a/lang/tests/codegen_tests_inline.txt b/lang/tests/codegen_tests_inline.txt deleted file mode 100644 index 104a79e..0000000 --- a/lang/tests/codegen_tests_inline.txt +++ /dev/null @@ -1,13 +0,0 @@ -main: - ADDI64 r254, r254, -24d - ST r31, r254, 0a, 24h - LI64 r33, 1d - ADDI64 r33, r33, 2d - ADDI64 r32, r33, 3d - ADDI64 r1, r32, -6d - LD r31, r254, 0a, 24h - ADDI64 r254, r254, 24d - JALA r0, r31, 0a -code size: 110 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_inline_test.txt b/lang/tests/codegen_tests_inline_test.txt deleted file mode 100644 index 430f2b0..0000000 --- a/lang/tests/codegen_tests_inline_test.txt +++ /dev/null @@ -1,162 +0,0 @@ -example: - ADDI64 r254, r254, -48d - ST r31, r254, 0a, 48h - LI64 r2, 3d - LI64 r3, 4d - ECA - CP r33, r1 - LI64 r34, 0d - LI64 r35, 0d - CMPS r34, r34, r35 - CMPUI r34, r34, 0d - LI64 r35, 1024d - LI64 r36, 0d - CMPS r35, r35, r36 - CMPUI r35, r35, 0d - OR r34, r34, r35 - JEQ r34, r0, :0 - CP r34, r33 - LI64 r35, 1024d - ADDI64 r35, r35, 0d - ADDI64 r35, r35, 1d - DIRS64 r0, r34, r34, r35 - ADDI64 r32, r34, 0d - JMP :1 - 0: CP r32, r33 - 1: LI64 r2, 0d - LI64 r3, 768d - JAL r31, r0, :integer - CP r33, r1 - CP r34, r32 - JMP :2 - 2: LD r31, r254, 0a, 48h - ADDI64 r254, r254, 48d - JALA r0, r31, 0a -integer: - ADDI64 r254, r254, -56d - ST r31, r254, 0a, 56h - CP r32, r2 - CP r33, r3 - LI64 r2, 3d - LI64 r3, 4d - ECA - CP r34, r1 - CP r35, r32 - LI64 r36, 0d - CMPS r35, r35, r36 - CMPUI r35, r35, 0d - CP r36, r33 - LI64 r37, 0d - CMPS r36, r36, r37 - CMPUI r36, r36, 0d - OR r35, r35, r36 - JEQ r35, r0, :0 - CP r35, r34 - CP r36, r33 - SUB64 r36, r36, r32 - ADDI64 r36, r36, 1d - DIRS64 r0, r35, r35, r36 - ADD64 r1, r35, r32 - JMP :1 - 0: CP r1, r34 - 1: LD r31, r254, 0a, 56h - ADDI64 r254, r254, 56d - JALA r0, r31, 0a -line: - ADDI64 r254, r254, -80d - ST r31, r254, 48a, 32h - ST r2, r254, 0a, 16h - ST r4, r254, 16a, 16h - ST r6, r254, 32a, 16h - CP r32, r8 - LI64 r33, 1d - JEQ r33, r0, :0 - LD r33, r254, 0a, 8h - LD r34, r254, 16a, 8h - JGTS r33, r34, :1 - JMP :1 - 1: JMP :2 - 0: LD r34, r254, 8a, 8h - LD r33, r254, 24a, 8h - JGTS r34, r33, :2 - JMP :2 - 2: LD r31, r254, 48a, 32h - ADDI64 r254, r254, 80d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -112d - ST r31, r254, 96a, 16h - LI64 r32, 0d - ST r32, r254, 0a, 8h - LI64 r32, 0d - ST r32, r254, 8a, 8h - LD r2, r254, 0a, 16h - LI64 r32, 0d - ST r32, r254, 16a, 8h - LI64 r32, 0d - ST r32, r254, 24a, 8h - LD r4, r254, 16a, 16h - LI64 r32, 0d - ST r32, r254, 32a, 8h - LI64 r32, 0d - ST r32, r254, 40a, 8h - LD r6, r254, 32a, 16h - LI64 r8, 10d - JAL r31, r0, :line - LI64 r32, 0d - ST r32, r254, 48a, 8h - LI64 r32, 0d - ST r32, r254, 56a, 8h - LD r2, r254, 48a, 16h - LI64 r32, 0d - ST r32, r254, 64a, 8h - LI64 r32, 0d - ST r32, r254, 72a, 8h - LD r4, r254, 64a, 16h - LI64 r32, 0d - ST r32, r254, 80a, 8h - LI64 r32, 0d - ST r32, r254, 88a, 8h - LD r6, r254, 80a, 16h - LI64 r8, 10d - JAL r31, r0, :rect_line - JAL r31, r0, :example - LI64 r1, 0d - LD r31, r254, 96a, 16h - ADDI64 r254, r254, 112d - JALA r0, r31, 0a -rect_line: - ADDI64 r254, r254, -112d - ST r31, r254, 48a, 64h - ST r2, r254, 0a, 16h - ST r4, r254, 16a, 16h - ST r6, r254, 32a, 16h - CP r32, r8 - LI64 r33, 0d - LI64 r34, 0d - LI64 r35, 0d - 5: JNE r33, r32, :0 - JMP :1 - 0: LD r34, r254, 8a, 8h - LD r35, r254, 0a, 8h - 4: LD r36, r254, 8a, 8h - LD r37, r254, 16a, 8h - ADD64 r36, r36, r37 - JNE r34, r36, :2 - JMP :3 - 2: LI64 r36, 1d - LI64 r37, 10d - ADD64 r36, r36, r37 - LI64 r37, 1d - LI64 r38, 2d - ADD64 r36, r37, r38 - ADDI64 r34, r34, 1d - JMP :4 - 3: ADDI64 r33, r33, 1d - JMP :5 - 1: LD r31, r254, 48a, 64h - ADDI64 r254, r254, 112d - JALA r0, r31, 0a -code size: 1403 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_inlined_generic_functions.txt b/lang/tests/codegen_tests_inlined_generic_functions.txt deleted file mode 100644 index dd97ece..0000000 --- a/lang/tests/codegen_tests_inlined_generic_functions.txt +++ /dev/null @@ -1,18 +0,0 @@ -main: - ADDI64 r254, r254, -32d - ST r31, r254, 0a, 32h - LI64 r32, 10d - NEG r32, r32 - CP r33, r32 - LI64 r34, 8d - ADDI64 r34, r34, -1d - SRS64 r33, r33, r34 - CP r34, r32 - XOR r34, r34, r33 - SUB64 r1, r34, r33 - LD r31, r254, 0a, 32h - ADDI64 r254, r254, 32d - JALA r0, r31, 0a -code size: 119 -ret: 10 -status: Ok(()) diff --git a/lang/tests/codegen_tests_integer_inference_issues.txt b/lang/tests/codegen_tests_integer_inference_issues.txt deleted file mode 100644 index dc604bb..0000000 --- a/lang/tests/codegen_tests_integer_inference_issues.txt +++ /dev/null @@ -1,30 +0,0 @@ -integer_range: - ADDI64 r254, r254, -40d - ST r31, r254, 0a, 40h - CP r32, r2 - CP r33, r3 - LI64 r2, 3d - LI64 r3, 4d - ECA - CP r34, r1 - CP r35, r33 - SUB64 r35, r35, r32 - ADDI64 r35, r35, 1d - DIRU64 r0, r34, r34, r35 - ADD64 r1, r34, r32 - LD r31, r254, 0a, 40h - ADDI64 r254, r254, 40d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -16d - ST r31, r254, 0a, 16h - LI64 r2, 0d - LI64 r3, 1000d - JAL r31, r0, :integer_range - CP r32, r1 - LD r31, r254, 0a, 16h - ADDI64 r254, r254, 16d - JALA r0, r31, 0a -code size: 213 -ret: 42 -status: Ok(()) diff --git a/lang/tests/codegen_tests_loops.txt b/lang/tests/codegen_tests_loops.txt deleted file mode 100644 index 670509a..0000000 --- a/lang/tests/codegen_tests_loops.txt +++ /dev/null @@ -1,30 +0,0 @@ -fib: - ADDI64 r254, r254, -40d - ST r31, r254, 0a, 40h - CP r32, r2 - LI64 r33, 0d - LI64 r34, 1d - 2: LI64 r35, 0d - JNE r32, r35, :0 - JMP :1 - 0: CP r35, r33 - ADD64 r35, r35, r34 - CP r33, r34 - CP r34, r35 - ADDI64 r32, r32, -1d - JMP :2 - 1: CP r1, r33 - LD r31, r254, 0a, 40h - ADDI64 r254, r254, 40d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -8d - ST r31, r254, 0a, 8h - LI64 r2, 10d - JAL r31, r0, :fib - LD r31, r254, 0a, 8h - ADDI64 r254, r254, 8d - JALA r0, r31, 0a -code size: 218 -ret: 55 -status: Ok(()) diff --git a/lang/tests/codegen_tests_pointers.txt b/lang/tests/codegen_tests_pointers.txt deleted file mode 100644 index 6ffbf5b..0000000 --- a/lang/tests/codegen_tests_pointers.txt +++ /dev/null @@ -1,47 +0,0 @@ -drop: - ADDI64 r254, r254, -16d - ST r31, r254, 0a, 16h - CP r32, r2 - LD r31, r254, 0a, 16h - ADDI64 r254, r254, 16d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -48d - ST r31, r254, 8a, 40h - LI64 r32, 1d - ST r32, r254, 0a, 8h - ADDI64 r32, r254, 0d - LI64 r33, 1000d - CP r34, r32 - CP r35, r33 - MULI64 r35, r35, 8d - ADD64 r34, r34, r35 - ADDI64 r32, r34, -16d - CP r34, r33 - ADDI64 r34, r34, -2d - CP r35, r34 - MULI64 r35, r35, 8d - SUB64 r32, r32, r35 - CP r2, r32 - JAL r31, r0, :modify - LD r2, r254, 0a, 8h - JAL r31, r0, :drop - CP r34, r32 - LD r35, r34, 0a, 8h - ADDI64 r1, r35, -2d - LD r31, r254, 8a, 40h - ADDI64 r254, r254, 48d - JALA r0, r31, 0a -modify: - ADDI64 r254, r254, -32d - ST r31, r254, 0a, 32h - CP r32, r2 - CP r33, r32 - LI64 r34, 2d - ST r34, r33, 0a, 8h - LD r31, r254, 0a, 32h - ADDI64 r254, r254, 32d - JALA r0, r31, 0a -code size: 382 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_request_page.txt b/lang/tests/codegen_tests_request_page.txt deleted file mode 100644 index de7e4d6..0000000 --- a/lang/tests/codegen_tests_request_page.txt +++ /dev/null @@ -1,61 +0,0 @@ -create_back_buffer: - ADDI64 r254, r254, -40d - ST r31, r254, 0a, 40h - CP r32, r2 - LI64 r33, 255d - JGTS r32, r33, :0 - CP r2, r32 - JAL r31, r0, :request_page - JMP :1 - 0: LI64 r2, 255d - JAL r31, r0, :request_page - CP r33, r1 - CP r34, r32 - ADDI64 r34, r34, -255d - 6: LI64 r35, 0d - JGTS r34, r35, :2 - JMP :3 - 2: LI64 r35, 255d - JLTS r34, r35, :4 - LI64 r2, 255d - JAL r31, r0, :request_page - CP r35, r1 - JMP :5 - 4: CP r2, r34 - JAL r31, r0, :request_page - CP r35, r1 - 5: ADDI64 r34, r34, -255d - JMP :6 - 3: CP r1, r33 - 1: LD r31, r254, 0a, 40h - ADDI64 r254, r254, 40d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -16d - ST r31, r254, 0a, 16h - LI64 r2, 400d - JAL r31, r0, :create_back_buffer - CP r32, r1 - LD r31, r254, 0a, 16h - ADDI64 r254, r254, 16d - JALA r0, r31, 0a -request_page: - ADDI64 r254, r254, -40d - ST r31, r254, 0a, 40h - CP r32, r2 - LRA r33, r0, :"\0\u{1}xxxxxxxx\0" - CP r34, r33 - ADDI64 r34, r34, 1d - CP r35, r34 - ST r32, r35, 0a, 1h - LI64 r2, 3d - LI64 r3, 2d - CP r4, r33 - LI64 r5, 12d - ECA - LD r31, r254, 0a, 40h - ADDI64 r254, r254, 40d - JALA r0, r31, 0a -code size: 449 -ret: 42 -status: Ok(()) diff --git a/lang/tests/codegen_tests_some_generic_code.txt b/lang/tests/codegen_tests_some_generic_code.txt deleted file mode 100644 index 2bd2ac2..0000000 --- a/lang/tests/codegen_tests_some_generic_code.txt +++ /dev/null @@ -1,16 +0,0 @@ -main: - ADDI64 r254, r254, -8d - ST r31, r254, 0a, 8h - JAL r31, r0, :some_func - LD r31, r254, 0a, 8h - ADDI64 r254, r254, 8d - JALA r0, r31, 0a -some_func: - ADDI64 r254, r254, -8d - ST r31, r254, 0a, 8h - LD r31, r254, 0a, 8h - ADDI64 r254, r254, 8d - JALA r0, r31, 0a -code size: 133 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_something_somehow.txt b/lang/tests/codegen_tests_something_somehow.txt deleted file mode 100644 index e69de29..0000000 diff --git a/lang/tests/codegen_tests_sort_something_viredly.txt b/lang/tests/codegen_tests_sort_something_viredly.txt deleted file mode 100644 index f89ca54..0000000 --- a/lang/tests/codegen_tests_sort_something_viredly.txt +++ /dev/null @@ -1,36 +0,0 @@ -main: - ADDI64 r254, r254, -8d - ST r31, r254, 0a, 8h - LI64 r2, 1d - JAL r31, r0, :sqrt - LD r31, r254, 0a, 8h - ADDI64 r254, r254, 8d - JALA r0, r31, 0a -sqrt: - ADDI64 r254, r254, -56d - ST r31, r254, 0a, 56h - CP r32, r2 - LI64 r33, 0d - LI64 r34, 0d - LI64 r35, 32768d - LI64 r36, 15d - 3: LI64 r37, 0d - JNE r35, r37, :0 - JMP :1 - 0: ADDI64 r36, r36, -1d - CP r37, r34 - SLUI64 r37, r37, 1b - ADD64 r33, r35, r37 - SLU64 r33, r33, r36 - JLTS r32, r33, :2 - ADD64 r34, r34, r35 - SUB64 r32, r32, r33 - 2: SRUI64 r35, r35, 1b - JMP :3 - 1: CP r1, r34 - LD r31, r254, 0a, 56h - ADDI64 r254, r254, 56d - JALA r0, r31, 0a -code size: 257 -ret: 1 -status: Ok(()) diff --git a/lang/tests/codegen_tests_struct_operators.txt b/lang/tests/codegen_tests_struct_operators.txt deleted file mode 100644 index abd9af3..0000000 --- a/lang/tests/codegen_tests_struct_operators.txt +++ /dev/null @@ -1,130 +0,0 @@ -main: - ADDI64 r254, r254, -160d - ST r31, r254, 136a, 24h - LI64 r32, 0d - ST r32, r254, 0a, 1h - LI64 r32, 0d - ST r32, r254, 1a, 1h - LI64 r32, 0d - ST r32, r254, 2a, 1h - LI64 r32, 0d - ST r32, r254, 3a, 1h - LI64 r32, 1d - ST r32, r254, 4a, 1h - LI64 r32, 1d - ST r32, r254, 5a, 1h - LI64 r32, 1d - ST r32, r254, 6a, 1h - LI64 r32, 1d - ST r32, r254, 7a, 1h - CP r32, r0 - LD r32, r254, 0a, 1h - CP r33, r0 - LD r33, r254, 4a, 1h - ADD8 r32, r32, r33 - ST r32, r254, 0a, 1h - CP r32, r0 - LD r32, r254, 1a, 1h - CP r33, r0 - LD r33, r254, 5a, 1h - ADD8 r32, r32, r33 - ST r32, r254, 1a, 1h - CP r32, r0 - LD r32, r254, 2a, 1h - CP r33, r0 - LD r33, r254, 6a, 1h - ADD8 r32, r32, r33 - ST r32, r254, 2a, 1h - CP r32, r0 - LD r32, r254, 3a, 1h - CP r33, r0 - LD r33, r254, 7a, 1h - ADD8 r32, r32, r33 - ST r32, r254, 3a, 1h - CP r32, r0 - LD r32, r254, 2a, 1h - CP r33, r0 - LD r33, r254, 1a, 1h - ADD8 r32, r32, r33 - CP r33, r0 - LD r33, r254, 0a, 1h - ADD8 r32, r32, r33 - CP r33, r0 - LD r33, r254, 3a, 1h - ADD8 r32, r32, r33 - LI64 r33, 4d - JEQ r32, r33, :0 - LI64 r1, 1008d - JMP :1 - 0: LI64 r33, 1d - ST r33, r254, 8a, 8h - LI64 r33, 2d - ST r33, r254, 16a, 8h - LI64 r33, 3d - ST r33, r254, 24a, 8h - LI64 r33, 4d - ST r33, r254, 32a, 8h - LD r33, r254, 8a, 8h - LD r32, r254, 24a, 8h - ADD64 r33, r33, r32 - ST r33, r254, 40a, 8h - LD r33, r254, 16a, 8h - LD r32, r254, 32a, 8h - ADD64 r33, r33, r32 - ST r33, r254, 48a, 8h - LD r33, r254, 24a, 8h - LD r32, r254, 8a, 8h - SUB64 r33, r33, r32 - ST r33, r254, 56a, 8h - LD r33, r254, 32a, 8h - LD r32, r254, 16a, 8h - SUB64 r33, r33, r32 - ST r33, r254, 64a, 8h - LI64 r33, 0d - ST r33, r254, 72a, 8h - LI64 r33, 0d - ST r33, r254, 80a, 8h - LD r33, r254, 72a, 8h - LD r32, r254, 24a, 8h - SUB64 r33, r33, r32 - ST r33, r254, 88a, 8h - LD r33, r254, 80a, 8h - LD r32, r254, 32a, 8h - SUB64 r33, r33, r32 - ST r33, r254, 96a, 8h - ADDI64 r33, r254, 8d - ADDI64 r32, r254, 104d - BMC r33, r32, 16h - LD r32, r254, 88a, 8h - LD r33, r254, 40a, 8h - ADD64 r32, r32, r33 - ST r32, r254, 88a, 8h - LD r32, r254, 96a, 8h - LD r33, r254, 48a, 8h - ADD64 r32, r32, r33 - ST r32, r254, 96a, 8h - LD r32, r254, 104a, 8h - LD r33, r254, 56a, 8h - ADD64 r32, r32, r33 - ST r32, r254, 104a, 8h - LD r32, r254, 112a, 8h - LD r33, r254, 64a, 8h - ADD64 r32, r32, r33 - ST r32, r254, 112a, 8h - LD r32, r254, 88a, 8h - LD r33, r254, 104a, 8h - ADD64 r32, r32, r33 - ST r32, r254, 120a, 8h - LD r32, r254, 96a, 8h - LD r33, r254, 112a, 8h - ADD64 r32, r32, r33 - ST r32, r254, 128a, 8h - LD r32, r254, 120a, 8h - LD r33, r254, 128a, 8h - ADD64 r1, r32, r33 - 1: LD r31, r254, 136a, 24h - ADDI64 r254, r254, 160d - JALA r0, r31, 0a -code size: 1264 -ret: 10 -status: Ok(()) diff --git a/lang/tests/codegen_tests_struct_patterns.txt b/lang/tests/codegen_tests_struct_patterns.txt deleted file mode 100644 index ad79065..0000000 --- a/lang/tests/codegen_tests_struct_patterns.txt +++ /dev/null @@ -1,64 +0,0 @@ -fib: - ADDI64 r254, r254, -32d - ST r31, r254, 0a, 32h - CP r32, r2 - LI64 r33, 2d - JLTS r32, r33, :0 - CP r33, r32 - ADDI64 r33, r33, -1d - CP r2, r33 - JAL r31, r0, :fib - CP r33, r1 - CP r34, r32 - ADDI64 r34, r34, -2d - CP r2, r34 - JAL r31, r0, :fib - CP r34, r1 - ADD64 r1, r33, r34 - JMP :1 - 0: CP r1, r32 - 1: LD r31, r254, 0a, 32h - ADDI64 r254, r254, 32d - JALA r0, r31, 0a -fib_iter: - ADDI64 r254, r254, -40d - ST r31, r254, 0a, 40h - CP r32, r2 - LI64 r33, 0d - LI64 r34, 1d - 2: LI64 r35, 0d - JNE r32, r35, :0 - JMP :1 - 0: CP r35, r33 - ADD64 r35, r35, r34 - CP r33, r34 - CP r34, r35 - ADDI64 r32, r32, -1d - JMP :2 - 1: CP r1, r33 - LD r31, r254, 0a, 40h - ADDI64 r254, r254, 40d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -34d - ST r31, r254, 2a, 32h - LI64 r32, 10d - ST r32, r254, 0a, 1h - LI64 r32, 10d - ST r32, r254, 1a, 1h - CP r32, r0 - LD r32, r254, 1a, 1h - CP r2, r0 - LD r2, r254, 0a, 1h - JAL r31, r0, :fib - CP r33, r1 - CP r2, r32 - JAL r31, r0, :fib_iter - CP r34, r1 - SUB64 r1, r33, r34 - LD r31, r254, 2a, 32h - ADDI64 r254, r254, 34d - JALA r0, r31, 0a -code size: 449 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_struct_return_from_module_function.txt b/lang/tests/codegen_tests_struct_return_from_module_function.txt deleted file mode 100644 index 89328a5..0000000 --- a/lang/tests/codegen_tests_struct_return_from_module_function.txt +++ /dev/null @@ -1,39 +0,0 @@ -foo: - ADDI64 r254, r254, -32d - ST r31, r254, 16a, 16h - LI64 r32, 3d - ST r32, r254, 0a, 8h - LI64 r32, 2d - ST r32, r254, 8a, 4h - LI64 r32, 2d - ST r32, r254, 12a, 4h - LD r1, r254, 0a, 16h - LD r31, r254, 16a, 16h - ADDI64 r254, r254, 32d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -72d - ST r31, r254, 48a, 24h - LI64 r32, 7d - JAL r31, r0, :foo - ST r1, r254, 0a, 16h - LD r33, r254, 0a, 8h - SUB64 r32, r32, r33 - JAL r31, r0, :foo - ST r1, r254, 16a, 16h - CP r33, r0 - LD r33, r254, 24a, 4h - SXT32 r33, r33 - SUB64 r32, r32, r33 - JAL r31, r0, :foo - ST r1, r254, 32a, 16h - CP r33, r0 - LD r33, r254, 44a, 4h - SXT32 r33, r33 - SUB64 r1, r32, r33 - LD r31, r254, 48a, 24h - ADDI64 r254, r254, 72d - JALA r0, r31, 0a -code size: 341 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_structs.txt b/lang/tests/codegen_tests_structs.txt deleted file mode 100644 index bb31b51..0000000 --- a/lang/tests/codegen_tests_structs.txt +++ /dev/null @@ -1,52 +0,0 @@ -main: - ADDI64 r254, r254, -72d - ST r31, r254, 48a, 24h - LI64 r32, 3d - LI64 r33, 3d - JEQ r32, r33, :0 - LI64 r1, 9001d - JMP :1 - 0: LI64 r33, 4d - ST r33, r254, 0a, 8h - LI64 r33, 1d - ST r33, r254, 8a, 8h - LI64 r33, 3d - ST r33, r254, 16a, 8h - ADDI64 r2, r254, 0d - ADDI64 r1, r254, 24d - JAL r31, r0, :odher_pass - LD r33, r254, 40a, 8h - LI64 r32, 3d - JNE r33, r32, :2 - ADDI64 r32, r254, 24d - CP r2, r32 - JAL r31, r0, :pass - JMP :1 - 2: LI64 r1, 0d - 1: LD r31, r254, 48a, 24h - ADDI64 r254, r254, 72d - JALA r0, r31, 0a -odher_pass: - ADDI64 r254, r254, -40d - ST r31, r254, 0a, 40h - CP r32, r2 - CP r33, r1 - CP r34, r32 - CP r35, r33 - BMC r34, r35, 24h - LD r31, r254, 0a, 40h - ADDI64 r254, r254, 40d - JALA r0, r31, 0a -pass: - ADDI64 r254, r254, -32d - ST r31, r254, 0a, 32h - CP r32, r2 - LD r33, r32, 0a, 8h - LD r34, r32, 8a, 8h - SUB64 r1, r33, r34 - LD r31, r254, 0a, 32h - ADDI64 r254, r254, 32d - JALA r0, r31, 0a -code size: 437 -ret: 3 -status: Ok(()) diff --git a/lang/tests/codegen_tests_tests_ptr_to_ptr_copy.txt b/lang/tests/codegen_tests_tests_ptr_to_ptr_copy.txt deleted file mode 100644 index e1a51ef..0000000 --- a/lang/tests/codegen_tests_tests_ptr_to_ptr_copy.txt +++ /dev/null @@ -1,38 +0,0 @@ -main: - ADDI64 r254, r254, -10272d - ST r31, r254, 10240a, 32h - LI64 r32, 0d - 2: LI64 r33, 1024d - JLTS r32, r33, :0 - JMP :1 - 0: ADDI64 r33, r254, 0d - CP r34, r32 - ADD64 r33, r33, r34 - LI64 r34, 64d - ST r34, r33, 0a, 1h - ADDI64 r32, r32, 1d - JMP :2 - 1: LI64 r32, 1d - 5: LI64 r33, 10d - JLTS r32, r33, :3 - JMP :4 - 3: ADDI64 r33, r254, 0d - CP r34, r32 - MULI64 r34, r34, 1024d - ADD64 r33, r33, r34 - ADDI64 r34, r254, 0d - BMC r34, r33, 1024h - ADDI64 r32, r32, 1d - JMP :5 - 4: LI64 r33, 1024d - MULI64 r33, r33, 2d - ADDI64 r34, r254, 0d - ADD64 r34, r34, r33 - CP r1, r0 - LD r1, r34, 0a, 1h - LD r31, r254, 10240a, 32h - ADDI64 r254, r254, 10272d - JALA r0, r31, 0a -code size: 297 -ret: 64 -status: Ok(()) diff --git a/lang/tests/codegen_tests_variables.txt b/lang/tests/codegen_tests_variables.txt deleted file mode 100644 index a3790f2..0000000 --- a/lang/tests/codegen_tests_variables.txt +++ /dev/null @@ -1,13 +0,0 @@ -main: - ADDI64 r254, r254, -24d - ST r31, r254, 0a, 24h - LI64 r32, 1d - LI64 r33, 2d - ADDI64 r32, r32, 1d - SUB64 r1, r32, r33 - LD r31, r254, 0a, 24h - ADDI64 r254, r254, 24d - JALA r0, r31, 0a -code size: 102 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_wide_ret.txt b/lang/tests/codegen_tests_wide_ret.txt deleted file mode 100644 index 30dd600..0000000 --- a/lang/tests/codegen_tests_wide_ret.txt +++ /dev/null @@ -1,46 +0,0 @@ -main: - ADDI64 r254, r254, -56d - ST r31, r254, 24a, 32h - CP r32, r3 - CP r33, r4 - JAL r31, r0, :small_struct - CP r34, r1 - LI64 r34, 0d - ST r34, r254, 0a, 1h - LI64 r34, 0d - ST r34, r254, 1a, 1h - LI64 r34, 0d - ST r34, r254, 2a, 1h - LI64 r34, 0d - ST r34, r254, 3a, 1h - LI64 r34, 0d - ST r34, r254, 4a, 1h - LI64 r34, 0d - ST r34, r254, 5a, 1h - LI64 r34, 0d - ST r34, r254, 6a, 1h - LI64 r34, 0d - ST r34, r254, 7a, 1h - LD r34, r254, 0a, 8h - ST r34, r254, 8a, 8h - LD r34, r254, 0a, 8h - ST r34, r254, 16a, 8h - LD r1, r254, 8a, 16h - LD r31, r254, 24a, 32h - ADDI64 r254, r254, 56d - JALA r0, r31, 0a -small_struct: - ADDI64 r254, r254, -20d - ST r31, r254, 4a, 16h - LI64 r32, 0d - ST r32, r254, 0a, 2h - LI64 r32, 0d - ST r32, r254, 2a, 2h - CP r1, r0 - LD r1, r254, 0a, 4h - LD r31, r254, 4a, 16h - ADDI64 r254, r254, 20d - JALA r0, r31, 0a -code size: 453 -ret: 0 -status: Ok(()) diff --git a/lang/tests/codegen_tests_wired_mem_swap.txt b/lang/tests/codegen_tests_wired_mem_swap.txt deleted file mode 100644 index e69de29..0000000 diff --git a/lang/tests/codegen_tests_writing_into_string.txt b/lang/tests/codegen_tests_writing_into_string.txt deleted file mode 100644 index f0c3b4e..0000000 --- a/lang/tests/codegen_tests_writing_into_string.txt +++ /dev/null @@ -1,26 +0,0 @@ -inl: - ADDI64 r254, r254, -16d - ST r31, r254, 0a, 16h - LRA r32, r0, :"luhahah\0" - LD r31, r254, 0a, 16h - ADDI64 r254, r254, 16d - JALA r0, r31, 0a -main: - ADDI64 r254, r254, -8d - ST r31, r254, 0a, 8h - JAL r31, r0, :outl - JAL r31, r0, :inl - LD r31, r254, 0a, 8h - ADDI64 r254, r254, 8d - JALA r0, r31, 0a -outl: - ADDI64 r254, r254, -24d - ST r31, r254, 0a, 24h - LRA r32, r0, :"whahaha\0" - LI64 r33, 0d - LD r31, r254, 0a, 24h - ADDI64 r254, r254, 24d - JALA r0, r31, 0a -code size: 239 -ret: 0 -status: Ok(())