@xnetx/tinyc-native-x86_64-w64-mingw32 0.1.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/natives/x86_64-w64-mingw32/toolchain/x86_64-w64-mingw32/tinyc.exe +0 -0
  2. package/package.json +1 -1
  3. package/sysroot/x86_64-w64-mingw32/include/tinyc_io.h +131 -131
  4. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/_mingw.h +171 -171
  5. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/arm_neon.h +3585 -0
  6. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/assert.h +62 -62
  7. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx2intrin.h +93 -0
  8. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512bwintrin.h +128 -0
  9. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512cdintrin.h +31 -0
  10. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512dqintrin.h +123 -0
  11. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512fintrin.h +1075 -0
  12. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512vbmiintrin.h +30 -0
  13. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512vlintrin.h +1633 -0
  14. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avx512vnniintrin.h +33 -0
  15. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/avxintrin.h +675 -0
  16. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/conio.h +409 -409
  17. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/ctype.h +281 -281
  18. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/dir.h +31 -31
  19. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/direct.h +68 -68
  20. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/dirent.h +135 -135
  21. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/dos.h +55 -55
  22. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/emmintrin.h +213 -0
  23. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/errno.h +75 -75
  24. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/excpt.h +123 -123
  25. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/f16cintrin.h +29 -0
  26. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/fcntl.h +52 -52
  27. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/fenv.h +108 -108
  28. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/float.h +75 -75
  29. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/fmaintrin.h +141 -0
  30. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/immintrin.h +21 -0
  31. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/inttypes.h +297 -297
  32. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/io.h +418 -418
  33. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/iso646.h +36 -36
  34. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/limits.h +116 -116
  35. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/locale.h +91 -91
  36. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/malloc.h +181 -181
  37. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/math.h +497 -497
  38. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/mem.h +13 -13
  39. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/memory.h +40 -40
  40. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/process.h +176 -176
  41. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/riscv_vector.h +12334 -0
  42. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/conio_s.h +42 -42
  43. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/crtdbg_s.h +19 -19
  44. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/io_s.h +33 -33
  45. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/mbstring_s.h +52 -52
  46. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/search_s.h +25 -25
  47. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/stdio_s.h +145 -145
  48. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/stdlib_s.h +67 -67
  49. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/stralign_s.h +30 -30
  50. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/string_s.h +41 -41
  51. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/sys/timeb_s.h +34 -34
  52. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/tchar_s.h +266 -266
  53. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/time_s.h +61 -61
  54. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sec_api/wchar_s.h +128 -128
  55. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/setjmp.h +199 -199
  56. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/share.h +28 -28
  57. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/signal.h +63 -63
  58. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/smmintrin.h +74 -0
  59. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdalign.h +16 -16
  60. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdarg.h +14 -14
  61. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdatomic.h +171 -171
  62. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdbool.h +11 -11
  63. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stddef.h +39 -39
  64. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdint.h +212 -212
  65. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdio.h +429 -429
  66. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdlib.h +606 -606
  67. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/stdnoreturn.h +7 -7
  68. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/string.h +164 -164
  69. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/fcntl.h +13 -13
  70. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/file.h +14 -14
  71. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/locking.h +30 -30
  72. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/stat.h +290 -290
  73. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/time.h +69 -69
  74. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/timeb.h +133 -133
  75. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/types.h +123 -123
  76. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/unistd.h +14 -14
  77. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/sys/utime.h +146 -146
  78. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tcc/tcc_libm.h +618 -618
  79. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tccdefs.h +338 -338
  80. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tcclib.h +82 -82
  81. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tchar.h +1102 -1102
  82. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tgmath.h +89 -89
  83. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/time.h +287 -287
  84. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/tmmintrin.h +19 -0
  85. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/uchar.h +33 -33
  86. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/unistd.h +1 -1
  87. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/vadefs.h +11 -11
  88. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/values.h +4 -4
  89. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/varargs.h +12 -12
  90. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/wchar.h +873 -873
  91. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/wctype.h +172 -172
  92. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/basetsd.h +149 -149
  93. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/basetyps.h +85 -85
  94. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/guiddef.h +156 -156
  95. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/poppack.h +8 -8
  96. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/pshpack1.h +8 -8
  97. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/pshpack2.h +8 -8
  98. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/pshpack4.h +8 -8
  99. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/pshpack8.h +8 -8
  100. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/qos.h +72 -72
  101. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/shellapi.h +59 -59
  102. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winbase.h +2966 -2966
  103. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/wincon.h +309 -309
  104. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/windef.h +293 -293
  105. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/windows.h +127 -127
  106. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winerror.h +3166 -3166
  107. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/wingdi.h +4080 -4080
  108. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winnls.h +778 -778
  109. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winnt.h +5994 -5994
  110. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winreg.h +272 -272
  111. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winsock2.h +1474 -1474
  112. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winuser.h +5652 -5652
  113. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/winver.h +160 -160
  114. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/ws2ipdef.h +21 -21
  115. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/winapi/ws2tcpip.h +391 -391
  116. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/include/xmmintrin.h +170 -0
  117. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/gdi32.def +337 -337
  118. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/kernel32.def +776 -776
  119. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/libtcc1.a +0 -0
  120. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/msvcrt.def +1320 -1320
  121. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/runmain.o +0 -0
  122. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/user32.def +658 -658
  123. package/sysroot/x86_64-w64-mingw32/lib/tcc/win32/lib/ws2_32.def +198 -198
  124. package/sysroot/x86_64-w64-mingw32/manifest.json +1 -1
@@ -1,409 +1,409 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the w64 mingw-runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER within this package.
5
- */
6
- #ifndef _INC_CONIO
7
- #define _INC_CONIO
8
-
9
- #include <_mingw.h>
10
-
11
- #ifdef __cplusplus
12
- extern "C" {
13
- #endif
14
-
15
- _CRTIMP char *_cgets(char *_Buffer);
16
- _CRTIMP int __cdecl _cprintf(const char *_Format,...);
17
- _CRTIMP int __cdecl _cputs(const char *_Str);
18
- _CRTIMP int __cdecl _cscanf(const char *_Format,...);
19
- _CRTIMP int __cdecl _cscanf_l(const char *_Format,_locale_t _Locale,...);
20
- _CRTIMP int __cdecl _getch(void);
21
- _CRTIMP int __cdecl _getche(void);
22
- _CRTIMP int __cdecl _vcprintf(const char *_Format,va_list _ArgList);
23
- _CRTIMP int __cdecl _cprintf_p(const char *_Format,...);
24
- _CRTIMP int __cdecl _vcprintf_p(const char *_Format,va_list _ArgList);
25
- _CRTIMP int __cdecl _cprintf_l(const char *_Format,_locale_t _Locale,...);
26
- _CRTIMP int __cdecl _vcprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
27
- _CRTIMP int __cdecl _cprintf_p_l(const char *_Format,_locale_t _Locale,...);
28
- _CRTIMP int __cdecl _vcprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
29
- _CRTIMP int __cdecl _kbhit(void);
30
-
31
- #if defined(_X86_) && !defined(__x86_64)
32
- int __cdecl _inp(unsigned short);
33
- unsigned short __cdecl _inpw(unsigned short);
34
- unsigned long __cdecl _inpd(unsigned short);
35
- int __cdecl _outp(unsigned short,int);
36
- unsigned short __cdecl _outpw(unsigned short,unsigned short);
37
- unsigned long __cdecl _outpd(unsigned short,unsigned long);
38
- #endif
39
-
40
- _CRTIMP int __cdecl _putch(int _Ch);
41
- _CRTIMP int __cdecl _ungetch(int _Ch);
42
- _CRTIMP int __cdecl _getch_nolock(void);
43
- _CRTIMP int __cdecl _getche_nolock(void);
44
- _CRTIMP int __cdecl _putch_nolock(int _Ch);
45
- _CRTIMP int __cdecl _ungetch_nolock(int _Ch);
46
-
47
- #ifndef _WCONIO_DEFINED
48
- #define _WCONIO_DEFINED
49
-
50
- #ifndef WEOF
51
- #define WEOF (wint_t)(0xFFFF)
52
- #endif
53
-
54
- _CRTIMP wchar_t *_cgetws(wchar_t *_Buffer);
55
- _CRTIMP wint_t __cdecl _getwch(void);
56
- _CRTIMP wint_t __cdecl _getwche(void);
57
- _CRTIMP wint_t __cdecl _putwch(wchar_t _WCh);
58
- _CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh);
59
- _CRTIMP int __cdecl _cputws(const wchar_t *_String);
60
- _CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...);
61
- _CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...);
62
- _CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
63
- _CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList);
64
- _CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...);
65
- _CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList);
66
- _CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
67
- _CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
68
- _CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
69
- _CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
70
- _CRTIMP wint_t __cdecl _putwch_nolock(wchar_t _WCh);
71
- _CRTIMP wint_t __cdecl _getwch_nolock(void);
72
- _CRTIMP wint_t __cdecl _getwche_nolock(void);
73
- _CRTIMP wint_t __cdecl _ungetwch_nolock(wint_t _WCh);
74
- #endif
75
-
76
- #ifndef NO_OLDNAMES
77
- char *__cdecl cgets(char *_Buffer);
78
- int __cdecl cprintf(const char *_Format,...);
79
- int __cdecl cputs(const char *_Str);
80
- int __cdecl cscanf(const char *_Format,...);
81
- int __cdecl getch(void);
82
- int __cdecl getche(void);
83
- int __cdecl kbhit(void);
84
- int __cdecl putch(int _Ch);
85
- int __cdecl ungetch(int _Ch);
86
-
87
- #if (defined(_X86_) && !defined(__x86_64))
88
- int __cdecl inp(unsigned short);
89
- unsigned short __cdecl inpw(unsigned short);
90
- int __cdecl outp(unsigned short,int);
91
- unsigned short __cdecl outpw(unsigned short,unsigned short);
92
- #endif
93
-
94
- /* I/O intrin functions. */
95
- __CRT_INLINE unsigned char __inbyte(unsigned short Port)
96
- {
97
- unsigned char value;
98
- __asm__ __volatile__ ("inb %w1,%b0"
99
- : "=a" (value)
100
- : "Nd" (Port));
101
- return value;
102
- }
103
- __CRT_INLINE unsigned short __inword(unsigned short Port)
104
- {
105
- unsigned short value;
106
- __asm__ __volatile__ ("inw %w1,%w0"
107
- : "=a" (value)
108
- : "Nd" (Port));
109
- return value;
110
- }
111
- __CRT_INLINE unsigned long __indword(unsigned short Port)
112
- {
113
- unsigned long value;
114
- __asm__ __volatile__ ("inl %w1,%0"
115
- : "=a" (value)
116
- : "Nd" (Port));
117
- return value;
118
- }
119
- __CRT_INLINE void __outbyte(unsigned short Port,unsigned char Data)
120
- {
121
- __asm__ __volatile__ ("outb %b0,%w1"
122
- :
123
- : "a" (Data), "Nd" (Port));
124
- }
125
- __CRT_INLINE void __outword(unsigned short Port,unsigned short Data)
126
- {
127
- __asm__ __volatile__ ("outw %w0,%w1"
128
- :
129
- : "a" (Data), "Nd" (Port));
130
- }
131
- __CRT_INLINE void __outdword(unsigned short Port,unsigned long Data)
132
- {
133
- __asm__ __volatile__ ("outl %0,%w1"
134
- :
135
- : "a" (Data), "Nd" (Port));
136
- }
137
- __CRT_INLINE void __inbytestring(unsigned short Port,unsigned char *Buffer,unsigned long Count)
138
- {
139
- __asm__ __volatile__ (
140
- "cld ; rep ; insb "
141
- : "=D" (Buffer), "=c" (Count)
142
- : "d"(Port), "0"(Buffer), "1" (Count)
143
- );
144
- }
145
- __CRT_INLINE void __inwordstring(unsigned short Port,unsigned short *Buffer,unsigned long Count)
146
- {
147
- __asm__ __volatile__ (
148
- "cld ; rep ; insw "
149
- : "=D" (Buffer), "=c" (Count)
150
- : "d"(Port), "0"(Buffer), "1" (Count)
151
- );
152
- }
153
- __CRT_INLINE void __indwordstring(unsigned short Port,unsigned long *Buffer,unsigned long Count)
154
- {
155
- __asm__ __volatile__ (
156
- "cld ; rep ; insl "
157
- : "=D" (Buffer), "=c" (Count)
158
- : "d"(Port), "0"(Buffer), "1" (Count)
159
- );
160
- }
161
-
162
- __CRT_INLINE void __outbytestring(unsigned short Port,unsigned char *Buffer,unsigned long Count)
163
- {
164
- __asm__ __volatile__ (
165
- "cld ; rep ; outsb "
166
- : "=S" (Buffer), "=c" (Count)
167
- : "d"(Port), "0"(Buffer), "1" (Count)
168
- );
169
- }
170
- __CRT_INLINE void __outwordstring(unsigned short Port,unsigned short *Buffer,unsigned long Count)
171
- {
172
- __asm__ __volatile__ (
173
- "cld ; rep ; outsw "
174
- : "=S" (Buffer), "=c" (Count)
175
- : "d"(Port), "0"(Buffer), "1" (Count)
176
- );
177
- }
178
- __CRT_INLINE void __outdwordstring(unsigned short Port,unsigned long *Buffer,unsigned long Count)
179
- {
180
- __asm__ __volatile__ (
181
- "cld ; rep ; outsl "
182
- : "=S" (Buffer), "=c" (Count)
183
- : "d"(Port), "0"(Buffer), "1" (Count)
184
- );
185
- }
186
-
187
- __CRT_INLINE unsigned __int64 __readcr0(void)
188
- {
189
- unsigned __int64 value;
190
- __asm__ __volatile__ (
191
- "mov %%cr0, %[value]"
192
- : [value] "=q" (value));
193
- return value;
194
- }
195
-
196
- /* Register sizes are different between 32/64 bit mode. So we have to do this for _WIN64 and _WIN32
197
- separately. */
198
-
199
- #ifdef _WIN64
200
- __CRT_INLINE void __writecr0(unsigned __int64 Data)
201
- {
202
- __asm__ __volatile__ (
203
- "mov %[Data], %%cr0"
204
- :
205
- : [Data] "q" (Data)
206
- : "memory");
207
- }
208
-
209
- __CRT_INLINE unsigned __int64 __readcr2(void)
210
- {
211
- unsigned __int64 value;
212
- __asm__ __volatile__ (
213
- "mov %%cr2, %[value]"
214
- : [value] "=q" (value));
215
- return value;
216
- }
217
-
218
- __CRT_INLINE void __writecr2(unsigned __int64 Data)
219
- {
220
- __asm__ __volatile__ (
221
- "mov %[Data], %%cr2"
222
- :
223
- : [Data] "q" (Data)
224
- : "memory");
225
- }
226
-
227
- __CRT_INLINE unsigned __int64 __readcr3(void)
228
- {
229
- unsigned __int64 value;
230
- __asm__ __volatile__ (
231
- "mov %%cr3, %[value]"
232
- : [value] "=q" (value));
233
- return value;
234
- }
235
-
236
- __CRT_INLINE void __writecr3(unsigned __int64 Data)
237
- {
238
- __asm__ __volatile__ (
239
- "mov %[Data], %%cr3"
240
- :
241
- : [Data] "q" (Data)
242
- : "memory");
243
- }
244
-
245
- __CRT_INLINE unsigned __int64 __readcr4(void)
246
- {
247
- unsigned __int64 value;
248
- __asm__ __volatile__ (
249
- "mov %%cr4, %[value]"
250
- : [value] "=q" (value));
251
- return value;
252
- }
253
-
254
- __CRT_INLINE void __writecr4(unsigned __int64 Data)
255
- {
256
- __asm__ __volatile__ (
257
- "mov %[Data], %%cr4"
258
- :
259
- : [Data] "q" (Data)
260
- : "memory");
261
- }
262
-
263
- __CRT_INLINE unsigned __int64 __readcr8(void)
264
- {
265
- unsigned __int64 value;
266
- __asm__ __volatile__ (
267
- "mov %%cr8, %[value]"
268
- : [value] "=q" (value));
269
- return value;
270
- }
271
-
272
- __CRT_INLINE void __writecr8(unsigned __int64 Data)
273
- {
274
- __asm__ __volatile__ (
275
- "mov %[Data], %%cr8"
276
- :
277
- : [Data] "q" (Data)
278
- : "memory");
279
- }
280
-
281
- #elif defined(_WIN32)
282
-
283
- __CRT_INLINE void __writecr0(unsigned Data)
284
- {
285
- __asm__ __volatile__ (
286
- "mov %[Data], %%cr0"
287
- :
288
- : [Data] "q" (Data)
289
- : "memory");
290
- }
291
-
292
- __CRT_INLINE unsigned long __readcr2(void)
293
- {
294
- unsigned long value;
295
- __asm__ __volatile__ (
296
- "mov %%cr2, %[value]"
297
- : [value] "=q" (value));
298
- return value;
299
- }
300
-
301
- __CRT_INLINE void __writecr2(unsigned Data)
302
- {
303
- __asm__ __volatile__ (
304
- "mov %[Data], %%cr2"
305
- :
306
- : [Data] "q" (Data)
307
- : "memory");
308
- }
309
-
310
- __CRT_INLINE unsigned long __readcr3(void)
311
- {
312
- unsigned long value;
313
- __asm__ __volatile__ (
314
- "mov %%cr3, %[value]"
315
- : [value] "=q" (value));
316
- return value;
317
- }
318
-
319
- __CRT_INLINE void __writecr3(unsigned Data)
320
- {
321
- __asm__ __volatile__ (
322
- "mov %[Data], %%cr3"
323
- :
324
- : [Data] "q" (Data)
325
- : "memory");
326
- }
327
-
328
- __CRT_INLINE unsigned long __readcr4(void)
329
- {
330
- unsigned long value;
331
- __asm__ __volatile__ (
332
- "mov %%cr4, %[value]"
333
- : [value] "=q" (value));
334
- return value;
335
- }
336
-
337
- __CRT_INLINE void __writecr4(unsigned Data)
338
- {
339
- __asm__ __volatile__ (
340
- "mov %[Data], %%cr4"
341
- :
342
- : [Data] "q" (Data)
343
- : "memory");
344
- }
345
-
346
- __CRT_INLINE unsigned long __readcr8(void)
347
- {
348
- unsigned long value; __asm__ __volatile__ (
349
- "mov %%cr8, %[value]"
350
- : [value] "=q" (value));
351
- return value;
352
- }
353
-
354
- __CRT_INLINE void __writecr8(unsigned Data)
355
- {
356
- __asm__ __volatile__ (
357
- "mov %[Data], %%cr8"
358
- :
359
- : [Data] "q" (Data)
360
- : "memory");
361
- }
362
-
363
- #endif
364
-
365
- __CRT_INLINE unsigned __int64 __readmsr(unsigned long msr)
366
- {
367
- unsigned __int64 val1, val2;
368
- __asm__ __volatile__(
369
- "rdmsr"
370
- : "=a" (val1), "=d" (val2)
371
- : "c" (msr));
372
- return val1 | (val2 << 32);
373
- }
374
-
375
- __CRT_INLINE void __writemsr (unsigned long msr, unsigned __int64 Value)
376
- {
377
- unsigned long val1 = Value, val2 = Value >> 32;
378
- __asm__ __volatile__ (
379
- "wrmsr"
380
- :
381
- : "c" (msr), "a" (val1), "d" (val2));
382
- }
383
-
384
- __CRT_INLINE unsigned __int64 __rdtsc(void)
385
- {
386
- unsigned __int64 val1, val2;
387
- __asm__ __volatile__ (
388
- "rdtsc"
389
- : "=a" (val1), "=d" (val2));
390
- return val1 | (val2 << 32);
391
- }
392
-
393
- __CRT_INLINE void __cpuid(int CPUInfo[4], int InfoType)
394
- {
395
- __asm__ __volatile__ (
396
- "cpuid"
397
- : "=a" (CPUInfo [0]), "=b" (CPUInfo [1]), "=c" (CPUInfo [2]), "=d" (CPUInfo [3])
398
- : "a" (InfoType));
399
- }
400
-
401
- #endif
402
-
403
- #ifdef __cplusplus
404
- }
405
- #endif
406
-
407
- #include <sec_api/conio_s.h>
408
-
409
- #endif
1
+ /**
2
+ * This file has no copyright assigned and is placed in the Public Domain.
3
+ * This file is part of the w64 mingw-runtime package.
4
+ * No warranty is given; refer to the file DISCLAIMER within this package.
5
+ */
6
+ #ifndef _INC_CONIO
7
+ #define _INC_CONIO
8
+
9
+ #include <_mingw.h>
10
+
11
+ #ifdef __cplusplus
12
+ extern "C" {
13
+ #endif
14
+
15
+ _CRTIMP char *_cgets(char *_Buffer);
16
+ _CRTIMP int __cdecl _cprintf(const char *_Format,...);
17
+ _CRTIMP int __cdecl _cputs(const char *_Str);
18
+ _CRTIMP int __cdecl _cscanf(const char *_Format,...);
19
+ _CRTIMP int __cdecl _cscanf_l(const char *_Format,_locale_t _Locale,...);
20
+ _CRTIMP int __cdecl _getch(void);
21
+ _CRTIMP int __cdecl _getche(void);
22
+ _CRTIMP int __cdecl _vcprintf(const char *_Format,va_list _ArgList);
23
+ _CRTIMP int __cdecl _cprintf_p(const char *_Format,...);
24
+ _CRTIMP int __cdecl _vcprintf_p(const char *_Format,va_list _ArgList);
25
+ _CRTIMP int __cdecl _cprintf_l(const char *_Format,_locale_t _Locale,...);
26
+ _CRTIMP int __cdecl _vcprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
27
+ _CRTIMP int __cdecl _cprintf_p_l(const char *_Format,_locale_t _Locale,...);
28
+ _CRTIMP int __cdecl _vcprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
29
+ _CRTIMP int __cdecl _kbhit(void);
30
+
31
+ #if defined(_X86_) && !defined(__x86_64)
32
+ int __cdecl _inp(unsigned short);
33
+ unsigned short __cdecl _inpw(unsigned short);
34
+ unsigned long __cdecl _inpd(unsigned short);
35
+ int __cdecl _outp(unsigned short,int);
36
+ unsigned short __cdecl _outpw(unsigned short,unsigned short);
37
+ unsigned long __cdecl _outpd(unsigned short,unsigned long);
38
+ #endif
39
+
40
+ _CRTIMP int __cdecl _putch(int _Ch);
41
+ _CRTIMP int __cdecl _ungetch(int _Ch);
42
+ _CRTIMP int __cdecl _getch_nolock(void);
43
+ _CRTIMP int __cdecl _getche_nolock(void);
44
+ _CRTIMP int __cdecl _putch_nolock(int _Ch);
45
+ _CRTIMP int __cdecl _ungetch_nolock(int _Ch);
46
+
47
+ #ifndef _WCONIO_DEFINED
48
+ #define _WCONIO_DEFINED
49
+
50
+ #ifndef WEOF
51
+ #define WEOF (wint_t)(0xFFFF)
52
+ #endif
53
+
54
+ _CRTIMP wchar_t *_cgetws(wchar_t *_Buffer);
55
+ _CRTIMP wint_t __cdecl _getwch(void);
56
+ _CRTIMP wint_t __cdecl _getwche(void);
57
+ _CRTIMP wint_t __cdecl _putwch(wchar_t _WCh);
58
+ _CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh);
59
+ _CRTIMP int __cdecl _cputws(const wchar_t *_String);
60
+ _CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...);
61
+ _CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...);
62
+ _CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
63
+ _CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList);
64
+ _CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...);
65
+ _CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList);
66
+ _CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
67
+ _CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
68
+ _CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
69
+ _CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
70
+ _CRTIMP wint_t __cdecl _putwch_nolock(wchar_t _WCh);
71
+ _CRTIMP wint_t __cdecl _getwch_nolock(void);
72
+ _CRTIMP wint_t __cdecl _getwche_nolock(void);
73
+ _CRTIMP wint_t __cdecl _ungetwch_nolock(wint_t _WCh);
74
+ #endif
75
+
76
+ #ifndef NO_OLDNAMES
77
+ char *__cdecl cgets(char *_Buffer);
78
+ int __cdecl cprintf(const char *_Format,...);
79
+ int __cdecl cputs(const char *_Str);
80
+ int __cdecl cscanf(const char *_Format,...);
81
+ int __cdecl getch(void);
82
+ int __cdecl getche(void);
83
+ int __cdecl kbhit(void);
84
+ int __cdecl putch(int _Ch);
85
+ int __cdecl ungetch(int _Ch);
86
+
87
+ #if (defined(_X86_) && !defined(__x86_64))
88
+ int __cdecl inp(unsigned short);
89
+ unsigned short __cdecl inpw(unsigned short);
90
+ int __cdecl outp(unsigned short,int);
91
+ unsigned short __cdecl outpw(unsigned short,unsigned short);
92
+ #endif
93
+
94
+ /* I/O intrin functions. */
95
+ __CRT_INLINE unsigned char __inbyte(unsigned short Port)
96
+ {
97
+ unsigned char value;
98
+ __asm__ __volatile__ ("inb %w1,%b0"
99
+ : "=a" (value)
100
+ : "Nd" (Port));
101
+ return value;
102
+ }
103
+ __CRT_INLINE unsigned short __inword(unsigned short Port)
104
+ {
105
+ unsigned short value;
106
+ __asm__ __volatile__ ("inw %w1,%w0"
107
+ : "=a" (value)
108
+ : "Nd" (Port));
109
+ return value;
110
+ }
111
+ __CRT_INLINE unsigned long __indword(unsigned short Port)
112
+ {
113
+ unsigned long value;
114
+ __asm__ __volatile__ ("inl %w1,%0"
115
+ : "=a" (value)
116
+ : "Nd" (Port));
117
+ return value;
118
+ }
119
+ __CRT_INLINE void __outbyte(unsigned short Port,unsigned char Data)
120
+ {
121
+ __asm__ __volatile__ ("outb %b0,%w1"
122
+ :
123
+ : "a" (Data), "Nd" (Port));
124
+ }
125
+ __CRT_INLINE void __outword(unsigned short Port,unsigned short Data)
126
+ {
127
+ __asm__ __volatile__ ("outw %w0,%w1"
128
+ :
129
+ : "a" (Data), "Nd" (Port));
130
+ }
131
+ __CRT_INLINE void __outdword(unsigned short Port,unsigned long Data)
132
+ {
133
+ __asm__ __volatile__ ("outl %0,%w1"
134
+ :
135
+ : "a" (Data), "Nd" (Port));
136
+ }
137
+ __CRT_INLINE void __inbytestring(unsigned short Port,unsigned char *Buffer,unsigned long Count)
138
+ {
139
+ __asm__ __volatile__ (
140
+ "cld ; rep ; insb "
141
+ : "=D" (Buffer), "=c" (Count)
142
+ : "d"(Port), "0"(Buffer), "1" (Count)
143
+ );
144
+ }
145
+ __CRT_INLINE void __inwordstring(unsigned short Port,unsigned short *Buffer,unsigned long Count)
146
+ {
147
+ __asm__ __volatile__ (
148
+ "cld ; rep ; insw "
149
+ : "=D" (Buffer), "=c" (Count)
150
+ : "d"(Port), "0"(Buffer), "1" (Count)
151
+ );
152
+ }
153
+ __CRT_INLINE void __indwordstring(unsigned short Port,unsigned long *Buffer,unsigned long Count)
154
+ {
155
+ __asm__ __volatile__ (
156
+ "cld ; rep ; insl "
157
+ : "=D" (Buffer), "=c" (Count)
158
+ : "d"(Port), "0"(Buffer), "1" (Count)
159
+ );
160
+ }
161
+
162
+ __CRT_INLINE void __outbytestring(unsigned short Port,unsigned char *Buffer,unsigned long Count)
163
+ {
164
+ __asm__ __volatile__ (
165
+ "cld ; rep ; outsb "
166
+ : "=S" (Buffer), "=c" (Count)
167
+ : "d"(Port), "0"(Buffer), "1" (Count)
168
+ );
169
+ }
170
+ __CRT_INLINE void __outwordstring(unsigned short Port,unsigned short *Buffer,unsigned long Count)
171
+ {
172
+ __asm__ __volatile__ (
173
+ "cld ; rep ; outsw "
174
+ : "=S" (Buffer), "=c" (Count)
175
+ : "d"(Port), "0"(Buffer), "1" (Count)
176
+ );
177
+ }
178
+ __CRT_INLINE void __outdwordstring(unsigned short Port,unsigned long *Buffer,unsigned long Count)
179
+ {
180
+ __asm__ __volatile__ (
181
+ "cld ; rep ; outsl "
182
+ : "=S" (Buffer), "=c" (Count)
183
+ : "d"(Port), "0"(Buffer), "1" (Count)
184
+ );
185
+ }
186
+
187
+ __CRT_INLINE unsigned __int64 __readcr0(void)
188
+ {
189
+ unsigned __int64 value;
190
+ __asm__ __volatile__ (
191
+ "mov %%cr0, %[value]"
192
+ : [value] "=q" (value));
193
+ return value;
194
+ }
195
+
196
+ /* Register sizes are different between 32/64 bit mode. So we have to do this for _WIN64 and _WIN32
197
+ separately. */
198
+
199
+ #ifdef _WIN64
200
+ __CRT_INLINE void __writecr0(unsigned __int64 Data)
201
+ {
202
+ __asm__ __volatile__ (
203
+ "mov %[Data], %%cr0"
204
+ :
205
+ : [Data] "q" (Data)
206
+ : "memory");
207
+ }
208
+
209
+ __CRT_INLINE unsigned __int64 __readcr2(void)
210
+ {
211
+ unsigned __int64 value;
212
+ __asm__ __volatile__ (
213
+ "mov %%cr2, %[value]"
214
+ : [value] "=q" (value));
215
+ return value;
216
+ }
217
+
218
+ __CRT_INLINE void __writecr2(unsigned __int64 Data)
219
+ {
220
+ __asm__ __volatile__ (
221
+ "mov %[Data], %%cr2"
222
+ :
223
+ : [Data] "q" (Data)
224
+ : "memory");
225
+ }
226
+
227
+ __CRT_INLINE unsigned __int64 __readcr3(void)
228
+ {
229
+ unsigned __int64 value;
230
+ __asm__ __volatile__ (
231
+ "mov %%cr3, %[value]"
232
+ : [value] "=q" (value));
233
+ return value;
234
+ }
235
+
236
+ __CRT_INLINE void __writecr3(unsigned __int64 Data)
237
+ {
238
+ __asm__ __volatile__ (
239
+ "mov %[Data], %%cr3"
240
+ :
241
+ : [Data] "q" (Data)
242
+ : "memory");
243
+ }
244
+
245
+ __CRT_INLINE unsigned __int64 __readcr4(void)
246
+ {
247
+ unsigned __int64 value;
248
+ __asm__ __volatile__ (
249
+ "mov %%cr4, %[value]"
250
+ : [value] "=q" (value));
251
+ return value;
252
+ }
253
+
254
+ __CRT_INLINE void __writecr4(unsigned __int64 Data)
255
+ {
256
+ __asm__ __volatile__ (
257
+ "mov %[Data], %%cr4"
258
+ :
259
+ : [Data] "q" (Data)
260
+ : "memory");
261
+ }
262
+
263
+ __CRT_INLINE unsigned __int64 __readcr8(void)
264
+ {
265
+ unsigned __int64 value;
266
+ __asm__ __volatile__ (
267
+ "mov %%cr8, %[value]"
268
+ : [value] "=q" (value));
269
+ return value;
270
+ }
271
+
272
+ __CRT_INLINE void __writecr8(unsigned __int64 Data)
273
+ {
274
+ __asm__ __volatile__ (
275
+ "mov %[Data], %%cr8"
276
+ :
277
+ : [Data] "q" (Data)
278
+ : "memory");
279
+ }
280
+
281
+ #elif defined(_WIN32)
282
+
283
+ __CRT_INLINE void __writecr0(unsigned Data)
284
+ {
285
+ __asm__ __volatile__ (
286
+ "mov %[Data], %%cr0"
287
+ :
288
+ : [Data] "q" (Data)
289
+ : "memory");
290
+ }
291
+
292
+ __CRT_INLINE unsigned long __readcr2(void)
293
+ {
294
+ unsigned long value;
295
+ __asm__ __volatile__ (
296
+ "mov %%cr2, %[value]"
297
+ : [value] "=q" (value));
298
+ return value;
299
+ }
300
+
301
+ __CRT_INLINE void __writecr2(unsigned Data)
302
+ {
303
+ __asm__ __volatile__ (
304
+ "mov %[Data], %%cr2"
305
+ :
306
+ : [Data] "q" (Data)
307
+ : "memory");
308
+ }
309
+
310
+ __CRT_INLINE unsigned long __readcr3(void)
311
+ {
312
+ unsigned long value;
313
+ __asm__ __volatile__ (
314
+ "mov %%cr3, %[value]"
315
+ : [value] "=q" (value));
316
+ return value;
317
+ }
318
+
319
+ __CRT_INLINE void __writecr3(unsigned Data)
320
+ {
321
+ __asm__ __volatile__ (
322
+ "mov %[Data], %%cr3"
323
+ :
324
+ : [Data] "q" (Data)
325
+ : "memory");
326
+ }
327
+
328
+ __CRT_INLINE unsigned long __readcr4(void)
329
+ {
330
+ unsigned long value;
331
+ __asm__ __volatile__ (
332
+ "mov %%cr4, %[value]"
333
+ : [value] "=q" (value));
334
+ return value;
335
+ }
336
+
337
+ __CRT_INLINE void __writecr4(unsigned Data)
338
+ {
339
+ __asm__ __volatile__ (
340
+ "mov %[Data], %%cr4"
341
+ :
342
+ : [Data] "q" (Data)
343
+ : "memory");
344
+ }
345
+
346
+ __CRT_INLINE unsigned long __readcr8(void)
347
+ {
348
+ unsigned long value; __asm__ __volatile__ (
349
+ "mov %%cr8, %[value]"
350
+ : [value] "=q" (value));
351
+ return value;
352
+ }
353
+
354
+ __CRT_INLINE void __writecr8(unsigned Data)
355
+ {
356
+ __asm__ __volatile__ (
357
+ "mov %[Data], %%cr8"
358
+ :
359
+ : [Data] "q" (Data)
360
+ : "memory");
361
+ }
362
+
363
+ #endif
364
+
365
+ __CRT_INLINE unsigned __int64 __readmsr(unsigned long msr)
366
+ {
367
+ unsigned __int64 val1, val2;
368
+ __asm__ __volatile__(
369
+ "rdmsr"
370
+ : "=a" (val1), "=d" (val2)
371
+ : "c" (msr));
372
+ return val1 | (val2 << 32);
373
+ }
374
+
375
+ __CRT_INLINE void __writemsr (unsigned long msr, unsigned __int64 Value)
376
+ {
377
+ unsigned long val1 = Value, val2 = Value >> 32;
378
+ __asm__ __volatile__ (
379
+ "wrmsr"
380
+ :
381
+ : "c" (msr), "a" (val1), "d" (val2));
382
+ }
383
+
384
+ __CRT_INLINE unsigned __int64 __rdtsc(void)
385
+ {
386
+ unsigned __int64 val1, val2;
387
+ __asm__ __volatile__ (
388
+ "rdtsc"
389
+ : "=a" (val1), "=d" (val2));
390
+ return val1 | (val2 << 32);
391
+ }
392
+
393
+ __CRT_INLINE void __cpuid(int CPUInfo[4], int InfoType)
394
+ {
395
+ __asm__ __volatile__ (
396
+ "cpuid"
397
+ : "=a" (CPUInfo [0]), "=b" (CPUInfo [1]), "=c" (CPUInfo [2]), "=d" (CPUInfo [3])
398
+ : "a" (InfoType));
399
+ }
400
+
401
+ #endif
402
+
403
+ #ifdef __cplusplus
404
+ }
405
+ #endif
406
+
407
+ #include <sec_api/conio_s.h>
408
+
409
+ #endif