procs_windows_i386.odin 753 B

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