From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10418 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Need "_fpx_sw_bytes", "FP_XSTATE_MAGIC2_SIZE" and "FP_XSTATE_MAGIC{1,2}" definition to compile CoreCLR Date: Tue, 30 Aug 2016 17:42:51 -0400 Message-ID: <20160830214251.GO15995@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="1Ow488MNN9B9o/ov" X-Trace: blaine.gmane.org 1472593393 14933 195.159.176.226 (30 Aug 2016 21:43:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Aug 2016 21:43:13 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-10431-gllmg-musl=m.gmane.org@lists.openwall.com Tue Aug 30 23:43:08 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1beqoE-0003No-7k for gllmg-musl@m.gmane.org; Tue, 30 Aug 2016 23:43:06 +0200 Original-Received: (qmail 24382 invoked by uid 550); 30 Aug 2016 21:43:05 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 24364 invoked from network); 30 Aug 2016 21:43:04 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10418 Archived-At: --1Ow488MNN9B9o/ov Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Aug 04, 2016 at 09:15:40PM +0000, Dangling Pointer wrote: > Please provide the user-facing definitions of "struct _fpx_sw_bytes" and macros "FP_XSTATE_MAGIC2_SIZE", "FP_XSTATE_MAGIC1" and "FP_XSTATE_MAGIC2" to compile CoreCLR. > > > Related issue: https://github.com/dotnet/coreclr/issues/917#issuecomment-236907708 > > Usage: https://github.com/dotnet/coreclr/blob/9585fc2/src/pal/src/include/pal/context.h#L142-L178 Would a patch like the attached me sufficient? Does 32-bit x86 need something like this too? Rich --1Ow488MNN9B9o/ov Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="fpx.diff" diff --git a/arch/x86_64/bits/signal.h b/arch/x86_64/bits/signal.h index e3c3141..5393649 100644 --- a/arch/x86_64/bits/signal.h +++ b/arch/x86_64/bits/signal.h @@ -33,6 +33,14 @@ #endif #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define FP_XSTATE_MAGIC1 0x46505853U +#define FP_XSTATE_MAGIC2 0x46505845U +#define FP_XSTATE_MAGIC2_SIZE 4UL +struct _fpx_sw_bytes { + unsigned magic1, extended_size; + unsigned long xstate_bv; + unsigned xstate_size, padding[7]; +}; typedef long long greg_t, gregset_t[23]; typedef struct _fpstate { unsigned short cwd, swd, ftw, fop; --1Ow488MNN9B9o/ov--