procs_windows_i386.odin 772 B

1234567891011121314151617181920212223242526272829
  1. #+private
  2. #+no-instrumentation
  3. package runtime
  4. @require foreign import "system:int64.lib"
  5. foreign import kernel32 "system:Kernel32.lib"
  6. windows_trap_array_bounds :: proc "contextless" () -> ! {
  7. DWORD :: u32
  8. ULONG_PTR :: uint
  9. EXCEPTION_ARRAY_BOUNDS_EXCEEDED :: 0xC000008C
  10. foreign kernel32 {
  11. RaiseException :: proc "system" (dwExceptionCode, dwExceptionFlags, nNumberOfArguments: DWORD, lpArguments: ^ULONG_PTR) -> ! ---
  12. }
  13. RaiseException(EXCEPTION_ARRAY_BOUNDS_EXCEEDED, 0, 0, nil)
  14. }
  15. windows_trap_type_assertion :: proc "contextless" () -> ! {
  16. windows_trap_array_bounds()
  17. }
  18. @(private, export, link_name="_fltused") _fltused: i32 = 0x9875
  19. @(private, export, link_name="_tls_index") _tls_index: u32
  20. @(private, export, link_name="_tls_array") _tls_array: u32