-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass tests/ok/stack_pass_args_to_define_fn
- Loading branch information
1 parent
c2dd762
commit 2bbdbe7
Showing
6 changed files
with
240 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
define() c2 { | ||
return { | ||
.i1 = 1, | ||
.i2 = 2, | ||
.i3 = 3, | ||
.i4 = 4, | ||
.i5 = 5, | ||
.i6 = 6, | ||
.i7 = 7, | ||
.i8 = 8, | ||
.f1 = 1.0, | ||
.f2 = 2.0, | ||
.f3 = 3.0, | ||
.f4 = 4.0, | ||
.f5 = 5.0, | ||
.f6 = 6.0, | ||
.f7 = 7.0, | ||
.f8 = 8.0, | ||
.f9 = 9.0, | ||
.f10 = 10.0, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
section .data | ||
|
||
global define_type | ||
define_type: db "c2", 0 | ||
|
||
align 8 | ||
global globals_size | ||
globals_size: dq 8 | ||
|
||
align 8 | ||
global resources_size | ||
resources_size: dq 0 | ||
|
||
global entities_size | ||
entities_size: dq 0 | ||
|
||
section .text | ||
|
||
extern game_fn_define_c2 | ||
|
||
global define | ||
define: | ||
sub rsp, byte 0x8 | ||
mov eax, __?float32?__(10.0) | ||
push rax | ||
mov eax, __?float32?__(9.0) | ||
push rax | ||
mov eax, __?float32?__(8.0) | ||
movd xmm7, eax | ||
mov eax, __?float32?__(7.0) | ||
movd xmm6, eax | ||
mov eax, __?float32?__(6.0) | ||
movd xmm5, eax | ||
mov eax, __?float32?__(5.0) | ||
movd xmm4, eax | ||
mov eax, __?float32?__(4.0) | ||
movd xmm3, eax | ||
mov eax, __?float32?__(3.0) | ||
movd xmm2, eax | ||
mov eax, __?float32?__(2.0) | ||
movd xmm1, eax | ||
mov eax, __?float32?__(1.0) | ||
movd xmm0, eax | ||
mov eax, 8 | ||
push rax | ||
mov eax, 7 | ||
push rax | ||
mov eax, 6 | ||
mov r9, rax | ||
mov eax, 5 | ||
mov r8, rax | ||
mov eax, 4 | ||
mov rcx, rax | ||
mov eax, 3 | ||
mov rdx, rax | ||
mov eax, 2 | ||
mov rsi, rax | ||
mov eax, 1 | ||
mov rdi, rax | ||
call game_fn_define_c2 wrt ..plt | ||
add rsp, byte 0x28 | ||
ret | ||
|
||
global init_globals | ||
init_globals: | ||
mov rdi[0x0], rsi | ||
ret |