diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2024-01-29 16:18:38 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-29 16:18:38 +0000 |
| commit | f588593ff15fa13e89bd869a52b2ff9bf9d91341 (patch) | |
| tree | 8f2c0a32259c405c53396ead12b1c8f3f5c261d0 /base/runtime/procs_windows_amd64.odin | |
| parent | a78f062499c7f0112558872a500904e6fbc6761b (diff) | |
| parent | a626adac8e8e0ca0506401cf3376727ad801091c (diff) | |
Merge pull request #3147 from odin-lang/base-work
`base` library collection work
Diffstat (limited to 'base/runtime/procs_windows_amd64.odin')
| -rw-r--r-- | base/runtime/procs_windows_amd64.odin | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/base/runtime/procs_windows_amd64.odin b/base/runtime/procs_windows_amd64.odin new file mode 100644 index 000000000..ea495f5fa --- /dev/null +++ b/base/runtime/procs_windows_amd64.odin @@ -0,0 +1,26 @@ +//+private +//+no-instrumentation +package runtime + +foreign import kernel32 "system:Kernel32.lib" + +@(private) +foreign kernel32 { + RaiseException :: proc "system" (dwExceptionCode, dwExceptionFlags, nNumberOfArguments: u32, lpArguments: ^uint) -> ! --- +} + +windows_trap_array_bounds :: proc "contextless" () -> ! { + EXCEPTION_ARRAY_BOUNDS_EXCEEDED :: 0xC000008C + + + RaiseException(EXCEPTION_ARRAY_BOUNDS_EXCEEDED, 0, 0, nil) +} + +windows_trap_type_assertion :: proc "contextless" () -> ! { + windows_trap_array_bounds() +} + +when ODIN_NO_CRT { + @(require) + foreign import crt_lib "procs_windows_amd64.asm" +} |