Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Update test data with 30cc-generated outputs #70

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"./examples/inp_arg_macro.c": [],
"./examples/inp_extern.c": [],
}
C_PROGRAM_NAME = "./a.out"
C_PROGRAM_NAME = "./30cc"
OUTPUT_FOLDER = "tests/output"
TEMP_FOLDER = "temp_snapshots"

Expand Down
34 changes: 17 additions & 17 deletions tests/output/inp.c_asm_output.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
section .data
__temp_str_0 db `%u `, 0
__temp_str_1 db `%u `, 0
__main_size: equ 160
__main_size: equ 176
section .text
extern printf
global main
Expand Down Expand Up @@ -31,43 +31,43 @@ jmp __tmp_label_3
__tmp_label_2:
mov rax, 1
__tmp_label_3:
mov [rbp-40], rax
mov rax, [rbp-40]
mov [rbp-48], rax
mov rax, [rbp-48]
cmp rax, 0
je __tmp_label_1
;define variable i
mov rax, 2
mov [rbp-48], rax
mov [rbp-56], rax
;end define variable i
mov rax, __temp_str_0
mov [rbp-56], rax
mov rax, rbp
sub rax, 48
mov [rbp-64], rax
mov rax, [rbp-48]
mov rax, rbp
sub rax, 56
mov [rbp-72], rax
mov rdi, [rbp-56]
mov rsi, [rbp-72]
mov rax, [rbp-56]
mov [rbp-80], rax
mov rdi, [rbp-64]
mov rsi, [rbp-80]
mov rax, rbp
sub rax, 8
mov [rbp-80], rax
mov [rbp-88], rax
call printf
mov rax, rbp
sub rax, 16
mov [rbp-48], rax
mov [rbp-56], rax
mov rax, rbp
sub rax, 16
mov [rbp-56], rax
mov [rbp-64], rax
mov rax, [rbp-16]
mov rbx, 1
add rax, rbx
mov [rbp-64], rax
mov [rbp-80], rax
mov rax, [rbp-16]
mov rbx, [rbp-64]
mov rax, [rbp-48]
mov rbx, [rbp-80]
mov rax, [rbp-56]
mov [rax], rbx
mov rax, rbx
mov [rbp-72], rax
mov [rbp-96], rax
jmp __tmp_label_0
__tmp_label_1:
; exit loop
Expand Down
Loading
Loading