• R/O
  • SSH

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonrubyphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

Mercurial Patch Queue for Windows System Libraries


Commit MetaInfo

修訂33d4cee08b472a080785c78fb5b7a3ca36216d8c (tree)
時間2019-04-21 21:44:26
作者Cesar Strauss <cestrauss@gmai...>
CommiterCesar Strauss

Log Message

Reworked "cpu features" patch to fully build on 64 bits.

Change Summary

差異

diff -r e94c4e392059 -r 33d4cee08b47 cpu-features-x86-64.patch
--- a/cpu-features-x86-64.patch Sat Apr 20 12:22:48 2019 +0000
+++ b/cpu-features-x86-64.patch Sun Apr 21 12:44:26 2019 +0000
@@ -1,5 +1,6 @@
11 # HG changeset patch
22 # Parent 66b461070c4b063621a1af46c9fbf17323ce536a
3+# Parent d1de6110347aee4b3c939b68fcc9de1087c5e9c3
34 Make CPU features initialization code x86-64 compliant.
45
56 * cpu_features.sx (CPUID_FLAG) [__x86_64__]: Omit check.
@@ -16,9 +17,7 @@
1617 diff --git a/mingwrt/cpu_features.sx b/mingwrt/cpu_features.sx
1718 --- a/mingwrt/cpu_features.sx
1819 +++ b/mingwrt/cpu_features.sx
19-@@ -40,12 +40,37 @@
20- #define RH_FLAG(BITNUM) (1 << ((BITNUM) - 8))
21-
20+@@ -42,8 +42,33 @@
2221 #define CPUID_FLAG RX_FLAG(21) /* EFLAGS bit 21 */
2322
2423 #define FXSAVE_BUFSIZ 512
@@ -53,11 +52,7 @@
5352
5453 /* FIXME: is this optimization really worthwhile here? It breaks,
5554 * with older GAS versions, (such as that commonly deployed in the
56- * GCC-3.4.5 era, and earlier)!
57- *
58-@@ -70,11 +95,15 @@
59- .def ___cpu_features_init; .scl 2; .type 32; .endef
60-
55+@@ -72,7 +97,11 @@
6156 ___cpu_features_init:
6257
6358 .cfi_startproc
@@ -70,11 +65,7 @@
7065 * supported by the host CPU, we try to toggle the CPUID flag bit within the
7166 * EFLAGS register, (ultimately leaving it unchanged).
7267 */
73- pushf /* save original flags state */
74- pushf /* duplicate them in both... */
75-@@ -95,18 +124,20 @@
76- */
77- xor eax, edx /* isolate CPUID_FLAG state */
68+@@ -97,14 +126,16 @@
7869 test eax, CPUID_FLAG /* did it change? */
7970 je 90f /* no: quit immediately */
8071
@@ -90,15 +81,11 @@
9081 -.cfi_def_cfa_offset 8
9182 -.cfi_offset ebx, -8
9283 +.cfi_def_cfa_offset CFI_OFFSET_BASE(2)
93-+.cfi_offset ebx, -CFI_OFFSET_BASE(2)
84++.cfi_offset rbx, -CFI_OFFSET_BASE(2)
9485
9586 /* First, we must perform a level zero CPUID enquiry, to determine the
9687 * maximum level of interrogation which is supported.
97- */
98- xor eax, eax /* zero request level code */
99-@@ -168,48 +199,48 @@ 15:
100- /* We must create a local stack frame, with the stack pointer aligned to a
101- * sixteen byte boundary, in which to allocate an FXSAVE buffer; (failure to
88+@@ -170,44 +201,44 @@
10289 * align this correctly will raise an unhandled exception, and GCC cannot be
10390 * trusted to get this right in C language code).
10491 */
@@ -160,11 +147,7 @@
160147
161148 cmp ebx, FXTEST_BITS /* SSE flags were changed? */
162149 jne 20f /* no: skip SSE detection */
163-
164- /* If we're still here, then the operating system should support SSE;
165-@@ -268,14 +299,14 @@ 30: chk CPUID_CAP(3DNOWP)
166- */
167- or DWORD PTR ___cpu_features, eax
150+@@ -270,10 +301,10 @@
168151
169152 /* ...we restore the preserved state of the EBX register...
170153 */
@@ -178,5 +161,3 @@
178161
179162 /* ...and return to the C runtime initialization procedure.
180163 */
181- 90: ret
182-
diff -r e94c4e392059 -r 33d4cee08b47 series
--- a/series Sat Apr 20 12:22:48 2019 +0000
+++ b/series Sun Apr 21 12:44:26 2019 +0000
@@ -1,6 +1,6 @@
11 win64-context.patch #+win64
2+cpu-features-x86-64.patch #+win64
23 win64-time-typedef.patch #+win64
3-cpu-features-x86-64.patch #+win64
44 alloca-testing.patch #+void #-void
55 winerror-winsock2-update.patch #+void #-void
66 winnls-self-contained.patch #+self-contained