• R/O
  • SSH

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Mercurial Patch Queue for Windows System Libraries


File Info

Rev. f9c7f78569e48728c628ab0157ddbcc3821089d7
大小 3,765 字节
时间 2019-04-22 03:01:06
作者 Cesar Strauss
Log Message

Place the _WIN64 specific declaration of CONTEXT in its own header file.

Content

# HG changeset patch
# User Cesar Strauss <cestrauss@gmail.com>
# Date 1555868863 0
# Parent  9f16cb37f78fdbd63f1b502eff64780362550353
Place the _WIN64 specific declaration of CONTEXT in its own header file.

diff --git a/wslapi/include/_winnt_decl_64.h b/wslapi/include/_winnt_decl_64.h
new file mode 100644
--- /dev/null
+++ b/wslapi/include/_winnt_decl_64.h
@@ -0,0 +1,119 @@
+/*
+ * _winnt_decl_64.h
+ *
+ * Specific declarations for 64 bits architectures.
+ *
+ * $Id$
+ *
+ * Written by Cesar Strauss <cestrauss@gmail.com>
+ * Copyright (C) 2019, MinGW.org Project
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#ifndef __WINNT_DECL_64_H
+#define __WINNT_DECL_64_H
+#pragma GCC system_header
+
+#include <winnt.h>
+
+_BEGIN_C_DECLS
+
+/* TODO: Find declarations for XMM_SAVE_AREA32, NEON128 and M128A. */
+#if 0
+typedef struct _CONTEXT {
+  DWORD64 P1Home;
+  DWORD64 P2Home;
+  DWORD64 P3Home;
+  DWORD64 P4Home;
+  DWORD64 P5Home;
+  DWORD64 P6Home;
+  DWORD   ContextFlags;
+  DWORD   MxCsr;
+  WORD    SegCs;
+  WORD    SegDs;
+  WORD    SegEs;
+  WORD    SegFs;
+  WORD    SegGs;
+  WORD    SegSs;
+  DWORD   EFlags;
+  DWORD64 Dr0;
+  DWORD64 Dr1;
+  DWORD64 Dr2;
+  DWORD64 Dr3;
+  DWORD64 Dr6;
+  DWORD64 Dr7;
+  DWORD64 Rax;
+  DWORD64 Rcx;
+  DWORD64 Rdx;
+  DWORD64 Rbx;
+  DWORD64 Rsp;
+  DWORD64 Rbp;
+  DWORD64 Rsi;
+  DWORD64 Rdi;
+  DWORD64 R8;
+  DWORD64 R9;
+  DWORD64 R10;
+  DWORD64 R11;
+  DWORD64 R12;
+  DWORD64 R13;
+  DWORD64 R14;
+  DWORD64 R15;
+  DWORD64 Rip;
+  union {
+    XMM_SAVE_AREA32 FltSave;
+    NEON128         Q[16];
+    ULONGLONG       D[32];
+    struct {
+      M128A Header[2];
+      M128A Legacy[8];
+      M128A Xmm0;
+      M128A Xmm1;
+      M128A Xmm2;
+      M128A Xmm3;
+      M128A Xmm4;
+      M128A Xmm5;
+      M128A Xmm6;
+      M128A Xmm7;
+      M128A Xmm8;
+      M128A Xmm9;
+      M128A Xmm10;
+      M128A Xmm11;
+      M128A Xmm12;
+      M128A Xmm13;
+      M128A Xmm14;
+      M128A Xmm15;
+    } DUMMYSTRUCTNAME;
+    DWORD           S[32];
+  } DUMMYUNIONNAME;
+  M128A   VectorRegister[26];
+  DWORD64 VectorControl;
+  DWORD64 DebugControl;
+  DWORD64 LastBranchToRip;
+  DWORD64 LastBranchFromRip;
+  DWORD64 LastExceptionToRip;
+  DWORD64 LastExceptionFromRip;
+} CONTEXT, *PCONTEXT;
+#endif
+
+_END_C_DECLS
+
+#endif /* __WINNT_DECL_64_H: $RCSfile$: end of file */
diff --git a/wslapi/include/winnt.h b/wslapi/include/winnt.h
--- a/wslapi/include/winnt.h
+++ b/wslapi/include/winnt.h
@@ -4339,4 +4339,9 @@
 
 #endif	/* ! RC_INVOKED */
 #endif	/* !_WINNT_H: internal recursion break */
+
+#ifdef _WIN64
+#include <_winnt_decl_64.h>
+#endif
+
 #endif	/* !_WINNT_H: $RCSfile$: end of file */