diff options
| author | gingerBill <bill@gingerbill.org> | 2021-11-24 18:32:27 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-11-24 18:32:27 +0000 |
| commit | 07ec93bfeb628f19d545d7bc8758ffd8163e431b (patch) | |
| tree | be8509f42eca5281c8971dc328c2a37691779fe8 | |
| parent | 994ee5a559819d982083dd88eaaa5fd8e3bbee3d (diff) | |
Add `procs_windows_amd64.asm` for use with `-no-crt`
| -rw-r--r-- | core/runtime/procs_windows_amd64.asm | 13 | ||||
| -rw-r--r-- | core/runtime/procs_windows_amd64.odin | 11 |
2 files changed, 15 insertions, 9 deletions
diff --git a/core/runtime/procs_windows_amd64.asm b/core/runtime/procs_windows_amd64.asm new file mode 100644 index 000000000..660f8982a --- /dev/null +++ b/core/runtime/procs_windows_amd64.asm @@ -0,0 +1,13 @@ +global __chkstk +global _tls_index +global _fltused + +section .data + _tls_index: dd 0 + _fltused: dd 0x9875 + + +section .text +__chkstk: ; proc "c" (rawptr) + ; TODO implement correctly + ret
\ No newline at end of file diff --git a/core/runtime/procs_windows_amd64.odin b/core/runtime/procs_windows_amd64.odin index 394df14e6..273bb57b2 100644 --- a/core/runtime/procs_windows_amd64.odin +++ b/core/runtime/procs_windows_amd64.odin @@ -20,13 +20,6 @@ windows_trap_type_assertion :: proc "contextless" () -> ! { } when ODIN_NO_CRT { - @(private, export, link_name="_tls_index") - _tls_index: u32 - - @(private, export, link_name="_fltused") - _fltused: i32 = 0x9875 - - @(private, export, link_name="__chkstk") - __chkstk :: proc "c" (rawptr) { - } + @(require) + foreign import crt_lib "procs_windows_amd64.asm" }
\ No newline at end of file |